From 049bea7569be31f02d3b9f815443c516f6bc5328 Mon Sep 17 00:00:00 2001 From: sbaluja Date: Mon, 29 Dec 2025 19:03:04 -0500 Subject: [PATCH 1/4] Add support for bidirectional streaming in smithy clients --- .../auth/signer/AWSAuthEventStreamV4Signer.h | 4 + .../client/AWSClientEventStreamingAsyncTask.h | 103 ++++++++++++++ .../aws/core/utils/event/EventEncoderStream.h | 6 + .../aws/core/utils/event/EventStreamEncoder.h | 12 +- .../include/smithy/client/AwsSmithyClient.h | 24 +++- .../AwsSmithyClientAsyncRequestContext.h | 2 + .../smithy/client/AwsSmithyClientBase.h | 9 +- .../client/common/AwsSmithyRequestSigning.h | 126 +++++++++++++----- .../smithy/identity/signer/AwsSignerBase.h | 3 + .../identity/signer/built-in/SigV4Signer.h | 38 +++++- .../signer/AWSAuthEventStreamV4Signer.cpp | 25 +++- .../smithy/client/AwsSmithyClientBase.cpp | 12 +- .../source/utils/event/EventStreamEncoder.cpp | 4 +- .../cpp/JsonCppClientGenerator.java | 4 +- .../velocity/cpp/smithy/SmithyClientHeader.vm | 2 +- .../cpp/smithy/SmithyEndpointClosure.vm | 3 - ...yJsonServiceEventStreamOperationsSource.vm | 64 ++++----- .../SmithyJsonServiceOperationsSource.vm | 4 + tools/scripts/codegen/legacy_c2j_cpp_gen.py | 6 +- 19 files changed, 349 insertions(+), 102 deletions(-) diff --git a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthEventStreamV4Signer.h b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthEventStreamV4Signer.h index 27083efb506..e82a56a973e 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthEventStreamV4Signer.h +++ b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthEventStreamV4Signer.h @@ -55,6 +55,8 @@ namespace Aws bool SignEventMessage(Aws::Utils::Event::Message&, Aws::String& priorSignature) const override; + bool SignEventMessageWithCreds(Aws::Utils::Event::Message& message, Aws::String& priorSignature, const Aws::Auth::AWSCredentials& credentials) const; + bool SignRequest(Aws::Http::HttpRequest& request) const override { return SignRequest(request, m_region.c_str(), m_serviceName.c_str(), true); @@ -70,6 +72,8 @@ namespace Aws return SignRequest(request, region, m_serviceName.c_str(), signBody); } + bool SignRequestWithCreds(Http::HttpRequest& request, const Auth::AWSCredentials& credentials, const char* region, const char* serviceName, bool) const; + bool SignRequest(Aws::Http::HttpRequest& request, const char* region, const char* serviceName, bool signBody) const override; /** diff --git a/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h b/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h index bcef3211914..b1268a036a9 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h +++ b/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h @@ -13,6 +13,13 @@ #include #include + +namespace smithy { + namespace client { + class AwsSmithyClientAsyncRequestContext; + } +} + namespace Aws { namespace Client { @@ -125,6 +132,92 @@ class AWS_CORE_LOCAL BidirectionalEventStreamingTask final { std::shared_ptr m_sem; }; +/** + * Smithy-compatible bi-directional streaming task for modern AWS clients + */ +template +class AWS_CORE_LOCAL SmithyBidirectionalStreamingTask final { + public: + using AuthResolvedCallback = std::function)>; + using EndpointUpdateCallback = std::function; + + SmithyBidirectionalStreamingTask(const ClientT* client, const std::shared_ptr& request, const HandlerT& handler, + const std::shared_ptr& context, + const std::shared_ptr& stream, + EndpointUpdateCallback&& endpointCallback, + AuthResolvedCallback&& authCallback) + : m_client(client), m_request(request), m_handler(handler), m_context(context), m_stream(stream), + m_sem(Aws::MakeShared("SmithyBidirectionalStreamingTask", 0, 1)) { + + m_authCallback = std::move(authCallback); + m_endpointCallback = std::move(endpointCallback); + + m_request->SetEventStreamHandler(m_request->GetEventStreamHandler()); + + auto streamPtr = m_stream; + auto sem = m_sem; + m_request->SetRequestSignedHandler([streamPtr, sem](const Aws::Http::HttpRequest& httpRequest) { + streamPtr->SetSignatureSeed(Aws::Client::GetAuthorizationHeader(httpRequest)); + sem->ReleaseAll(); + }); + + std::weak_ptr wRequest = request; + // Setup InitialResponse handler to use the new actual request object + if (!request->GetHeadersReceivedEventHandler()) { + request->SetHeadersReceivedEventHandler([wRequest](const Http::HttpRequest*, Http::HttpResponse* response) { + auto request = wRequest.lock(); + AWS_CHECK_PTR(ClientT::GetAllocationTag(), request); + AWS_CHECK_PTR(ClientT::GetAllocationTag(), response); + + auto& initialResponseHandler = request->GetEventStreamHandler().GetInitialResponseCallbackEx(); + if (initialResponseHandler) { + initialResponseHandler({response->GetHeaders()}, Utils::Event::InitialResponseType::ON_RESPONSE); + } + }); + } + + // Setup ResponseStreamFactory to provide EventStream decoder based on the new actual request object, not the original one. + request->SetResponseStreamFactory([wRequest]() -> Aws::IOStream* { + auto request = wRequest.lock(); + if (!request) { + AWS_LOGSTREAM_FATAL(ClientT::GetAllocationTag(), + "Unexpected nullptr bi-directional streaming request on response streaming factory call!"); + assert(false); + return nullptr; + } + request->GetEventStreamDecoder().Reset(); + return Aws::New("BidirectionalEventStreamingTask", request->GetEventStreamDecoder()); + }); + } + + const std::shared_ptr& GetSemaphore() const { return m_sem; } + + void operator()() { + assert(m_authCallback); + assert(m_endpointCallback); + auto outcome = m_client->MakeRequestDeserialize(m_request.get(), m_request->GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + std::move(m_endpointCallback), std::move(m_authCallback)); + + if (outcome.IsSuccess()) { + m_handler(m_client, *m_request, OutcomeT(NoResult()), m_context); + } else { + if (m_stream) m_stream->Close(); + m_handler(m_client, *m_request, OutcomeT(outcome.GetError()), m_context); + } + } + + private: + const ClientT* m_client; + std::shared_ptr m_request; + HandlerT m_handler; + std::shared_ptr m_context; + std::shared_ptr m_stream; + AuthResolvedCallback m_authCallback; + EndpointUpdateCallback m_endpointCallback; + std::shared_ptr m_sem; +}; + // A helper template factory to avoid providing all typenames for BidirectionalEventStreamingTask in the generated code // It looks like a wall of code, you can thank clang-format for this. template @@ -136,5 +229,15 @@ static BidirectionalEventStreamingTask( pClientThis, std::forward(endpoint), pRequest, handler, handlerContext, stream, method, signerName); } + +template +static SmithyBidirectionalStreamingTask CreateSmithyBidirectionalEventStreamTask( + const ClientT* client, std::shared_ptr request, const HandlerT& handler, + const std::shared_ptr& context, + const std::shared_ptr& stream, + std::function&& endpointCallback, + std::function)>&& authCallback) { + return SmithyBidirectionalStreamingTask(client, request, handler, context, stream, std::move(endpointCallback), std::move(authCallback)); +} } // namespace Client } // namespace Aws diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h index 84503da6e4d..2108ba7bf88 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h +++ b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h @@ -9,6 +9,7 @@ #include #include #include +#include namespace Aws { @@ -53,6 +54,11 @@ namespace Aws */ void SetSigner(Aws::Client::AWSAuthSigner* signer) { m_encoder.SetSigner(signer); } + /** + * Sets a custom signing callback for event signing. + */ + void SetSigningCallback(const EventStreamEncoder::SigningCallback& callback) { m_encoder.SetSigningCallback(callback); } + /** * Allows a stream writer to communicate the end of the stream to a stream reader. * diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventStreamEncoder.h b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventStreamEncoder.h index 656388b8e87..d63e6e40bcc 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventStreamEncoder.h +++ b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventStreamEncoder.h @@ -8,6 +8,8 @@ #include #include #include +#include +#include namespace Aws { @@ -28,13 +30,16 @@ namespace Aws class AWS_CORE_API EventStreamEncoder { public: - EventStreamEncoder(Aws::Client::AWSAuthSigner* signer = nullptr); + using SigningCallback = std::function; + EventStreamEncoder(Aws::Client::AWSAuthSigner* signer = nullptr); void SetSignatureSeed(const Aws::String& seed) { m_signatureSeed = seed; } void SetSigner(Aws::Client::AWSAuthSigner* signer) { m_signer = signer; } + void SetSigningCallback(const SigningCallback& callback) { m_signingCallback = callback; } + /** * Encodes the input message in the event-stream binary format and signs the resulting bits. * The signing is done via the signer member. @@ -58,6 +63,11 @@ namespace Aws Aws::Client::AWSAuthSigner* m_signer; Aws::String m_signatureSeed; + + SigningCallback m_signingCallback = [this](Aws::Utils::Event::Message& signedMessage, Aws::String& signatureSeed) -> bool { + assert(m_signer); + return m_signer->SignEventMessage(signedMessage, signatureSeed); + }; }; } } diff --git a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h index b6e22084fc1..365427e9810 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h @@ -25,6 +25,13 @@ #include #include +namespace Aws { + namespace Client { + template + class SmithyBidirectionalStreamingTask; + } +} + namespace smithy { namespace client { @@ -132,6 +139,9 @@ namespace client virtual ~AwsSmithyClientT() = default; protected: + template + friend class Aws::Client::SmithyBidirectionalStreamingTask; + void initClient() { if (m_endpointProvider && m_authSchemeResolver) { m_endpointProvider->InitBuiltInParameters(m_clientConfiguration); @@ -211,6 +221,11 @@ namespace client return AwsClientRequestSigning::SignRequest(httpRequest, ctx, m_authSchemes); } + SigningEventOutcome SignEventMessage(Aws::Utils::Event::Message& message, Aws::String &seed, const std::shared_ptr& ctx) const + { + return AwsClientRequestSigning::SignEventMessage(message, seed, ctx, m_authSchemes); + } + bool AdjustClockSkew(HttpResponseOutcome& outcome, const AuthSchemeOption& authSchemeOption) const override { return AwsClientRequestSigning::AdjustClockSkew(outcome, authSchemeOption, m_authSchemes); @@ -227,12 +242,13 @@ namespace client ResponseT MakeRequestDeserialize(Aws::AmazonWebServiceRequest const * const request, const char* requestName, Aws::Http::HttpMethod method, - EndpointUpdateCallback&& endpointCallback) const + EndpointUpdateCallback&& endpointCallback, + AuthResolvedCallback&& authCallback = nullptr) const { - auto httpResponseOutcome = MakeRequestSync(request, requestName, method, std::move(endpointCallback)); - return m_serializer->Deserialize(std::move(httpResponseOutcome), GetServiceClientName(), requestName); + auto httpResponseOutcome = MakeRequestSync(request, requestName, method, std::move(endpointCallback), std::move(authCallback)); + return m_serializer->Deserialize(std::move(httpResponseOutcome), GetServiceClientName(), requestName); } - + Aws::String GeneratePresignedUrl( EndpointUpdateCallback&& endpointCallback, Aws::Http::HttpMethod method, diff --git a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientAsyncRequestContext.h b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientAsyncRequestContext.h index cf12dc8088d..1796f541916 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientAsyncRequestContext.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientAsyncRequestContext.h @@ -24,6 +24,7 @@ namespace smithy using AwsCoreError = Aws::Client::AWSError; using HttpResponseOutcome = Aws::Utils::Outcome, AwsCoreError>; using ResponseHandlerFunc = std::function; + using AuthResolvedCallback = std::function)>; struct RequestInfo { @@ -69,6 +70,7 @@ namespace smithy Aws::Vector m_monitoringContexts; ResponseHandlerFunc m_responseHandler; + AuthResolvedCallback m_authResolvedCallback; std::shared_ptr m_pExecutor; std::shared_ptr m_interceptorContext; std::shared_ptr m_awsIdentity; diff --git a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h index bd3f2704380..5d39ad8d75a 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h @@ -24,6 +24,7 @@ #include #include #include +#include #include namespace Aws @@ -81,7 +82,9 @@ namespace client using ClientError = AWSCoreError; using SigningError = AWSCoreError; using SigningOutcome = Aws::Utils::FutureOutcome, SigningError>; + using SigningEventOutcome = Aws::Utils::Outcome; using EndpointUpdateCallback = std::function; + using AuthResolvedCallback = std::function)>; using HttpResponseOutcome = Aws::Utils::Outcome, AWSCoreError>; using ResponseHandlerFunc = std::function; using SelectAuthSchemeOptionOutcome = Aws::Utils::Outcome; @@ -144,12 +147,14 @@ namespace client Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback, ResponseHandlerFunc&& responseHandler, + AuthResolvedCallback&& authCallback, std::shared_ptr pExecutor) const; HttpResponseOutcome MakeRequestSync(Aws::AmazonWebServiceRequest const * const request, const char* requestName, Aws::Http::HttpMethod method, - EndpointUpdateCallback&& endpointCallback) const; + EndpointUpdateCallback&& endpointCallback, + AuthResolvedCallback&& authCallback) const; StreamOutcome MakeRequestWithUnparsedResponse(Aws::AmazonWebServiceRequest const * const request, const char* requestName, @@ -159,6 +164,8 @@ namespace client void AppendToUserAgent(const Aws::String& valueToAppend); protected: + template + friend class SmithyBidirectionalEventStreamingTask; //for backwards compatibility const std::shared_ptr& GetErrorMarshaller() const diff --git a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h index c517ae90f40..46452759d6e 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -37,25 +38,23 @@ namespace smithy using HttpRequest = Aws::Http::HttpRequest; using SigningError = Aws::Client::AWSError; using SigningOutcome = Aws::Utils::FutureOutcome, SigningError>; + using SigningEventOutcome = Aws::Utils::Outcome; + using ResolveAuthOutcome = Aws::Utils::Outcome, Aws::Client::AWSError>; + using ResolveSignerOutcome = Aws::Utils::Outcome>; using HttpResponseOutcome = Aws::Utils::Outcome, Aws::Client::AWSError>; using IdentityOutcome = Aws::Utils::Outcome, Aws::Client::AWSError>; static IdentityOutcome ResolveIdentity(const client::AwsSmithyClientAsyncRequestContext& ctx, const Aws::UnorderedMap& authSchemes) { - auto authSchemeIt = authSchemes.find(ctx.m_authSchemeOption.schemeId); - if (authSchemeIt == authSchemes.end()) + auto authSchemeOutcome = ResolveAuthScheme(ctx.m_authSchemeOption, authSchemes); + if (!authSchemeOutcome.IsSuccess()) { - assert(!"Auth scheme has not been found for a given auth option!"); - return (SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, - "", - "Requested AuthSchemeOption was not found within client Auth Schemes", - false/*retryable*/)); + return SigningError(authSchemeOutcome.GetError()); } - const AuthSchemesVariantT& authScheme = authSchemeIt->second; IdentityVisitor visitor(ctx); - AuthSchemesVariantT authSchemesVariantCopy(authScheme); // TODO: allow const visiting + AuthSchemesVariantT authSchemesVariantCopy(authSchemeOutcome.GetResult().value()); authSchemesVariantCopy.Visit(visitor); if (!visitor.result) @@ -73,19 +72,13 @@ namespace smithy const client::AwsSmithyClientAsyncRequestContext& ctx, const Aws::UnorderedMap& authSchemes) { - auto authSchemeIt = authSchemes.find(ctx.m_authSchemeOption.schemeId); - if (authSchemeIt == authSchemes.end()) + auto authSchemeOutcome = ResolveAuthScheme(ctx.m_authSchemeOption, authSchemes); + if (!authSchemeOutcome.IsSuccess()) { - assert(!"Auth scheme has not been found for a given auth option!"); - return (SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, - "", - "Requested AuthSchemeOption was not found within client Auth Schemes", - false/*retryable*/)); + return SigningError(authSchemeOutcome.GetError()); } - const AuthSchemesVariantT& authScheme = authSchemeIt->second; - - return SignWithAuthScheme(std::move(HTTPRequest), authScheme, ctx); + return SignWithAuthScheme(std::move(HTTPRequest), authSchemeOutcome.GetResult().value(), ctx); } static SigningOutcome PreSignRequest(std::shared_ptr httpRequest, @@ -95,21 +88,14 @@ namespace smithy const Aws::String& serviceName, long long expirationTimeInSeconds) { - - auto authSchemeIt = authSchemes.find(authSchemeOption.schemeId); - if (authSchemeIt == authSchemes.end()) + auto authSchemeOutcome = ResolveAuthScheme(authSchemeOption, authSchemes); + if (!authSchemeOutcome.IsSuccess()) { - assert(!"Auth scheme has not been found for a given auth option!"); - return (SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, - "", - "Requested AuthSchemeOption was not found within client Auth Schemes", - false/*retryable*/)); + return SigningError(authSchemeOutcome.GetError()); } - const AuthSchemesVariantT& authScheme = authSchemeIt->second; - PreSignerVisitor visitor(httpRequest, authSchemeOption, region, serviceName, expirationTimeInSeconds); - AuthSchemesVariantT authSchemesVariantCopy(authScheme); + AuthSchemesVariantT authSchemesVariantCopy(authSchemeOutcome.GetResult().value()); authSchemesVariantCopy.Visit(visitor); if (!visitor.result) { @@ -119,6 +105,43 @@ namespace smithy return std::move(*visitor.result); } + static SigningEventOutcome SignEventMessage(Aws::Utils::Event::Message& message, Aws::String& seed, const std::shared_ptr& ctx, const Aws::UnorderedMap& authSchemes) + { + auto authSchemeOutcome = ResolveAuthScheme(ctx->m_authSchemeOption, authSchemes); + if (!authSchemeOutcome.IsSuccess()) + { + return SigningError(authSchemeOutcome.GetError()); + } + + SignEventMessageVistor visitor(message, seed, ctx); + AuthSchemesVariantT authSchemesVariantCopy(authSchemeOutcome.GetResult().value()); + authSchemesVariantCopy.Visit(visitor); + + if (!visitor.result) { + return (SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, "", "Failed to sign with an unknown error", + false /*retryable*/)); + } + return std::move(*visitor.result); + } + + static ResolveAuthOutcome ResolveAuthScheme(const AuthSchemeOption& authSchemeOption, + const Aws::UnorderedMap& authSchemes) + { + + auto authSchemeIt = authSchemes.find(authSchemeOption.schemeId); + if (authSchemeIt == authSchemes.end()) + { + assert(!"Auth scheme has not been found for a given auth option!"); + return (SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, + "", + "Requested AuthSchemeOption was not found within client Auth Schemes", + false/*retryable*/)); + } + + const AuthSchemesVariantT& authScheme = authSchemeIt->second; + return {authScheme}; + } + static bool AdjustClockSkew(HttpResponseOutcome& outcome, const AuthSchemeOption& authSchemeOption, const Aws::UnorderedMap& authSchemes) { @@ -128,15 +151,14 @@ namespace smithy using DateTime = Aws::Utils::DateTime; DateTime serverTime = smithy::client::Utils::GetServerTimeFromError(outcome.GetError()); - auto authSchemeIt = authSchemes.find(authSchemeOption.schemeId); - if (authSchemeIt == authSchemes.end()) + auto authSchemeOutcome = ResolveAuthScheme(authSchemeOption, authSchemes); + if (!authSchemeOutcome.IsSuccess()) { - assert(!"Auth scheme has not been found for a given auth option!"); return false; } - AuthSchemesVariantT authScheme = authSchemeIt->second; ClockSkewVisitor visitor(outcome, serverTime, authSchemeOption); + AuthSchemesVariantT authScheme = authSchemeOutcome.GetResult().value(); authScheme.Visit(visitor); return visitor.m_resultShouldWait; @@ -228,6 +250,42 @@ namespace smithy } }; + struct SignEventMessageVistor + { + SignEventMessageVistor(Aws::Utils::Event::Message& message, Aws::String& seed, + const std::shared_ptr& ctx) + : m_requestContext(ctx), m_message(message), m_seed(seed) + { + } + + const std::shared_ptr& m_requestContext; + Aws::Utils::Event::Message& m_message; + Aws::String& m_seed; + + Aws::Crt::Optional result; + + template + void operator()(AuthSchemeAlternativeT& authScheme) + { + // Auth Scheme Variant alternative contains the requested auth option + assert(strcmp(authScheme.schemeId, m_requestContext->m_authSchemeOption.schemeId) == 0); + + using IdentityT = typename std::remove_reference::type::IdentityT; + using Signer = AwsSignerBase; + + std::shared_ptr signer = authScheme.signer(); + if (!signer) { + result.emplace(SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, + "", + "Auth scheme provided a nullptr signer", + false/*retryable*/)); + return; + } + result.emplace(signer->sign(m_message, m_seed, *static_cast(m_requestContext->m_awsIdentity.get()), + m_requestContext->m_authSchemeOption.signerProperties())); + } + }; + //for presigning, region and expiration can be passed in runtime struct PreSignerVisitor { explicit PreSignerVisitor(std::shared_ptr httpRequest, diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h b/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h index b5509539ad2..f4ec7ed157c 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h @@ -12,6 +12,7 @@ #include #include #include +#include namespace smithy { @@ -43,10 +44,12 @@ namespace smithy { using HttpRequest = Aws::Http::HttpRequest; using SigningError = Aws::Client::AWSError; using SigningFutureOutcome = Aws::Utils::FutureOutcome, SigningError>; + using SigningEventOutcome = Aws::Utils::Outcome; // signer may copy the original httpRequest or create a new one virtual SigningFutureOutcome sign(std::shared_ptr httpRequest, const IdentityT& identity, SigningProperties properties) = 0; virtual SigningFutureOutcome presign(std::shared_ptr httpRequest, const IdentityT& identity, SigningProperties properties, const Aws::String& region, const Aws::String& serviceName, long long expirationTimeInSeconds) = 0; + virtual SigningEventOutcome sign(Aws::Utils::Event::Message&, Aws::String&, const IdentityT&, SigningProperties) { return SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, "", "Failed to sign with a signer that doesn't support signing event messages", false /*retryable*/); }; virtual ~AwsSignerBase() {}; }; diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h index df405a63987..8657dc9f0fb 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -25,7 +26,8 @@ namespace smithy { explicit AwsSigV4Signer(const Aws::String& serviceName, const Aws::String& region) : m_serviceName(serviceName), m_region(region), - legacySigner(nullptr, serviceName.c_str(), region, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Always) + legacySigner(nullptr, serviceName.c_str(), region, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Always), + legacyEventStreamingSigner(nullptr, serviceName.c_str(), region) { } /* @@ -34,7 +36,8 @@ namespace smithy { explicit AwsSigV4Signer(const Aws::String& serviceName, const Aws::String& region, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy policy, bool urlEscapePath) : m_serviceName(serviceName), m_region(region), - legacySigner(nullptr, serviceName.c_str(), region, policy, urlEscapePath) + legacySigner(nullptr, serviceName.c_str(), region, policy, urlEscapePath), + legacyEventStreamingSigner(nullptr, serviceName.c_str(), region) { } @@ -63,7 +66,7 @@ namespace smithy { assert(httpRequest); - bool success = legacySigner.SignRequestWithCreds(*httpRequest, legacyCreds, region, svcName, signPayload); + bool success = httpRequest->HasEventStreamResponse() && httpRequest->IsEventStreamRequest() ? legacyEventStreamingSigner.SignRequestWithCreds(*httpRequest, legacyCreds, region, svcName, signPayload) : legacySigner.SignRequestWithCreds(*httpRequest, legacyCreds, region, svcName, signPayload); if (success) { return SigningFutureOutcome(std::move(httpRequest)); @@ -92,6 +95,26 @@ namespace smithy { false /*retryable*/)); } + SigningEventOutcome sign(Aws::Utils::Event::Message& msg, Aws::String& seed, const AwsCredentialIdentityBase& identity, SigningProperties properties) override { + AWS_UNREFERENCED_PARAM(properties); + const auto legacyCreds = [&identity]() -> Aws::Auth::AWSCredentials { + if(identity.sessionToken().has_value() && identity.expiration().has_value()) + { + return {identity.accessKeyId(), identity.secretAccessKey(), *identity.sessionToken(), *identity.expiration()}; + } + if(identity.sessionToken().has_value()) + { + return {identity.accessKeyId(), identity.secretAccessKey(), *identity.sessionToken()}; + } + return {identity.accessKeyId(), identity.secretAccessKey()}; + }(); + + if (legacyEventStreamingSigner.SignEventMessageWithCreds(msg, seed, legacyCreds)) { + return SigningEventOutcome(msg); + } + return SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, "", "sign failed", false /*retryable*/); + } + virtual ~AwsSigV4Signer() {}; protected: @@ -100,16 +123,17 @@ namespace smithy { bool urlEscapePath, Aws::Auth::AWSSigningAlgorithm signingAlgorithm ) : m_serviceName(serviceName), m_region(region), - legacySigner(credentialsProvider, serviceName.c_str(), region, policy, urlEscapePath, signingAlgorithm) + legacySigner(credentialsProvider, serviceName.c_str(), region, policy, urlEscapePath, signingAlgorithm), + legacyEventStreamingSigner(credentialsProvider, serviceName.c_str(), region) { } - const Aws::Client::AWSAuthV4Signer& getLegacySigner() const { - return legacySigner; - } + const Aws::Client::AWSAuthV4Signer& getLegacySigner() const { return legacySigner; } + protected: Aws::String m_serviceName; Aws::String m_region; Aws::Client::AWSAuthV4Signer legacySigner; + Aws::Client::AWSAuthEventStreamV4Signer legacyEventStreamingSigner; }; } diff --git a/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthEventStreamV4Signer.cpp b/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthEventStreamV4Signer.cpp index 619f122938b..cf39123eebf 100644 --- a/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthEventStreamV4Signer.cpp +++ b/src/aws-cpp-sdk-core/source/auth/signer/AWSAuthEventStreamV4Signer.cpp @@ -58,10 +58,13 @@ AWSAuthEventStreamV4Signer::AWSAuthEventStreamV4Signer(const std::shared_ptrGetAWSCredentials(); +bool AWSAuthEventStreamV4Signer::SignRequest(Aws::Http::HttpRequest& request, const char* region, const char* serviceName, bool /* signBody */) const { + AWSCredentials credentials = m_credentialsProvider->GetAWSCredentials(); + return SignRequestWithCreds(request, credentials, region, serviceName, false); +} +bool AWSAuthEventStreamV4Signer::SignRequestWithCreds(Http::HttpRequest& request, const Auth::AWSCredentials& credentials, const char* region, const char* serviceName, bool) const +{ //don't sign anonymous requests if (credentials.GetAWSAccessKeyId().empty() || credentials.GetAWSSecretKey().empty()) { @@ -158,8 +161,12 @@ static void WriteBigEndian(Aws::String& str, uint64_t n) } } -bool AWSAuthEventStreamV4Signer::SignEventMessage(Event::Message& message, Aws::String& priorSignature) const -{ +bool AWSAuthEventStreamV4Signer::SignEventMessage(Event::Message& message, Aws::String& priorSignature) const { + AWSCredentials credentials = m_credentialsProvider->GetAWSCredentials(); + return SignEventMessageWithCreds(message, priorSignature, credentials); +} + +bool AWSAuthEventStreamV4Signer::SignEventMessageWithCreds(Event::Message& message, Aws::String& priorSignature, const AWSCredentials& credentials) const { using Event::EventHeaderValue; Aws::StringStream stringToSign; @@ -214,13 +221,19 @@ bool AWSAuthEventStreamV4Signer::SignEventMessage(Event::Message& message, Aws:: Aws::String canonicalRequestString = stringToSign.str(); AWS_LOGSTREAM_TRACE(v4StreamingLogTag, "EventStream Event Canonical Request String: " << canonicalRequestString); - Aws::Utils::ByteBuffer finalSignatureDigest = GenerateSignature(m_credentialsProvider->GetAWSCredentials(), canonicalRequestString, simpleDate, m_region, m_serviceName); + if (credentials.IsEmpty()) { + AWS_LOGSTREAM_TRACE(v4StreamingLogTag, "EventStream Event Signing Event With Empty Credentials"); + } + Aws::Utils::ByteBuffer finalSignatureDigest = GenerateSignature(credentials, canonicalRequestString, simpleDate, m_region, m_serviceName); const auto finalSignature = HashingUtils::HexEncode(finalSignatureDigest); AWS_LOGSTREAM_DEBUG(v4StreamingLogTag, "Final computed signing hash: " << finalSignature); priorSignature = finalSignature; message.InsertEventHeader(EVENTSTREAM_DATE_HEADER, EventHeaderValue(now.Millis(), EventHeaderValue::EventHeaderType::TIMESTAMP)); message.InsertEventHeader(EVENTSTREAM_SIGNATURE_HEADER, std::move(finalSignatureDigest)); + for (auto&& header : message.GetEventHeaders()) { + AWS_LOG_TRACE(v4StreamingLogTag, "AWSAuthEventStreamV4Signer::SignEventMessageWithCreds - Header: %s", header.first.c_str()); + } AWS_LOGSTREAM_INFO(v4StreamingLogTag, "Event chunk final signature - " << finalSignature); return true; diff --git a/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp b/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp index 0d70b089e5c..117c8b42952 100644 --- a/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp +++ b/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp @@ -253,6 +253,7 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback, ResponseHandlerFunc&& responseHandler, + AuthResolvedCallback&& authCallback, std::shared_ptr pExecutor) const { if(!responseHandler) @@ -295,6 +296,7 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c pRequestCtx->m_requestInfo.maxAttempts = 0; pRequestCtx->m_interceptorContext = Aws::MakeShared(AWS_SMITHY_CLIENT_LOG, *request); pRequestCtx->m_responseHandler = std::move(responseHandler); + pRequestCtx->m_authResolvedCallback = std::move(authCallback); AttemptOneRequestAsync(std::move(pRequestCtx)); } @@ -328,6 +330,7 @@ void AwsSmithyClientBase::AttemptOneRequestAsync(std::shared_ptrm_responseHandler; + auto& authCallback = pRequestCtx->m_authResolvedCallback; auto pExecutor = pRequestCtx->m_pExecutor; //This is extracted here so that on retry with correct region, signer region override is honored @@ -384,7 +387,9 @@ void AwsSmithyClientBase::AttemptOneRequestAsync(std::shared_ptr([&]() -> SigningOutcome { return this->SignHttpRequest(pRequestCtx->m_httpRequest, *pRequestCtx); }, @@ -642,7 +647,8 @@ AwsSmithyClientBase::HttpResponseOutcome AwsSmithyClientBase::MakeRequestSync(Aws::AmazonWebServiceRequest const * const request, const char* requestName, Aws::Http::HttpMethod method, - EndpointUpdateCallback&& endpointCallback) const + EndpointUpdateCallback&& endpointCallback, + AuthResolvedCallback&& authCallback = nullptr) const { std::shared_ptr pExecutor = Aws::MakeShared(AWS_SMITHY_CLIENT_LOG); assert(pExecutor); @@ -655,7 +661,7 @@ AwsSmithyClientBase::MakeRequestSync(Aws::AmazonWebServiceRequest const * const pExecutor->Submit([&]() { - this->MakeRequestAsync(request, requestName, method, std::move(endpointCallback), std::move(responseHandler), pExecutor); + this->MakeRequestAsync(request, requestName, method, std::move(endpointCallback), std::move(responseHandler), std::move(authCallback), pExecutor); }); pExecutor->WaitUntilStopped(); diff --git a/src/aws-cpp-sdk-core/source/utils/event/EventStreamEncoder.cpp b/src/aws-cpp-sdk-core/source/utils/event/EventStreamEncoder.cpp index 97a48ac40b9..edc921e8a2d 100644 --- a/src/aws-cpp-sdk-core/source/utils/event/EventStreamEncoder.cpp +++ b/src/aws-cpp-sdk-core/source/utils/event/EventStreamEncoder.cpp @@ -146,9 +146,7 @@ namespace Aws const auto msglen = aws_event_stream_message_total_length(payload); signedMessage.WriteEventPayload(msgbuf, msglen); } - - assert(m_signer); - if (m_signer->SignEventMessage(signedMessage, m_signatureSeed)) + if (m_signingCallback(signedMessage, m_signatureSeed)) { aws_array_list headers; EncodeHeaders(signedMessage, &headers); diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/JsonCppClientGenerator.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/JsonCppClientGenerator.java index b5f9f3d625f..c223925631d 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/JsonCppClientGenerator.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/JsonCppClientGenerator.java @@ -153,7 +153,7 @@ else if (shape.isResult()) { @Override protected SdkFileEntry generateClientHeaderFile(final ServiceModel serviceModel) throws Exception { - if (serviceModel.isUseSmithyClient() && !serviceModel.hasEventStreamingRequestShapes()) { + if (serviceModel.isUseSmithyClient()) { return generateClientSmithyHeaderFile(serviceModel); } @@ -175,7 +175,7 @@ protected List generateClientSourceFile( List servic return serviceModelsIndices.stream().map(index -> { - if(serviceModels.get(index).isUseSmithyClient() && !serviceModels.get(index).hasEventStreamingRequestShapes()) + if(serviceModels.get(index).isUseSmithyClient()) { return GenerateSmithyClientSourceFile(serviceModels.get(index), index, Optional.empty()); } diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientHeader.vm index 7d9e54e533d..da58148a090 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientHeader.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientHeader.vm @@ -49,7 +49,7 @@ namespace ${serviceNamespace} #set($finalClass = "") #end class ${CppViewHelper.computeExportValue($metadata.classNamePrefix)} ${className}${finalClass} : Aws::Client::ClientWithAsyncTemplateMethods<${className}>, - smithy::client::AwsSmithyClientT<${rootNamespace}::${serviceNamespace}::SERVICE_NAME, + public smithy::client::AwsSmithyClientT<${rootNamespace}::${serviceNamespace}::SERVICE_NAME, ${serviceConfiguration}, smithy::AuthSchemeResolverBase<>, ${rootNamespace}::Crt::Variant<${AuthSchemeVariants}>, diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm index a85295c21d9..0e0db24fa85 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm @@ -1,7 +1,4 @@ #set($indent = " ") -#if($operation.request.shape.hasEventStreamMembers()) -${indent}streamReadySemaphore->ReleaseAll(); -#end #parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm") #if($metadata.hasEndpointDiscoveryTrait) #if($operation.hasEndpointDiscoveryTrait) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm index 572f6812d92..d939a598215 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm @@ -6,24 +6,16 @@ void ${className}::${operation.name}Async(Model::${operation.request.shape.name} AWS_ASYNC_OPERATION_GUARD(${operation.name}); #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceClientOperationsEndpointPrepareCommonBody.vm") #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/common/ServiceClientOperationRequestRequiredMemberValidate.vm") -#parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm") #if($operation.result && $operation.result.shape.hasEventStreamMembers()) - request.SetResponseStreamFactory( - [&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); } - ); - if (!request.GetHeadersReceivedEventHandler()) { - request.SetHeadersReceivedEventHandler([&request](const Http::HttpRequest*, Http::HttpResponse* response) { - AWS_CHECK_PTR("${operation.name}", response); - if (const auto initialResponseHandler = request.GetEventStreamHandler().GetInitialResponseCallbackEx()) { - initialResponseHandler({response->GetHeaders()}, Utils::Event::InitialResponseType::ON_RESPONSE); - } - }); - } + auto endpointCallback = [ & #if($hasEndPointOverrides) , endpointOverrides #end](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + #parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm") + }; #else - JsonOutcome outcome = MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_${operation.http.method}, - [ & #if($hasEndPointOverrides) , endpointOverrides #end](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { -#parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm") - }) + auto endpointCallback = [ & #if($hasEndPointOverrides) , endpointOverrides #end](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + #parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm") + }; + JsonOutcome outcome = MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_${operation.http.method}, + endpointCallback) #end #set($streamModelName = '') @@ -36,25 +28,25 @@ void ${className}::${operation.name}Async(Model::${operation.request.shape.name} #end #set($streamModelNameWithFirstLetterCapitalized = $CppViewHelper.capitalizeFirstChar($streamModelName)) auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); + auto authCallback = [&](std::shared_ptr ctx) -> void { + eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Event::Message& message, Aws::String& seed) -> bool { + auto outcome = SignEventMessage(message, seed, ctx); + return outcome.IsSuccess(); + }); + }; + auto requestCopy = Aws::MakeShared<${operation.request.shape.name}>("${operation.name}", request); + requestCopy->Set${streamModelNameWithFirstLetterCapitalized}(eventEncoderStream); // this becomes the body of the request request.Set${streamModelNameWithFirstLetterCapitalized}(eventEncoderStream); // this becomes the body of the request - auto streamReadySemaphore = Aws::MakeShared(ALLOCATION_TAG, 0, 1); - m_clientConfiguration.executor->Submit([this, &request, handler, handlerContext, #if($hasEndPointOverrides) endpointOverrides #end, eventEncoderStream, streamReadySemaphore] () mutable { - JsonOutcome outcome = MakeEventStreamRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_${operation.http.method}, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { -#parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointClosure.vm") - }, - eventEncoderStream - ); - if(outcome.IsSuccess()) - { - handler(this, request, ${operation.name}Outcome(NoResult()), handlerContext); - } - else - { - request.Get${streamModelNameWithFirstLetterCapitalized}()->Close(); - handler(this, request, ${operation.name}Outcome(outcome.GetError()), handlerContext); - } - return ${operation.name}Outcome(NoResult()); - }); - streamReadySemaphore->WaitOne(); - streamReadyHandler(*request.Get${streamModelNameWithFirstLetterCapitalized}()); + + auto asyncTask = CreateSmithyBidirectionalEventStreamTask<${operation.name}Outcome>(this, + requestCopy, + handler, + handlerContext, + eventEncoderStream, + endpointCallback, + authCallback); + auto sem = asyncTask.GetSemaphore(); + m_clientConfiguration.executor->Submit(std::move(asyncTask)); + sem->WaitOne(); + streamReadyHandler(*eventEncoderStream); } diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm index a4afd49fb06..824600cfedb 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm @@ -1,6 +1,9 @@ #foreach($operation in $serviceModel.operations) #set($hasEndPointOverrides = false) ## todo: add support for request stream +#if($operation.request.shape.hasEventStreamMembers()) +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm") +#else #if($operation.result.shape.hasEventStreamMembers()) #set($constText = "") #else @@ -35,4 +38,5 @@ Aws::Utils::Outcome ${className}::${pr Aws::Utils::StringUtils::Replace(url, "http://", ""); return url; } +#end ## #if($operation.request.shape.hasEventStreamMembers()) #end \ No newline at end of file diff --git a/tools/scripts/codegen/legacy_c2j_cpp_gen.py b/tools/scripts/codegen/legacy_c2j_cpp_gen.py index 6cc0d76ac87..2117a1b86b3 100644 --- a/tools/scripts/codegen/legacy_c2j_cpp_gen.py +++ b/tools/scripts/codegen/legacy_c2j_cpp_gen.py @@ -22,7 +22,11 @@ SMITHY_SUPPORTED_CLIENTS = [ "dynamodb", - #"s3" + "bedrock", + "bedrock-runtime", + "bedrock-agent", + "bedrock-agent-runtime", + #"s3", ] # Default configuration variables From 17af789485a697f0f8ec0769545dee6b8d7d371d Mon Sep 17 00:00:00 2001 From: sbaluja Date: Mon, 29 Dec 2025 19:03:37 -0500 Subject: [PATCH 2/4] Migrate bedrock clients to smithy --- .../BedrockAgentRuntimeClient.h | 21 +- .../source/BedrockAgentRuntimeClient.cpp | 892 +++---- .../aws/bedrock-agent/BedrockAgentClient.h | 22 +- .../source/BedrockAgentClient.cpp | 1953 ++++++-------- .../bedrock-runtime/BedrockRuntimeClient.h | 35 +- .../BedrockRuntimeServiceClientModel.h | 1 + .../source/BedrockRuntimeClient.cpp | 429 ++- .../include/aws/bedrock/BedrockClient.h | 33 +- .../aws/bedrock/BedrockServiceClientModel.h | 1 + .../source/BedrockClient.cpp | 2328 +++++++---------- 10 files changed, 2320 insertions(+), 3395 deletions(-) diff --git a/generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/BedrockAgentRuntimeClient.h b/generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/BedrockAgentRuntimeClient.h index 7cec9e55fdd..5dcebe0e0db 100644 --- a/generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/BedrockAgentRuntimeClient.h +++ b/generated/src/aws-cpp-sdk-bedrock-agent-runtime/include/aws/bedrock-agent-runtime/BedrockAgentRuntimeClient.h @@ -4,26 +4,33 @@ */ #pragma once +#include #include #include -#include #include #include -#include +#include +#include +#include +#include namespace Aws { namespace BedrockAgentRuntime { +AWS_BEDROCKAGENTRUNTIME_API extern const char SERVICE_NAME[]; /** *

Contains APIs related to model invocation and querying of knowledge * bases.

*/ class AWS_BEDROCKAGENTRUNTIME_API BedrockAgentRuntimeClient - : public Aws::Client::AWSJsonClient, - public Aws::Client::ClientWithAsyncTemplateMethods { + : Aws::Client::ClientWithAsyncTemplateMethods, + public smithy::client::AwsSmithyClientT< + Aws::BedrockAgentRuntime::SERVICE_NAME, Aws::BedrockAgentRuntime::BedrockAgentRuntimeClientConfiguration, + smithy::AuthSchemeResolverBase<>, Aws::Crt::Variant, BedrockAgentRuntimeEndpointProviderBase, + smithy::client::JsonOutcomeSerializer, smithy::client::JsonOutcome, Aws::Client::BedrockAgentRuntimeErrorMarshaller> { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "Bedrock Agent Runtime"; } typedef BedrockAgentRuntimeClientConfiguration ClientConfigurationType; typedef BedrockAgentRuntimeEndpointProvider EndpointProviderType; @@ -1058,10 +1065,6 @@ class AWS_BEDROCKAGENTRUNTIME_API BedrockAgentRuntimeClient private: friend class Aws::Client::ClientWithAsyncTemplateMethods; - void init(const BedrockAgentRuntimeClientConfiguration& clientConfiguration); - - BedrockAgentRuntimeClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace BedrockAgentRuntime diff --git a/generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/BedrockAgentRuntimeClient.cpp b/generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/BedrockAgentRuntimeClient.cpp index 6066fec726c..0cd3e4b6623 100644 --- a/generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/BedrockAgentRuntimeClient.cpp +++ b/generated/src/aws-cpp-sdk-bedrock-agent-runtime/source/BedrockAgentRuntimeClient.cpp @@ -37,21 +37,21 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include +#include +#include +#include #include using namespace Aws; @@ -66,8 +66,8 @@ using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; namespace Aws { namespace BedrockAgentRuntime { -const char SERVICE_NAME[] = "bedrock"; const char ALLOCATION_TAG[] = "BedrockAgentRuntimeClient"; +const char SERVICE_NAME[] = "bedrock"; } // namespace BedrockAgentRuntime } // namespace Aws const char* BedrockAgentRuntimeClient::GetServiceName() { return SERVICE_NAME; } @@ -75,104 +75,99 @@ const char* BedrockAgentRuntimeClient::GetAllocationTag() { return ALLOCATION_TA BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const BedrockAgentRuntime::BedrockAgentRuntimeClientConfiguration& clientConfiguration, std::shared_ptr endpointProvider) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) - : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + }) {} BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const BedrockAgentRuntime::BedrockAgentRuntimeClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) - : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const BedrockAgentRuntime::BedrockAgentRuntimeClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) - : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* Legacy constructors due deprecation */ BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT(clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared( + ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentRuntimeClient::BedrockAgentRuntimeClient(const std::shared_ptr& credentialsProvider, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} - + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* End of legacy constructors due deprecation */ + BedrockAgentRuntimeClient::~BedrockAgentRuntimeClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& BedrockAgentRuntimeClient::accessEndpointProvider() { return m_endpointProvider; } -void BedrockAgentRuntimeClient::init(const BedrockAgentRuntime::BedrockAgentRuntimeClientConfiguration& config) { - AWSClient::SetServiceClientName("Bedrock Agent Runtime"); - if (!m_clientConfiguration.executor) { - if (!m_clientConfiguration.configFactories.executorCreateFn()) { - AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); - m_isInitialized = false; - return; - } - m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); - } - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config, "bedrock"); -} - void BedrockAgentRuntimeClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_clientConfiguration.endpointOverride = endpoint; m_endpointProvider->OverrideEndpoint(endpoint); } - CreateInvocationOutcome BedrockAgentRuntimeClient::CreateInvocation(const CreateInvocationRequest& request) const { AWS_OPERATION_GUARD(CreateInvocation); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateInvocation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); @@ -181,9 +176,9 @@ CreateInvocationOutcome BedrockAgentRuntimeClient::CreateInvocation(const Create return CreateInvocationOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateInvocation, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateInvocation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateInvocation, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateInvocation", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -192,18 +187,12 @@ CreateInvocationOutcome BedrockAgentRuntimeClient::CreateInvocation(const Create smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateInvocationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateInvocation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invocations/"); - return CreateInvocationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateInvocationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + resolvedEndpoint.AddPathSegments("/invocations/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -213,9 +202,9 @@ CreateInvocationOutcome BedrockAgentRuntimeClient::CreateInvocation(const Create CreateSessionOutcome BedrockAgentRuntimeClient::CreateSession(const CreateSessionRequest& request) const { AWS_OPERATION_GUARD(CreateSession); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateSession", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -224,16 +213,9 @@ CreateSessionOutcome BedrockAgentRuntimeClient::CreateSession(const CreateSessio smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateSessionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - return CreateSessionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateSessionOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/sessions/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -253,9 +235,9 @@ DeleteAgentMemoryOutcome BedrockAgentRuntimeClient::DeleteAgentMemory(const Dele return DeleteAgentMemoryOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAgentMemory", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -264,20 +246,15 @@ DeleteAgentMemoryOutcome BedrockAgentRuntimeClient::DeleteAgentMemory(const Dele smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAgentMemoryOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAgentMemory, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentAliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/memories"); - return DeleteAgentMemoryOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteAgentMemoryOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentAliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + resolvedEndpoint.AddPathSegments("/memories"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -292,9 +269,9 @@ DeleteSessionOutcome BedrockAgentRuntimeClient::DeleteSession(const DeleteSessio return DeleteSessionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteSession, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteSession, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteSession, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteSession", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -303,17 +280,11 @@ DeleteSessionOutcome BedrockAgentRuntimeClient::DeleteSession(const DeleteSessio smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteSessionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - return DeleteSessionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -328,9 +299,9 @@ EndSessionOutcome BedrockAgentRuntimeClient::EndSession(const EndSessionRequest& return EndSessionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, EndSession, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, EndSession, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, EndSession, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".EndSession", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -339,17 +310,11 @@ EndSessionOutcome BedrockAgentRuntimeClient::EndSession(const EndSessionRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> EndSessionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, EndSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - return EndSessionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + return EndSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -359,9 +324,9 @@ EndSessionOutcome BedrockAgentRuntimeClient::EndSession(const EndSessionRequest& GenerateQueryOutcome BedrockAgentRuntimeClient::GenerateQuery(const GenerateQueryRequest& request) const { AWS_OPERATION_GUARD(GenerateQuery); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GenerateQuery, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GenerateQuery, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GenerateQuery, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GenerateQuery, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GenerateQuery", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -370,16 +335,9 @@ GenerateQueryOutcome BedrockAgentRuntimeClient::GenerateQuery(const GenerateQuer smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GenerateQueryOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GenerateQuery, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/generateQuery"); - return GenerateQueryOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return GenerateQueryOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/generateQuery"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -409,9 +367,9 @@ GetAgentMemoryOutcome BedrockAgentRuntimeClient::GetAgentMemory(const GetAgentMe return GetAgentMemoryOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [MemoryType]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentMemory, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentMemory", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -420,20 +378,14 @@ GetAgentMemoryOutcome BedrockAgentRuntimeClient::GetAgentMemory(const GetAgentMe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentMemoryOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentMemory, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentAliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/memories"); - return GetAgentMemoryOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentMemoryOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentAliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + resolvedEndpoint.AddPathSegments("/memories"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -458,9 +410,9 @@ GetExecutionFlowSnapshotOutcome BedrockAgentRuntimeClient::GetExecutionFlowSnaps return GetExecutionFlowSnapshotOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetExecutionFlowSnapshot, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetExecutionFlowSnapshot, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetExecutionFlowSnapshot, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetExecutionFlowSnapshot", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -469,22 +421,17 @@ GetExecutionFlowSnapshotOutcome BedrockAgentRuntimeClient::GetExecutionFlowSnaps smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetExecutionFlowSnapshotOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetExecutionFlowSnapshot, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetExecutionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flowsnapshot"); - return GetExecutionFlowSnapshotOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetExecutionFlowSnapshotOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + resolvedEndpoint.AddPathSegments("/executions/"); + resolvedEndpoint.AddPathSegment(request.GetExecutionIdentifier()); + resolvedEndpoint.AddPathSegments("/flowsnapshot"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -509,9 +456,9 @@ GetFlowExecutionOutcome BedrockAgentRuntimeClient::GetFlowExecution(const GetFlo return GetFlowExecutionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFlowExecution", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -520,21 +467,15 @@ GetFlowExecutionOutcome BedrockAgentRuntimeClient::GetFlowExecution(const GetFlo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFlowExecutionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFlowExecution, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetExecutionIdentifier()); - return GetFlowExecutionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetFlowExecutionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + resolvedEndpoint.AddPathSegments("/executions/"); + resolvedEndpoint.AddPathSegment(request.GetExecutionIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -554,9 +495,9 @@ GetInvocationStepOutcome BedrockAgentRuntimeClient::GetInvocationStep(const GetI return GetInvocationStepOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetInvocationStep", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -565,19 +506,13 @@ GetInvocationStepOutcome BedrockAgentRuntimeClient::GetInvocationStep(const GetI smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetInvocationStepOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetInvocationStep, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invocationSteps/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetInvocationStepId()); - return GetInvocationStepOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return GetInvocationStepOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + resolvedEndpoint.AddPathSegments("/invocationSteps/"); + resolvedEndpoint.AddPathSegment(request.GetInvocationStepId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -592,9 +527,9 @@ GetSessionOutcome BedrockAgentRuntimeClient::GetSession(const GetSessionRequest& return GetSessionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetSession, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetSession, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetSession, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetSession", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -603,17 +538,11 @@ GetSessionOutcome BedrockAgentRuntimeClient::GetSession(const GetSessionRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetSessionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - return GetSessionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -638,9 +567,9 @@ InvokeAgentOutcome BedrockAgentRuntimeClient::InvokeAgent(InvokeAgentRequest& re return InvokeAgentOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, InvokeAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, InvokeAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, InvokeAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".InvokeAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -649,20 +578,6 @@ InvokeAgentOutcome BedrockAgentRuntimeClient::InvokeAgent(InvokeAgentRequest& re smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> InvokeAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, InvokeAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentAliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/text"); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -675,7 +590,16 @@ InvokeAgentOutcome BedrockAgentRuntimeClient::InvokeAgent(InvokeAgentRequest& re } }); } - return InvokeAgentOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return InvokeAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentAliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionId()); + resolvedEndpoint.AddPathSegments("/text"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -695,9 +619,9 @@ InvokeFlowOutcome BedrockAgentRuntimeClient::InvokeFlow(InvokeFlowRequest& reque return InvokeFlowOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, InvokeFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, InvokeFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, InvokeFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".InvokeFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -706,17 +630,6 @@ InvokeFlowOutcome BedrockAgentRuntimeClient::InvokeFlow(InvokeFlowRequest& reque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> InvokeFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, InvokeFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -729,7 +642,13 @@ InvokeFlowOutcome BedrockAgentRuntimeClient::InvokeFlow(InvokeFlowRequest& reque } }); } - return InvokeFlowOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return InvokeFlowOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -744,9 +663,9 @@ InvokeInlineAgentOutcome BedrockAgentRuntimeClient::InvokeInlineAgent(InvokeInli return InvokeInlineAgentOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, InvokeInlineAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, InvokeInlineAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, InvokeInlineAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".InvokeInlineAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -755,15 +674,6 @@ InvokeInlineAgentOutcome BedrockAgentRuntimeClient::InvokeInlineAgent(InvokeInli smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> InvokeInlineAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, InvokeInlineAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionId()); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -776,7 +686,11 @@ InvokeInlineAgentOutcome BedrockAgentRuntimeClient::InvokeInlineAgent(InvokeInli } }); } - return InvokeInlineAgentOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return InvokeInlineAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetSessionId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -806,9 +720,9 @@ ListFlowExecutionEventsOutcome BedrockAgentRuntimeClient::ListFlowExecutionEvent return ListFlowExecutionEventsOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFlowExecutionEvents, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFlowExecutionEvents, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFlowExecutionEvents, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFlowExecutionEvents", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -817,22 +731,17 @@ ListFlowExecutionEventsOutcome BedrockAgentRuntimeClient::ListFlowExecutionEvent smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFlowExecutionEventsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFlowExecutionEvents, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetExecutionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/events"); - return ListFlowExecutionEventsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFlowExecutionEventsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + resolvedEndpoint.AddPathSegments("/executions/"); + resolvedEndpoint.AddPathSegment(request.GetExecutionIdentifier()); + resolvedEndpoint.AddPathSegments("/events"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -847,9 +756,9 @@ ListFlowExecutionsOutcome BedrockAgentRuntimeClient::ListFlowExecutions(const Li return ListFlowExecutionsOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFlowExecutions, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFlowExecutions, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFlowExecutions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFlowExecutions", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -858,18 +767,12 @@ ListFlowExecutionsOutcome BedrockAgentRuntimeClient::ListFlowExecutions(const Li smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFlowExecutionsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFlowExecutions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions"); - return ListFlowExecutionsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFlowExecutionsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/executions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -884,9 +787,9 @@ ListInvocationStepsOutcome BedrockAgentRuntimeClient::ListInvocationSteps(const return ListInvocationStepsOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListInvocationSteps, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListInvocationSteps, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListInvocationSteps, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListInvocationSteps", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -895,18 +798,13 @@ ListInvocationStepsOutcome BedrockAgentRuntimeClient::ListInvocationSteps(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListInvocationStepsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListInvocationSteps, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invocationSteps/"); - return ListInvocationStepsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListInvocationStepsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + resolvedEndpoint.AddPathSegments("/invocationSteps/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -921,9 +819,9 @@ ListInvocationsOutcome BedrockAgentRuntimeClient::ListInvocations(const ListInvo return ListInvocationsOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListInvocations, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListInvocations, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListInvocations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListInvocations", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -932,18 +830,12 @@ ListInvocationsOutcome BedrockAgentRuntimeClient::ListInvocations(const ListInvo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListInvocationsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListInvocations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invocations/"); - return ListInvocationsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListInvocationsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + resolvedEndpoint.AddPathSegments("/invocations/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -953,9 +845,9 @@ ListInvocationsOutcome BedrockAgentRuntimeClient::ListInvocations(const ListInvo ListSessionsOutcome BedrockAgentRuntimeClient::ListSessions(const ListSessionsRequest& request) const { AWS_OPERATION_GUARD(ListSessions); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListSessions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListSessions, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListSessions, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListSessions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListSessions", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -964,16 +856,9 @@ ListSessionsOutcome BedrockAgentRuntimeClient::ListSessions(const ListSessionsRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListSessionsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListSessions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - return ListSessionsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListSessionsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/sessions/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -988,9 +873,9 @@ ListTagsForResourceOutcome BedrockAgentRuntimeClient::ListTagsForResource(const return ListTagsForResourceOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListTagsForResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -999,17 +884,11 @@ ListTagsForResourceOutcome BedrockAgentRuntimeClient::ListTagsForResource(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListTagsForResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return ListTagsForResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListTagsForResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1019,9 +898,9 @@ ListTagsForResourceOutcome BedrockAgentRuntimeClient::ListTagsForResource(const OptimizePromptOutcome BedrockAgentRuntimeClient::OptimizePrompt(OptimizePromptRequest& request) const { AWS_OPERATION_GUARD(OptimizePrompt); AWS_OPERATION_CHECK_PTR(m_endpointProvider, OptimizePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, OptimizePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, OptimizePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, OptimizePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".OptimizePrompt", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1030,14 +909,6 @@ OptimizePromptOutcome BedrockAgentRuntimeClient::OptimizePrompt(OptimizePromptRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> OptimizePromptOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, OptimizePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/optimize-prompt"); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -1050,7 +921,9 @@ OptimizePromptOutcome BedrockAgentRuntimeClient::OptimizePrompt(OptimizePromptRe } }); } - return OptimizePromptOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return OptimizePromptOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/optimize-prompt"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1065,9 +938,9 @@ PutInvocationStepOutcome BedrockAgentRuntimeClient::PutInvocationStep(const PutI return PutInvocationStepOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PutInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutInvocationStep, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutInvocationStep", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1076,18 +949,12 @@ PutInvocationStepOutcome BedrockAgentRuntimeClient::PutInvocationStep(const PutI smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PutInvocationStepOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PutInvocationStep, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invocationSteps/"); - return PutInvocationStepOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return PutInvocationStepOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + resolvedEndpoint.AddPathSegments("/invocationSteps/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1097,9 +964,9 @@ PutInvocationStepOutcome BedrockAgentRuntimeClient::PutInvocationStep(const PutI RerankOutcome BedrockAgentRuntimeClient::Rerank(const RerankRequest& request) const { AWS_OPERATION_GUARD(Rerank); AWS_OPERATION_CHECK_PTR(m_endpointProvider, Rerank, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, Rerank, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, Rerank, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, Rerank, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".Rerank", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1108,16 +975,9 @@ RerankOutcome BedrockAgentRuntimeClient::Rerank(const RerankRequest& request) co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> RerankOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, Rerank, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/rerank"); - return RerankOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return RerankOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/rerank"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1132,9 +992,9 @@ RetrieveOutcome BedrockAgentRuntimeClient::Retrieve(const RetrieveRequest& reque return RetrieveOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, Retrieve, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, Retrieve, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, Retrieve, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".Retrieve", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1143,18 +1003,12 @@ RetrieveOutcome BedrockAgentRuntimeClient::Retrieve(const RetrieveRequest& reque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> RetrieveOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, Retrieve, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrieve"); - return RetrieveOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return RetrieveOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/retrieve"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1164,9 +1018,9 @@ RetrieveOutcome BedrockAgentRuntimeClient::Retrieve(const RetrieveRequest& reque RetrieveAndGenerateOutcome BedrockAgentRuntimeClient::RetrieveAndGenerate(const RetrieveAndGenerateRequest& request) const { AWS_OPERATION_GUARD(RetrieveAndGenerate); AWS_OPERATION_CHECK_PTR(m_endpointProvider, RetrieveAndGenerate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RetrieveAndGenerate, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, RetrieveAndGenerate, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RetrieveAndGenerate, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RetrieveAndGenerate", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1175,16 +1029,9 @@ RetrieveAndGenerateOutcome BedrockAgentRuntimeClient::RetrieveAndGenerate(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> RetrieveAndGenerateOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, RetrieveAndGenerate, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrieveAndGenerate"); - return RetrieveAndGenerateOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return RetrieveAndGenerateOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/retrieveAndGenerate"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1194,9 +1041,9 @@ RetrieveAndGenerateOutcome BedrockAgentRuntimeClient::RetrieveAndGenerate(const RetrieveAndGenerateStreamOutcome BedrockAgentRuntimeClient::RetrieveAndGenerateStream(RetrieveAndGenerateStreamRequest& request) const { AWS_OPERATION_GUARD(RetrieveAndGenerateStream); AWS_OPERATION_CHECK_PTR(m_endpointProvider, RetrieveAndGenerateStream, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RetrieveAndGenerateStream, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, RetrieveAndGenerateStream, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RetrieveAndGenerateStream, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RetrieveAndGenerateStream", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1205,14 +1052,6 @@ RetrieveAndGenerateStreamOutcome BedrockAgentRuntimeClient::RetrieveAndGenerateS smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> RetrieveAndGenerateStreamOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, RetrieveAndGenerateStream, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrieveAndGenerateStream"); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -1225,8 +1064,9 @@ RetrieveAndGenerateStreamOutcome BedrockAgentRuntimeClient::RetrieveAndGenerateS } }); } - return RetrieveAndGenerateStreamOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return RetrieveAndGenerateStreamOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/retrieveAndGenerateStream"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1246,9 +1086,9 @@ StartFlowExecutionOutcome BedrockAgentRuntimeClient::StartFlowExecution(const St return StartFlowExecutionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StartFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartFlowExecution", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1257,20 +1097,14 @@ StartFlowExecutionOutcome BedrockAgentRuntimeClient::StartFlowExecution(const St smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StartFlowExecutionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartFlowExecution, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions"); - return StartFlowExecutionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StartFlowExecutionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + resolvedEndpoint.AddPathSegments("/executions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1295,9 +1129,9 @@ StopFlowExecutionOutcome BedrockAgentRuntimeClient::StopFlowExecution(const Stop return StopFlowExecutionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StopFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StopFlowExecution, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopFlowExecution", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1306,22 +1140,16 @@ StopFlowExecutionOutcome BedrockAgentRuntimeClient::StopFlowExecution(const Stop smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StopFlowExecutionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StopFlowExecution, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowAliasIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/executions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetExecutionIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stop"); - return StopFlowExecutionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StopFlowExecutionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetFlowAliasIdentifier()); + resolvedEndpoint.AddPathSegments("/executions/"); + resolvedEndpoint.AddPathSegment(request.GetExecutionIdentifier()); + resolvedEndpoint.AddPathSegments("/stop"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1336,9 +1164,9 @@ TagResourceOutcome BedrockAgentRuntimeClient::TagResource(const TagResourceReque return TagResourceOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".TagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1347,17 +1175,11 @@ TagResourceOutcome BedrockAgentRuntimeClient::TagResource(const TagResourceReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> TagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return TagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return TagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1377,9 +1199,9 @@ UntagResourceOutcome BedrockAgentRuntimeClient::UntagResource(const UntagResourc return UntagResourceOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UntagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1388,17 +1210,11 @@ UntagResourceOutcome BedrockAgentRuntimeClient::UntagResource(const UntagResourc smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UntagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return UntagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return UntagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1413,9 +1229,9 @@ UpdateSessionOutcome BedrockAgentRuntimeClient::UpdateSession(const UpdateSessio return UpdateSessionOutcome(Aws::Client::AWSError( BedrockAgentRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [SessionIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateSession, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateSession", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1424,17 +1240,11 @@ UpdateSessionOutcome BedrockAgentRuntimeClient::UpdateSession(const UpdateSessio smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateSessionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateSession, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/sessions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetSessionIdentifier()); - return UpdateSessionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateSessionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/sessions/"); + resolvedEndpoint.AddPathSegment(request.GetSessionIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, diff --git a/generated/src/aws-cpp-sdk-bedrock-agent/include/aws/bedrock-agent/BedrockAgentClient.h b/generated/src/aws-cpp-sdk-bedrock-agent/include/aws/bedrock-agent/BedrockAgentClient.h index 6626ccc18de..c36a09999dc 100644 --- a/generated/src/aws-cpp-sdk-bedrock-agent/include/aws/bedrock-agent/BedrockAgentClient.h +++ b/generated/src/aws-cpp-sdk-bedrock-agent/include/aws/bedrock-agent/BedrockAgentClient.h @@ -4,25 +4,33 @@ */ #pragma once +#include #include #include -#include #include #include -#include +#include +#include +#include +#include namespace Aws { namespace BedrockAgent { +AWS_BEDROCKAGENT_API extern const char SERVICE_NAME[]; /** *

Describes the API operations for creating and managing Amazon Bedrock * agents.

*/ -class AWS_BEDROCKAGENT_API BedrockAgentClient : public Aws::Client::AWSJsonClient, - public Aws::Client::ClientWithAsyncTemplateMethods { +class AWS_BEDROCKAGENT_API BedrockAgentClient + : Aws::Client::ClientWithAsyncTemplateMethods, + public smithy::client::AwsSmithyClientT, Aws::Crt::Variant, + BedrockAgentEndpointProviderBase, smithy::client::JsonOutcomeSerializer, + smithy::client::JsonOutcome, Aws::Client::BedrockAgentErrorMarshaller> { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "Bedrock Agent"; } typedef BedrockAgentClientConfiguration ClientConfigurationType; typedef BedrockAgentEndpointProvider EndpointProviderType; @@ -2175,10 +2183,6 @@ class AWS_BEDROCKAGENT_API BedrockAgentClient : public Aws::Client::AWSJsonClien private: friend class Aws::Client::ClientWithAsyncTemplateMethods; - void init(const BedrockAgentClientConfiguration& clientConfiguration); - - BedrockAgentClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace BedrockAgent diff --git a/generated/src/aws-cpp-sdk-bedrock-agent/source/BedrockAgentClient.cpp b/generated/src/aws-cpp-sdk-bedrock-agent/source/BedrockAgentClient.cpp index 1b086523fb6..0b6eed4ed1a 100644 --- a/generated/src/aws-cpp-sdk-bedrock-agent/source/BedrockAgentClient.cpp +++ b/generated/src/aws-cpp-sdk-bedrock-agent/source/BedrockAgentClient.cpp @@ -78,20 +78,20 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include +#include +#include +#include #include using namespace Aws; @@ -106,8 +106,8 @@ using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; namespace Aws { namespace BedrockAgent { -const char SERVICE_NAME[] = "bedrock"; const char ALLOCATION_TAG[] = "BedrockAgentClient"; +const char SERVICE_NAME[] = "bedrock"; } // namespace BedrockAgent } // namespace Aws const char* BedrockAgentClient::GetServiceName() { return SERVICE_NAME; } @@ -115,100 +115,96 @@ const char* BedrockAgentClient::GetAllocationTag() { return ALLOCATION_TAG; } BedrockAgentClient::BedrockAgentClient(const BedrockAgent::BedrockAgentClientConfiguration& clientConfiguration, std::shared_ptr endpointProvider) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + }) {} BedrockAgentClient::BedrockAgentClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const BedrockAgent::BedrockAgentClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentClient::BedrockAgentClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const BedrockAgent::BedrockAgentClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* Legacy constructors due deprecation */ BedrockAgentClient::BedrockAgentClient(const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT(clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared( + ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentClient::BedrockAgentClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockAgentClient::BedrockAgentClient(const std::shared_ptr& credentialsProvider, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} - + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Agent", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* End of legacy constructors due deprecation */ + BedrockAgentClient::~BedrockAgentClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& BedrockAgentClient::accessEndpointProvider() { return m_endpointProvider; } -void BedrockAgentClient::init(const BedrockAgent::BedrockAgentClientConfiguration& config) { - AWSClient::SetServiceClientName("Bedrock Agent"); - if (!m_clientConfiguration.executor) { - if (!m_clientConfiguration.configFactories.executorCreateFn()) { - AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); - m_isInitialized = false; - return; - } - m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); - } - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config, "bedrock"); -} - void BedrockAgentClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_clientConfiguration.endpointOverride = endpoint; m_endpointProvider->OverrideEndpoint(endpoint); } - AssociateAgentCollaboratorOutcome BedrockAgentClient::AssociateAgentCollaborator(const AssociateAgentCollaboratorRequest& request) const { AWS_OPERATION_GUARD(AssociateAgentCollaborator); AWS_OPERATION_CHECK_PTR(m_endpointProvider, AssociateAgentCollaborator, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); @@ -222,9 +218,9 @@ AssociateAgentCollaboratorOutcome BedrockAgentClient::AssociateAgentCollaborator return AssociateAgentCollaboratorOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, AssociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateAgentCollaborator", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -233,20 +229,15 @@ AssociateAgentCollaboratorOutcome BedrockAgentClient::AssociateAgentCollaborator smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> AssociateAgentCollaboratorOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, AssociateAgentCollaborator, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentcollaborators/"); - return AssociateAgentCollaboratorOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return AssociateAgentCollaboratorOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/agentcollaborators/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -267,9 +258,9 @@ AssociateAgentKnowledgeBaseOutcome BedrockAgentClient::AssociateAgentKnowledgeBa return AssociateAgentKnowledgeBaseOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, AssociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, AssociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, AssociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".AssociateAgentKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -278,20 +269,15 @@ AssociateAgentKnowledgeBaseOutcome BedrockAgentClient::AssociateAgentKnowledgeBa smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> AssociateAgentKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, AssociateAgentKnowledgeBase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - return AssociateAgentKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return AssociateAgentKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -301,9 +287,9 @@ AssociateAgentKnowledgeBaseOutcome BedrockAgentClient::AssociateAgentKnowledgeBa CreateAgentOutcome BedrockAgentClient::CreateAgent(const CreateAgentRequest& request) const { AWS_OPERATION_GUARD(CreateAgent); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -312,16 +298,9 @@ CreateAgentOutcome BedrockAgentClient::CreateAgent(const CreateAgentRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - return CreateAgentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateAgentOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/agents/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -341,9 +320,9 @@ CreateAgentActionGroupOutcome BedrockAgentClient::CreateAgentActionGroup(const C return CreateAgentActionGroupOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAgentActionGroup", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -352,20 +331,15 @@ CreateAgentActionGroupOutcome BedrockAgentClient::CreateAgentActionGroup(const C smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAgentActionGroupOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAgentActionGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/actiongroups/"); - return CreateAgentActionGroupOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateAgentActionGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/actiongroups/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -380,9 +354,9 @@ CreateAgentAliasOutcome BedrockAgentClient::CreateAgentAlias(const CreateAgentAl return CreateAgentAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAgentAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -391,18 +365,12 @@ CreateAgentAliasOutcome BedrockAgentClient::CreateAgentAlias(const CreateAgentAl smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAgentAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAgentAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentaliases/"); - return CreateAgentAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateAgentAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentaliases/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -417,9 +385,9 @@ CreateDataSourceOutcome BedrockAgentClient::CreateDataSource(const CreateDataSou return CreateDataSourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateDataSource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -428,18 +396,12 @@ CreateDataSourceOutcome BedrockAgentClient::CreateDataSource(const CreateDataSou smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateDataSourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateDataSource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - return CreateDataSourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -449,9 +411,9 @@ CreateDataSourceOutcome BedrockAgentClient::CreateDataSource(const CreateDataSou CreateFlowOutcome BedrockAgentClient::CreateFlow(const CreateFlowRequest& request) const { AWS_OPERATION_GUARD(CreateFlow); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -460,16 +422,9 @@ CreateFlowOutcome BedrockAgentClient::CreateFlow(const CreateFlowRequest& reques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - return CreateFlowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateFlowOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/flows/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -484,9 +439,9 @@ CreateFlowAliasOutcome BedrockAgentClient::CreateFlowAlias(const CreateFlowAlias return CreateFlowAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateFlowAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -495,18 +450,12 @@ CreateFlowAliasOutcome BedrockAgentClient::CreateFlowAlias(const CreateFlowAlias smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateFlowAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateFlowAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases"); - return CreateFlowAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateFlowAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -521,9 +470,9 @@ CreateFlowVersionOutcome BedrockAgentClient::CreateFlowVersion(const CreateFlowV return CreateFlowVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateFlowVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -532,18 +481,12 @@ CreateFlowVersionOutcome BedrockAgentClient::CreateFlowVersion(const CreateFlowV smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateFlowVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateFlowVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions"); - return CreateFlowVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateFlowVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/versions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -553,9 +496,9 @@ CreateFlowVersionOutcome BedrockAgentClient::CreateFlowVersion(const CreateFlowV CreateKnowledgeBaseOutcome BedrockAgentClient::CreateKnowledgeBase(const CreateKnowledgeBaseRequest& request) const { AWS_OPERATION_GUARD(CreateKnowledgeBase); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -564,16 +507,9 @@ CreateKnowledgeBaseOutcome BedrockAgentClient::CreateKnowledgeBase(const CreateK smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - return CreateKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return CreateKnowledgeBaseOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/knowledgebases/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -583,9 +519,9 @@ CreateKnowledgeBaseOutcome BedrockAgentClient::CreateKnowledgeBase(const CreateK CreatePromptOutcome BedrockAgentClient::CreatePrompt(const CreatePromptRequest& request) const { AWS_OPERATION_GUARD(CreatePrompt); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreatePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreatePrompt", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -594,16 +530,9 @@ CreatePromptOutcome BedrockAgentClient::CreatePrompt(const CreatePromptRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreatePromptOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreatePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - return CreatePromptOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreatePromptOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/prompts/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -618,9 +547,9 @@ CreatePromptVersionOutcome BedrockAgentClient::CreatePromptVersion(const CreateP return CreatePromptVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreatePromptVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreatePromptVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreatePromptVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreatePromptVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -629,18 +558,13 @@ CreatePromptVersionOutcome BedrockAgentClient::CreatePromptVersion(const CreateP smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreatePromptVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreatePromptVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions"); - return CreatePromptVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreatePromptVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompts/"); + resolvedEndpoint.AddPathSegment(request.GetPromptIdentifier()); + resolvedEndpoint.AddPathSegments("/versions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -655,9 +579,9 @@ DeleteAgentOutcome BedrockAgentClient::DeleteAgent(const DeleteAgentRequest& req return DeleteAgentOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -666,17 +590,11 @@ DeleteAgentOutcome BedrockAgentClient::DeleteAgent(const DeleteAgentRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - return DeleteAgentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -701,9 +619,9 @@ DeleteAgentActionGroupOutcome BedrockAgentClient::DeleteAgentActionGroup(const D return DeleteAgentActionGroupOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ActionGroupId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAgentActionGroup", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -712,21 +630,16 @@ DeleteAgentActionGroupOutcome BedrockAgentClient::DeleteAgentActionGroup(const D smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAgentActionGroupOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAgentActionGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/actiongroups/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetActionGroupId()); - return DeleteAgentActionGroupOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteAgentActionGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/actiongroups/"); + resolvedEndpoint.AddPathSegment(request.GetActionGroupId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -746,9 +659,9 @@ DeleteAgentAliasOutcome BedrockAgentClient::DeleteAgentAlias(const DeleteAgentAl return DeleteAgentAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentAliasId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAgentAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -757,19 +670,13 @@ DeleteAgentAliasOutcome BedrockAgentClient::DeleteAgentAlias(const DeleteAgentAl smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAgentAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAgentAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentaliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - return DeleteAgentAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteAgentAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentaliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -789,9 +696,9 @@ DeleteAgentVersionOutcome BedrockAgentClient::DeleteAgentVersion(const DeleteAge return DeleteAgentVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAgentVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -800,19 +707,14 @@ DeleteAgentVersionOutcome BedrockAgentClient::DeleteAgentVersion(const DeleteAge smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAgentVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAgentVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - return DeleteAgentVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteAgentVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -832,9 +734,9 @@ DeleteDataSourceOutcome BedrockAgentClient::DeleteDataSource(const DeleteDataSou return DeleteDataSourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteDataSource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -843,19 +745,13 @@ DeleteDataSourceOutcome BedrockAgentClient::DeleteDataSource(const DeleteDataSou smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteDataSourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteDataSource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return DeleteDataSourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -870,9 +766,9 @@ DeleteFlowOutcome BedrockAgentClient::DeleteFlow(const DeleteFlowRequest& reques return DeleteFlowOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -881,17 +777,11 @@ DeleteFlowOutcome BedrockAgentClient::DeleteFlow(const DeleteFlowRequest& reques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - return DeleteFlowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteFlowOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -911,9 +801,9 @@ DeleteFlowAliasOutcome BedrockAgentClient::DeleteFlowAlias(const DeleteFlowAlias return DeleteFlowAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AliasIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteFlowAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -922,19 +812,13 @@ DeleteFlowAliasOutcome BedrockAgentClient::DeleteFlowAlias(const DeleteFlowAlias smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteFlowAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteFlowAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAliasIdentifier()); - return DeleteFlowAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteFlowAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetAliasIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -954,9 +838,9 @@ DeleteFlowVersionOutcome BedrockAgentClient::DeleteFlowVersion(const DeleteFlowV return DeleteFlowVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteFlowVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -965,19 +849,14 @@ DeleteFlowVersionOutcome BedrockAgentClient::DeleteFlowVersion(const DeleteFlowV smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteFlowVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteFlowVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowVersion()); - return DeleteFlowVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteFlowVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/versions/"); + resolvedEndpoint.AddPathSegment(request.GetFlowVersion()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -992,9 +871,9 @@ DeleteKnowledgeBaseOutcome BedrockAgentClient::DeleteKnowledgeBase(const DeleteK return DeleteKnowledgeBaseOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1003,17 +882,12 @@ DeleteKnowledgeBaseOutcome BedrockAgentClient::DeleteKnowledgeBase(const DeleteK smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return DeleteKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1034,9 +908,9 @@ DeleteKnowledgeBaseDocumentsOutcome BedrockAgentClient::DeleteKnowledgeBaseDocum return DeleteKnowledgeBaseDocumentsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteKnowledgeBaseDocuments", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1045,20 +919,15 @@ DeleteKnowledgeBaseDocumentsOutcome BedrockAgentClient::DeleteKnowledgeBaseDocum smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteKnowledgeBaseDocumentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteKnowledgeBaseDocuments, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents/deleteDocuments"); - return DeleteKnowledgeBaseDocumentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return DeleteKnowledgeBaseDocumentsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/documents/deleteDocuments"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1073,9 +942,9 @@ DeletePromptOutcome BedrockAgentClient::DeletePrompt(const DeletePromptRequest& return DeletePromptOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeletePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeletePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeletePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeletePrompt", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1084,17 +953,11 @@ DeletePromptOutcome BedrockAgentClient::DeletePrompt(const DeletePromptRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeletePromptOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeletePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptIdentifier()); - return DeletePromptOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeletePromptOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompts/"); + resolvedEndpoint.AddPathSegment(request.GetPromptIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1120,9 +983,9 @@ DisassociateAgentCollaboratorOutcome BedrockAgentClient::DisassociateAgentCollab return DisassociateAgentCollaboratorOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CollaboratorId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DisassociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateAgentCollaborator", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1131,21 +994,16 @@ DisassociateAgentCollaboratorOutcome BedrockAgentClient::DisassociateAgentCollab smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DisassociateAgentCollaboratorOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DisassociateAgentCollaborator, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentcollaborators/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCollaboratorId()); - return DisassociateAgentCollaboratorOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DisassociateAgentCollaboratorOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/agentcollaborators/"); + resolvedEndpoint.AddPathSegment(request.GetCollaboratorId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1171,9 +1029,9 @@ DisassociateAgentKnowledgeBaseOutcome BedrockAgentClient::DisassociateAgentKnowl return DisassociateAgentKnowledgeBaseOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DisassociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DisassociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DisassociateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DisassociateAgentKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1182,21 +1040,16 @@ DisassociateAgentKnowledgeBaseOutcome BedrockAgentClient::DisassociateAgentKnowl smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DisassociateAgentKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DisassociateAgentKnowledgeBase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return DisassociateAgentKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DisassociateAgentKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1211,9 +1064,9 @@ GetAgentOutcome BedrockAgentClient::GetAgent(const GetAgentRequest& request) con return GetAgentOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1222,17 +1075,11 @@ GetAgentOutcome BedrockAgentClient::GetAgent(const GetAgentRequest& request) con smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - return GetAgentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1257,9 +1104,9 @@ GetAgentActionGroupOutcome BedrockAgentClient::GetAgentActionGroup(const GetAgen return GetAgentActionGroupOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ActionGroupId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentActionGroup", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1268,21 +1115,15 @@ GetAgentActionGroupOutcome BedrockAgentClient::GetAgentActionGroup(const GetAgen smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentActionGroupOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentActionGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/actiongroups/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetActionGroupId()); - return GetAgentActionGroupOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentActionGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/actiongroups/"); + resolvedEndpoint.AddPathSegment(request.GetActionGroupId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1302,9 +1143,9 @@ GetAgentAliasOutcome BedrockAgentClient::GetAgentAlias(const GetAgentAliasReques return GetAgentAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentAliasId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1313,19 +1154,13 @@ GetAgentAliasOutcome BedrockAgentClient::GetAgentAlias(const GetAgentAliasReques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentaliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - return GetAgentAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentaliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1350,9 +1185,9 @@ GetAgentCollaboratorOutcome BedrockAgentClient::GetAgentCollaborator(const GetAg return GetAgentCollaboratorOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CollaboratorId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentCollaborator", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1361,21 +1196,16 @@ GetAgentCollaboratorOutcome BedrockAgentClient::GetAgentCollaborator(const GetAg smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentCollaboratorOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentCollaborator, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentcollaborators/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCollaboratorId()); - return GetAgentCollaboratorOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentCollaboratorOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/agentcollaborators/"); + resolvedEndpoint.AddPathSegment(request.GetCollaboratorId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1400,9 +1230,9 @@ GetAgentKnowledgeBaseOutcome BedrockAgentClient::GetAgentKnowledgeBase(const Get return GetAgentKnowledgeBaseOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1411,21 +1241,16 @@ GetAgentKnowledgeBaseOutcome BedrockAgentClient::GetAgentKnowledgeBase(const Get smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return GetAgentKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1445,9 +1270,9 @@ GetAgentVersionOutcome BedrockAgentClient::GetAgentVersion(const GetAgentVersion return GetAgentVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAgentVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAgentVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1456,19 +1281,13 @@ GetAgentVersionOutcome BedrockAgentClient::GetAgentVersion(const GetAgentVersion smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAgentVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAgentVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - return GetAgentVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAgentVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1488,9 +1307,9 @@ GetDataSourceOutcome BedrockAgentClient::GetDataSource(const GetDataSourceReques return GetDataSourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetDataSource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1499,19 +1318,13 @@ GetDataSourceOutcome BedrockAgentClient::GetDataSource(const GetDataSourceReques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetDataSourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetDataSource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return GetDataSourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1526,9 +1339,9 @@ GetFlowOutcome BedrockAgentClient::GetFlow(const GetFlowRequest& request) const return GetFlowOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1537,17 +1350,11 @@ GetFlowOutcome BedrockAgentClient::GetFlow(const GetFlowRequest& request) const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - return GetFlowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetFlowOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1567,9 +1374,9 @@ GetFlowAliasOutcome BedrockAgentClient::GetFlowAlias(const GetFlowAliasRequest& return GetFlowAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AliasIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFlowAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1578,19 +1385,13 @@ GetFlowAliasOutcome BedrockAgentClient::GetFlowAlias(const GetFlowAliasRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFlowAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFlowAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAliasIdentifier()); - return GetFlowAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetFlowAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetAliasIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1610,9 +1411,9 @@ GetFlowVersionOutcome BedrockAgentClient::GetFlowVersion(const GetFlowVersionReq return GetFlowVersionOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFlowVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFlowVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1621,19 +1422,13 @@ GetFlowVersionOutcome BedrockAgentClient::GetFlowVersion(const GetFlowVersionReq smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFlowVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFlowVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowVersion()); - return GetFlowVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetFlowVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/versions/"); + resolvedEndpoint.AddPathSegment(request.GetFlowVersion()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1658,9 +1453,9 @@ GetIngestionJobOutcome BedrockAgentClient::GetIngestionJob(const GetIngestionJob return GetIngestionJobOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IngestionJobId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetIngestionJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1669,21 +1464,15 @@ GetIngestionJobOutcome BedrockAgentClient::GetIngestionJob(const GetIngestionJob smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetIngestionJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetIngestionJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ingestionjobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIngestionJobId()); - return GetIngestionJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetIngestionJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/ingestionjobs/"); + resolvedEndpoint.AddPathSegment(request.GetIngestionJobId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1698,9 +1487,9 @@ GetKnowledgeBaseOutcome BedrockAgentClient::GetKnowledgeBase(const GetKnowledgeB return GetKnowledgeBaseOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1709,17 +1498,11 @@ GetKnowledgeBaseOutcome BedrockAgentClient::GetKnowledgeBase(const GetKnowledgeB smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return GetKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1739,9 +1522,9 @@ GetKnowledgeBaseDocumentsOutcome BedrockAgentClient::GetKnowledgeBaseDocuments(c return GetKnowledgeBaseDocumentsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetKnowledgeBaseDocuments", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1750,20 +1533,15 @@ GetKnowledgeBaseDocumentsOutcome BedrockAgentClient::GetKnowledgeBaseDocuments(c smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetKnowledgeBaseDocumentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetKnowledgeBaseDocuments, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents/getDocuments"); - return GetKnowledgeBaseDocumentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return GetKnowledgeBaseDocumentsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/documents/getDocuments"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1778,9 +1556,9 @@ GetPromptOutcome BedrockAgentClient::GetPrompt(const GetPromptRequest& request) return GetPromptOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetPrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetPrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetPrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetPrompt", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1789,17 +1567,11 @@ GetPromptOutcome BedrockAgentClient::GetPrompt(const GetPromptRequest& request) smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetPromptOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetPrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptIdentifier()); - return GetPromptOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetPromptOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompts/"); + resolvedEndpoint.AddPathSegment(request.GetPromptIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1820,9 +1592,9 @@ IngestKnowledgeBaseDocumentsOutcome BedrockAgentClient::IngestKnowledgeBaseDocum return IngestKnowledgeBaseDocumentsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, IngestKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, IngestKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, IngestKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".IngestKnowledgeBaseDocuments", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1831,20 +1603,15 @@ IngestKnowledgeBaseDocumentsOutcome BedrockAgentClient::IngestKnowledgeBaseDocum smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> IngestKnowledgeBaseDocumentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, IngestKnowledgeBaseDocuments, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents"); - return IngestKnowledgeBaseDocumentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return IngestKnowledgeBaseDocumentsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/documents"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1864,9 +1631,9 @@ ListAgentActionGroupsOutcome BedrockAgentClient::ListAgentActionGroups(const Lis return ListAgentActionGroupsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgentActionGroups, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgentActionGroups, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgentActionGroups, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgentActionGroups", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1875,20 +1642,15 @@ ListAgentActionGroupsOutcome BedrockAgentClient::ListAgentActionGroups(const Lis smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentActionGroupsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgentActionGroups, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/actiongroups/"); - return ListAgentActionGroupsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentActionGroupsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/actiongroups/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1903,9 +1665,9 @@ ListAgentAliasesOutcome BedrockAgentClient::ListAgentAliases(const ListAgentAlia return ListAgentAliasesOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgentAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgentAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgentAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgentAliases", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1914,18 +1676,12 @@ ListAgentAliasesOutcome BedrockAgentClient::ListAgentAliases(const ListAgentAlia smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentAliasesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgentAliases, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentaliases/"); - return ListAgentAliasesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentAliasesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentaliases/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1945,9 +1701,9 @@ ListAgentCollaboratorsOutcome BedrockAgentClient::ListAgentCollaborators(const L return ListAgentCollaboratorsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgentCollaborators, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgentCollaborators, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgentCollaborators, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgentCollaborators", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1956,20 +1712,15 @@ ListAgentCollaboratorsOutcome BedrockAgentClient::ListAgentCollaborators(const L smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentCollaboratorsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgentCollaborators, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentcollaborators/"); - return ListAgentCollaboratorsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentCollaboratorsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/agentcollaborators/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1989,9 +1740,9 @@ ListAgentKnowledgeBasesOutcome BedrockAgentClient::ListAgentKnowledgeBases(const return ListAgentKnowledgeBasesOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgentKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgentKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgentKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgentKnowledgeBases", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2000,20 +1751,15 @@ ListAgentKnowledgeBasesOutcome BedrockAgentClient::ListAgentKnowledgeBases(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentKnowledgeBasesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgentKnowledgeBases, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - return ListAgentKnowledgeBasesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentKnowledgeBasesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2028,9 +1774,9 @@ ListAgentVersionsOutcome BedrockAgentClient::ListAgentVersions(const ListAgentVe return ListAgentVersionsOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgentVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgentVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgentVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgentVersions", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2039,18 +1785,12 @@ ListAgentVersionsOutcome BedrockAgentClient::ListAgentVersions(const ListAgentVe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentVersionsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgentVersions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - return ListAgentVersionsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentVersionsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2060,9 +1800,9 @@ ListAgentVersionsOutcome BedrockAgentClient::ListAgentVersions(const ListAgentVe ListAgentsOutcome BedrockAgentClient::ListAgents(const ListAgentsRequest& request) const { AWS_OPERATION_GUARD(ListAgents); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListAgents, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAgents, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAgents, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAgents, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAgents", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2071,16 +1811,9 @@ ListAgentsOutcome BedrockAgentClient::ListAgents(const ListAgentsRequest& reques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAgentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAgents, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - return ListAgentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListAgentsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/agents/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2095,9 +1828,9 @@ ListDataSourcesOutcome BedrockAgentClient::ListDataSources(const ListDataSources return ListDataSourcesOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListDataSources, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListDataSources, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListDataSources, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListDataSources", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2106,18 +1839,12 @@ ListDataSourcesOutcome BedrockAgentClient::ListDataSources(const ListDataSources smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListDataSourcesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListDataSources, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - return ListDataSourcesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListDataSourcesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2132,9 +1859,9 @@ ListFlowAliasesOutcome BedrockAgentClient::ListFlowAliases(const ListFlowAliases return ListFlowAliasesOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFlowAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFlowAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFlowAliases, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFlowAliases", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2143,18 +1870,12 @@ ListFlowAliasesOutcome BedrockAgentClient::ListFlowAliases(const ListFlowAliases smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFlowAliasesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFlowAliases, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases"); - return ListFlowAliasesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFlowAliasesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2169,9 +1890,9 @@ ListFlowVersionsOutcome BedrockAgentClient::ListFlowVersions(const ListFlowVersi return ListFlowVersionsOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFlowVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFlowVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFlowVersions, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFlowVersions", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2180,18 +1901,12 @@ ListFlowVersionsOutcome BedrockAgentClient::ListFlowVersions(const ListFlowVersi smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFlowVersionsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFlowVersions, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions"); - return ListFlowVersionsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFlowVersionsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/versions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2201,9 +1916,9 @@ ListFlowVersionsOutcome BedrockAgentClient::ListFlowVersions(const ListFlowVersi ListFlowsOutcome BedrockAgentClient::ListFlows(const ListFlowsRequest& request) const { AWS_OPERATION_GUARD(ListFlows); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListFlows, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFlows, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFlows, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFlows, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFlows", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2212,16 +1927,9 @@ ListFlowsOutcome BedrockAgentClient::ListFlows(const ListFlowsRequest& request) smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFlowsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFlows, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - return ListFlowsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFlowsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/flows/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2241,9 +1949,9 @@ ListIngestionJobsOutcome BedrockAgentClient::ListIngestionJobs(const ListIngesti return ListIngestionJobsOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListIngestionJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListIngestionJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListIngestionJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListIngestionJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2252,20 +1960,14 @@ ListIngestionJobsOutcome BedrockAgentClient::ListIngestionJobs(const ListIngesti smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListIngestionJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListIngestionJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ingestionjobs/"); - return ListIngestionJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListIngestionJobsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/ingestionjobs/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2285,9 +1987,9 @@ ListKnowledgeBaseDocumentsOutcome BedrockAgentClient::ListKnowledgeBaseDocuments return ListKnowledgeBaseDocumentsOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListKnowledgeBaseDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListKnowledgeBaseDocuments", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2296,20 +1998,15 @@ ListKnowledgeBaseDocumentsOutcome BedrockAgentClient::ListKnowledgeBaseDocuments smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListKnowledgeBaseDocumentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListKnowledgeBaseDocuments, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents"); - return ListKnowledgeBaseDocumentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListKnowledgeBaseDocumentsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/documents"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2319,9 +2016,9 @@ ListKnowledgeBaseDocumentsOutcome BedrockAgentClient::ListKnowledgeBaseDocuments ListKnowledgeBasesOutcome BedrockAgentClient::ListKnowledgeBases(const ListKnowledgeBasesRequest& request) const { AWS_OPERATION_GUARD(ListKnowledgeBases); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListKnowledgeBases, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListKnowledgeBases, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListKnowledgeBases", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2330,16 +2027,9 @@ ListKnowledgeBasesOutcome BedrockAgentClient::ListKnowledgeBases(const ListKnowl smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListKnowledgeBasesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListKnowledgeBases, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - return ListKnowledgeBasesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListKnowledgeBasesOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/knowledgebases/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2349,9 +2039,9 @@ ListKnowledgeBasesOutcome BedrockAgentClient::ListKnowledgeBases(const ListKnowl ListPromptsOutcome BedrockAgentClient::ListPrompts(const ListPromptsRequest& request) const { AWS_OPERATION_GUARD(ListPrompts); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListPrompts, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListPrompts, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListPrompts, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListPrompts, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListPrompts", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2360,16 +2050,9 @@ ListPromptsOutcome BedrockAgentClient::ListPrompts(const ListPromptsRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListPromptsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListPrompts, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - return ListPromptsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListPromptsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/prompts/"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2384,9 +2067,9 @@ ListTagsForResourceOutcome BedrockAgentClient::ListTagsForResource(const ListTag return ListTagsForResourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListTagsForResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2395,17 +2078,11 @@ ListTagsForResourceOutcome BedrockAgentClient::ListTagsForResource(const ListTag smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListTagsForResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return ListTagsForResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListTagsForResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2420,9 +2097,9 @@ PrepareAgentOutcome BedrockAgentClient::PrepareAgent(const PrepareAgentRequest& return PrepareAgentOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PrepareAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PrepareAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PrepareAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PrepareAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2431,17 +2108,11 @@ PrepareAgentOutcome BedrockAgentClient::PrepareAgent(const PrepareAgentRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PrepareAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PrepareAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - return PrepareAgentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return PrepareAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2456,9 +2127,9 @@ PrepareFlowOutcome BedrockAgentClient::PrepareFlow(const PrepareFlowRequest& req return PrepareFlowOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PrepareFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PrepareFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PrepareFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PrepareFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2467,17 +2138,11 @@ PrepareFlowOutcome BedrockAgentClient::PrepareFlow(const PrepareFlowRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PrepareFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PrepareFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - return PrepareFlowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return PrepareFlowOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2497,9 +2162,9 @@ StartIngestionJobOutcome BedrockAgentClient::StartIngestionJob(const StartIngest return StartIngestionJobOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StartIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartIngestionJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2508,20 +2173,14 @@ StartIngestionJobOutcome BedrockAgentClient::StartIngestionJob(const StartIngest smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StartIngestionJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartIngestionJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ingestionjobs/"); - return StartIngestionJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return StartIngestionJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/ingestionjobs/"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2546,9 +2205,9 @@ StopIngestionJobOutcome BedrockAgentClient::StopIngestionJob(const StopIngestion return StopIngestionJobOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IngestionJobId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StopIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StopIngestionJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopIngestionJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2557,22 +2216,16 @@ StopIngestionJobOutcome BedrockAgentClient::StopIngestionJob(const StopIngestion smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StopIngestionJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StopIngestionJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ingestionjobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIngestionJobId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stop"); - return StopIngestionJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StopIngestionJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + resolvedEndpoint.AddPathSegments("/ingestionjobs/"); + resolvedEndpoint.AddPathSegment(request.GetIngestionJobId()); + resolvedEndpoint.AddPathSegments("/stop"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2587,9 +2240,9 @@ TagResourceOutcome BedrockAgentClient::TagResource(const TagResourceRequest& req return TagResourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".TagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2598,17 +2251,11 @@ TagResourceOutcome BedrockAgentClient::TagResource(const TagResourceRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> TagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return TagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return TagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2628,9 +2275,9 @@ UntagResourceOutcome BedrockAgentClient::UntagResource(const UntagResourceReques return UntagResourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UntagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2639,17 +2286,11 @@ UntagResourceOutcome BedrockAgentClient::UntagResource(const UntagResourceReques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UntagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceArn()); - return UntagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return UntagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/tags/"); + resolvedEndpoint.AddPathSegment(request.GetResourceArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2664,9 +2305,9 @@ UpdateAgentOutcome BedrockAgentClient::UpdateAgent(const UpdateAgentRequest& req return UpdateAgentOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAgent, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAgent", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2675,17 +2316,11 @@ UpdateAgentOutcome BedrockAgentClient::UpdateAgent(const UpdateAgentRequest& req smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAgentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAgent, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - return UpdateAgentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateAgentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2710,9 +2345,9 @@ UpdateAgentActionGroupOutcome BedrockAgentClient::UpdateAgentActionGroup(const U return UpdateAgentActionGroupOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ActionGroupId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAgentActionGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAgentActionGroup", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2721,21 +2356,16 @@ UpdateAgentActionGroupOutcome BedrockAgentClient::UpdateAgentActionGroup(const U smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAgentActionGroupOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAgentActionGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/actiongroups/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetActionGroupId()); - return UpdateAgentActionGroupOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateAgentActionGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/actiongroups/"); + resolvedEndpoint.AddPathSegment(request.GetActionGroupId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2755,9 +2385,9 @@ UpdateAgentAliasOutcome BedrockAgentClient::UpdateAgentAlias(const UpdateAgentAl return UpdateAgentAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AgentAliasId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAgentAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAgentAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2766,19 +2396,13 @@ UpdateAgentAliasOutcome BedrockAgentClient::UpdateAgentAlias(const UpdateAgentAl smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAgentAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAgentAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentaliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentAliasId()); - return UpdateAgentAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateAgentAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentaliases/"); + resolvedEndpoint.AddPathSegment(request.GetAgentAliasId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2803,9 +2427,9 @@ UpdateAgentCollaboratorOutcome BedrockAgentClient::UpdateAgentCollaborator(const return UpdateAgentCollaboratorOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CollaboratorId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAgentCollaborator, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAgentCollaborator", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2814,21 +2438,16 @@ UpdateAgentCollaboratorOutcome BedrockAgentClient::UpdateAgentCollaborator(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAgentCollaboratorOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAgentCollaborator, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentcollaborators/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCollaboratorId()); - return UpdateAgentCollaboratorOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateAgentCollaboratorOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/agentcollaborators/"); + resolvedEndpoint.AddPathSegment(request.GetCollaboratorId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2853,9 +2472,9 @@ UpdateAgentKnowledgeBaseOutcome BedrockAgentClient::UpdateAgentKnowledgeBase(con return UpdateAgentKnowledgeBaseOutcome(Aws::Client::AWSError( BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAgentKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAgentKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2864,21 +2483,16 @@ UpdateAgentKnowledgeBaseOutcome BedrockAgentClient::UpdateAgentKnowledgeBase(con smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAgentKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAgentKnowledgeBase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agents/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/agentversions/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAgentVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return UpdateAgentKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateAgentKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/agents/"); + resolvedEndpoint.AddPathSegment(request.GetAgentId()); + resolvedEndpoint.AddPathSegments("/agentversions/"); + resolvedEndpoint.AddPathSegment(request.GetAgentVersion()); + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2898,9 +2512,9 @@ UpdateDataSourceOutcome BedrockAgentClient::UpdateDataSource(const UpdateDataSou return UpdateDataSourceOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSourceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateDataSource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateDataSource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2909,19 +2523,13 @@ UpdateDataSourceOutcome BedrockAgentClient::UpdateDataSource(const UpdateDataSou smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateDataSourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateDataSource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return UpdateDataSourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + resolvedEndpoint.AddPathSegments("/datasources/"); + resolvedEndpoint.AddPathSegment(request.GetDataSourceId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2936,9 +2544,9 @@ UpdateFlowOutcome BedrockAgentClient::UpdateFlow(const UpdateFlowRequest& reques return UpdateFlowOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FlowIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateFlow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateFlow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2947,17 +2555,11 @@ UpdateFlowOutcome BedrockAgentClient::UpdateFlow(const UpdateFlowRequest& reques smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateFlowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateFlow, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - return UpdateFlowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateFlowOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2977,9 +2579,9 @@ UpdateFlowAliasOutcome BedrockAgentClient::UpdateFlowAlias(const UpdateFlowAlias return UpdateFlowAliasOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AliasIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateFlowAlias, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateFlowAlias", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2988,19 +2590,13 @@ UpdateFlowAliasOutcome BedrockAgentClient::UpdateFlowAlias(const UpdateFlowAlias smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateFlowAliasOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateFlowAlias, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetFlowIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/aliases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetAliasIdentifier()); - return UpdateFlowAliasOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateFlowAliasOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/flows/"); + resolvedEndpoint.AddPathSegment(request.GetFlowIdentifier()); + resolvedEndpoint.AddPathSegments("/aliases/"); + resolvedEndpoint.AddPathSegment(request.GetAliasIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3015,9 +2611,9 @@ UpdateKnowledgeBaseOutcome BedrockAgentClient::UpdateKnowledgeBase(const UpdateK return UpdateKnowledgeBaseOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [KnowledgeBaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateKnowledgeBase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateKnowledgeBase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3026,17 +2622,11 @@ UpdateKnowledgeBaseOutcome BedrockAgentClient::UpdateKnowledgeBase(const UpdateK smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateKnowledgeBaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateKnowledgeBase, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/knowledgebases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetKnowledgeBaseId()); - return UpdateKnowledgeBaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateKnowledgeBaseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/knowledgebases/"); + resolvedEndpoint.AddPathSegment(request.GetKnowledgeBaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3051,9 +2641,9 @@ UpdatePromptOutcome BedrockAgentClient::UpdatePrompt(const UpdatePromptRequest& return UpdatePromptOutcome(Aws::Client::AWSError(BedrockAgentErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdatePrompt, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdatePrompt", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3062,17 +2652,11 @@ UpdatePromptOutcome BedrockAgentClient::UpdatePrompt(const UpdatePromptRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdatePromptOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdatePrompt, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompts/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptIdentifier()); - return UpdatePromptOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdatePromptOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompts/"); + resolvedEndpoint.AddPathSegment(request.GetPromptIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3082,9 +2666,9 @@ UpdatePromptOutcome BedrockAgentClient::UpdatePrompt(const UpdatePromptRequest& ValidateFlowDefinitionOutcome BedrockAgentClient::ValidateFlowDefinition(const ValidateFlowDefinitionRequest& request) const { AWS_OPERATION_GUARD(ValidateFlowDefinition); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ValidateFlowDefinition, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ValidateFlowDefinition, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ValidateFlowDefinition, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ValidateFlowDefinition, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ValidateFlowDefinition", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3093,16 +2677,9 @@ ValidateFlowDefinitionOutcome BedrockAgentClient::ValidateFlowDefinition(const V smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ValidateFlowDefinitionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ValidateFlowDefinition, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/flows/validate-definition"); - return ValidateFlowDefinitionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ValidateFlowDefinitionOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/flows/validate-definition"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, diff --git a/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeClient.h b/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeClient.h index b146d09f475..a3faf03c49f 100644 --- a/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeClient.h +++ b/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeClient.h @@ -4,29 +4,45 @@ */ #pragma once +#include #include #include -#include #include #include -#include +#include +#include +#include +#include +#include namespace Aws { namespace BedrockRuntime { +AWS_BEDROCKRUNTIME_API extern const char SERVICE_NAME[]; /** *

Describes the API operations for running inference using Amazon Bedrock * models.

*/ -class AWS_BEDROCKRUNTIME_API BedrockRuntimeClient : public Aws::Client::AWSJsonClient, - public Aws::Client::ClientWithAsyncTemplateMethods { +class AWS_BEDROCKRUNTIME_API BedrockRuntimeClient + : Aws::Client::ClientWithAsyncTemplateMethods, + public smithy::client::AwsSmithyClientT< + Aws::BedrockRuntime::SERVICE_NAME, Aws::BedrockRuntime::BedrockRuntimeClientConfiguration, smithy::AuthSchemeResolverBase<>, + Aws::Crt::Variant, BedrockRuntimeEndpointProviderBase, + smithy::client::JsonOutcomeSerializer, smithy::client::JsonOutcome, Aws::Client::BedrockRuntimeErrorMarshaller> { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "Bedrock Runtime"; } typedef BedrockRuntimeClientConfiguration ClientConfigurationType; typedef BedrockRuntimeEndpointProvider EndpointProviderType; + /** + * Initializes client to use BearerTokenAuthSignerProvider, with default http client factory, and optional client config. + */ + BedrockRuntimeClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + std::shared_ptr endpointProvider = nullptr, + const Aws::BedrockRuntime::BedrockRuntimeClientConfiguration& clientConfiguration = + Aws::BedrockRuntime::BedrockRuntimeClientConfiguration()); /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client * config is not specified, it will be initialized to default values. @@ -54,6 +70,11 @@ class AWS_BEDROCKRUNTIME_API BedrockRuntimeClient : public Aws::Client::AWSJsonC Aws::BedrockRuntime::BedrockRuntimeClientConfiguration()); /* Legacy constructors due deprecation */ + /** + * Initializes client to use BearerTokenAuthSignerProvider, with default http client factory, and optional client config. + */ + BedrockRuntimeClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client * config is not specified, it will be initialized to default values. @@ -503,10 +524,6 @@ class AWS_BEDROCKRUNTIME_API BedrockRuntimeClient : public Aws::Client::AWSJsonC private: friend class Aws::Client::ClientWithAsyncTemplateMethods; - void init(const BedrockRuntimeClientConfiguration& clientConfiguration); - - BedrockRuntimeClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace BedrockRuntime diff --git a/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeServiceClientModel.h b/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeServiceClientModel.h index 6ef104c4b20..d73e8657b3c 100644 --- a/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeServiceClientModel.h +++ b/generated/src/aws-cpp-sdk-bedrock-runtime/include/aws/bedrock-runtime/BedrockRuntimeServiceClientModel.h @@ -50,6 +50,7 @@ class Executor; } // namespace Utils namespace Auth { +class BearerTokenAuthSignerProvider; class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth diff --git a/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp b/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp index 169f5d789d3..0169b0e8fe0 100644 --- a/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp +++ b/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp @@ -16,22 +16,23 @@ #include #include #include -#include #include +#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include +#include +#include +#include #include using namespace Aws; @@ -46,111 +47,150 @@ using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; namespace Aws { namespace BedrockRuntime { -const char SERVICE_NAME[] = "bedrock"; const char ALLOCATION_TAG[] = "BedrockRuntimeClient"; +const char SERVICE_NAME[] = "bedrock"; } // namespace BedrockRuntime } // namespace Aws const char* BedrockRuntimeClient::GetServiceName() { return SERVICE_NAME; } const char* BedrockRuntimeClient::GetAllocationTag() { return ALLOCATION_TAG; } +BedrockRuntimeClient::BedrockRuntimeClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + std::shared_ptr endpointProvider, + const BedrockRuntime::BedrockRuntimeClientConfiguration& clientConfiguration) + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG, bearerTokenProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} + +BedrockRuntimeClient::BedrockRuntimeClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + const Aws::Client::ClientConfiguration& clientConfiguration) + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG, bearerTokenProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} + BedrockRuntimeClient::BedrockRuntimeClient(const BedrockRuntime::BedrockRuntimeClientConfiguration& clientConfiguration, std::shared_ptr endpointProvider) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + }) {} BedrockRuntimeClient::BedrockRuntimeClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const BedrockRuntime::BedrockRuntimeClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockRuntimeClient::BedrockRuntimeClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const BedrockRuntime::BedrockRuntimeClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* Legacy constructors due deprecation */ BedrockRuntimeClient::BedrockRuntimeClient(const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared( + ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG), GetServiceName(), + clientConfiguration.region}}, + }) {} BedrockRuntimeClient::BedrockRuntimeClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockRuntimeClient::BedrockRuntimeClient(const std::shared_ptr& credentialsProvider, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} - + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock Runtime", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* End of legacy constructors due deprecation */ + BedrockRuntimeClient::~BedrockRuntimeClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& BedrockRuntimeClient::accessEndpointProvider() { return m_endpointProvider; } -void BedrockRuntimeClient::init(const BedrockRuntime::BedrockRuntimeClientConfiguration& config) { - AWSClient::SetServiceClientName("Bedrock Runtime"); - if (!m_clientConfiguration.executor) { - if (!m_clientConfiguration.configFactories.executorCreateFn()) { - AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); - m_isInitialized = false; - return; - } - m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); - } - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config, "bedrock"); -} - void BedrockRuntimeClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_clientConfiguration.endpointOverride = endpoint; m_endpointProvider->OverrideEndpoint(endpoint); } - ApplyGuardrailOutcome BedrockRuntimeClient::ApplyGuardrail(const ApplyGuardrailRequest& request) const { AWS_OPERATION_GUARD(ApplyGuardrail); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ApplyGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); @@ -164,9 +204,9 @@ ApplyGuardrailOutcome BedrockRuntimeClient::ApplyGuardrail(const ApplyGuardrailR return ApplyGuardrailOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GuardrailVersion]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ApplyGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ApplyGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ApplyGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ApplyGuardrail", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -175,20 +215,14 @@ ApplyGuardrailOutcome BedrockRuntimeClient::ApplyGuardrail(const ApplyGuardrailR smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ApplyGuardrailOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ApplyGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrail/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/version/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailVersion()); - endpointResolutionOutcome.GetResult().AddPathSegments("/apply"); - return ApplyGuardrailOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ApplyGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/guardrail/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier()); + resolvedEndpoint.AddPathSegments("/version/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailVersion()); + resolvedEndpoint.AddPathSegments("/apply"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -203,9 +237,9 @@ ConverseOutcome BedrockRuntimeClient::Converse(const ConverseRequest& request) c return ConverseOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, Converse, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, Converse, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, Converse, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".Converse", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -214,18 +248,12 @@ ConverseOutcome BedrockRuntimeClient::Converse(const ConverseRequest& request) c smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ConverseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, Converse, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/converse"); - return ConverseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ConverseOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/converse"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -240,9 +268,9 @@ ConverseStreamOutcome BedrockRuntimeClient::ConverseStream(ConverseStreamRequest return ConverseStreamOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ConverseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ConverseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ConverseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ConverseStream", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -251,16 +279,6 @@ ConverseStreamOutcome BedrockRuntimeClient::ConverseStream(ConverseStreamRequest smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ConverseStreamOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ConverseStream, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/converse-stream"); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -273,7 +291,12 @@ ConverseStreamOutcome BedrockRuntimeClient::ConverseStream(ConverseStreamRequest } }); } - return ConverseStreamOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return ConverseStreamOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/converse-stream"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -288,9 +311,9 @@ CountTokensOutcome BedrockRuntimeClient::CountTokens(const CountTokensRequest& r return CountTokensOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CountTokens, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CountTokens, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CountTokens, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CountTokens", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -299,18 +322,12 @@ CountTokensOutcome BedrockRuntimeClient::CountTokens(const CountTokensRequest& r smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CountTokensOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CountTokens, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/count-tokens"); - return CountTokensOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CountTokensOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/count-tokens"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -325,9 +342,9 @@ GetAsyncInvokeOutcome BedrockRuntimeClient::GetAsyncInvoke(const GetAsyncInvokeR return GetAsyncInvokeOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InvocationArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAsyncInvoke", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -336,17 +353,11 @@ GetAsyncInvokeOutcome BedrockRuntimeClient::GetAsyncInvoke(const GetAsyncInvokeR smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAsyncInvokeOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAsyncInvoke, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/async-invoke/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetInvocationArn()); - return GetAsyncInvokeOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetAsyncInvokeOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/async-invoke/"); + resolvedEndpoint.AddPathSegment(request.GetInvocationArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -361,9 +372,9 @@ InvokeModelOutcome BedrockRuntimeClient::InvokeModel(const InvokeModelRequest& r return InvokeModelOutcome(Aws::Client::AWSError(BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, InvokeModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, InvokeModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, InvokeModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".InvokeModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -372,18 +383,12 @@ InvokeModelOutcome BedrockRuntimeClient::InvokeModel(const InvokeModelRequest& r smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> InvokeModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, InvokeModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invoke"); - return InvokeModelOutcome( - MakeRequestWithUnparsedResponse(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + return InvokeModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/invoke"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -411,32 +416,25 @@ void BedrockRuntimeClient::InvokeModelWithBidirectionalStreamAsync( handlerContext); return; } - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - if (!endpointResolutionOutcome.IsSuccess()) { - handler(this, request, - InvokeModelWithBidirectionalStreamOutcome( - Aws::Client::AWSError(CoreErrors::ENDPOINT_RESOLUTION_FAILURE, "ENDPOINT_RESOLUTION_FAILURE", - endpointResolutionOutcome.GetError().GetMessage(), false)), - handlerContext); - return; - } - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invoke-with-bidirectional-stream"); + auto endpointCallback = [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/invoke-with-bidirectional-stream"); + }; auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); - eventEncoderStream->SetSigner(GetSignerByName(Aws::Auth::EVENTSTREAM_SIGV4_SIGNER)); + auto authCallback = [&](std::shared_ptr ctx) -> void { + eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Event::Message& message, Aws::String& seed) -> bool { + auto outcome = SignEventMessage(message, seed, ctx); + return outcome.IsSuccess(); + }); + }; auto requestCopy = Aws::MakeShared("InvokeModelWithBidirectionalStream", request); requestCopy->SetBody(eventEncoderStream); // this becomes the body of the request - request.SetBody(eventEncoderStream); + request.SetBody(eventEncoderStream); // this becomes the body of the request - auto asyncTask = CreateBidirectionalEventStreamTask( - this, endpointResolutionOutcome.GetResultWithOwnership(), requestCopy, handler, handlerContext, eventEncoderStream); + auto asyncTask = CreateSmithyBidirectionalEventStreamTask( + this, requestCopy, handler, handlerContext, eventEncoderStream, endpointCallback, authCallback); auto sem = asyncTask.GetSemaphore(); m_clientConfiguration.executor->Submit(std::move(asyncTask)); sem->WaitOne(); @@ -451,9 +449,9 @@ InvokeModelWithResponseStreamOutcome BedrockRuntimeClient::InvokeModelWithRespon return InvokeModelWithResponseStreamOutcome(Aws::Client::AWSError( BedrockRuntimeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, InvokeModelWithResponseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, InvokeModelWithResponseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, InvokeModelWithResponseStream, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".InvokeModelWithResponseStream", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -462,16 +460,6 @@ InvokeModelWithResponseStreamOutcome BedrockRuntimeClient::InvokeModelWithRespon smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> InvokeModelWithResponseStreamOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, InvokeModelWithResponseStream, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/invoke-with-response-stream"); request.SetResponseStreamFactory([&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); @@ -485,7 +473,12 @@ InvokeModelWithResponseStreamOutcome BedrockRuntimeClient::InvokeModelWithRespon }); } return InvokeModelWithResponseStreamOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + resolvedEndpoint.AddPathSegments("/invoke-with-response-stream"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -495,9 +488,9 @@ InvokeModelWithResponseStreamOutcome BedrockRuntimeClient::InvokeModelWithRespon ListAsyncInvokesOutcome BedrockRuntimeClient::ListAsyncInvokes(const ListAsyncInvokesRequest& request) const { AWS_OPERATION_GUARD(ListAsyncInvokes); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListAsyncInvokes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAsyncInvokes, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAsyncInvokes, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAsyncInvokes, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAsyncInvokes", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -506,16 +499,9 @@ ListAsyncInvokesOutcome BedrockRuntimeClient::ListAsyncInvokes(const ListAsyncIn smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAsyncInvokesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAsyncInvokes, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/async-invoke"); - return ListAsyncInvokesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListAsyncInvokesOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/async-invoke"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -525,9 +511,9 @@ ListAsyncInvokesOutcome BedrockRuntimeClient::ListAsyncInvokes(const ListAsyncIn StartAsyncInvokeOutcome BedrockRuntimeClient::StartAsyncInvoke(const StartAsyncInvokeRequest& request) const { AWS_OPERATION_GUARD(StartAsyncInvoke); AWS_OPERATION_CHECK_PTR(m_endpointProvider, StartAsyncInvoke, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StartAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartAsyncInvoke, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartAsyncInvoke", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -536,16 +522,9 @@ StartAsyncInvokeOutcome BedrockRuntimeClient::StartAsyncInvoke(const StartAsyncI smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StartAsyncInvokeOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartAsyncInvoke, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/async-invoke"); - return StartAsyncInvokeOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StartAsyncInvokeOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/async-invoke"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, diff --git a/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h b/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h index e19a96f6ab9..19b90b2dfda 100644 --- a/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h +++ b/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h @@ -4,28 +4,44 @@ */ #pragma once +#include #include #include -#include #include #include -#include +#include +#include +#include +#include +#include namespace Aws { namespace Bedrock { +AWS_BEDROCK_API extern const char SERVICE_NAME[]; /** *

Describes the API operations for creating, managing, fine-turning, and * evaluating Amazon Bedrock models.

*/ -class AWS_BEDROCK_API BedrockClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { +class AWS_BEDROCK_API BedrockClient + : Aws::Client::ClientWithAsyncTemplateMethods, + public smithy::client::AwsSmithyClientT< + Aws::Bedrock::SERVICE_NAME, Aws::Bedrock::BedrockClientConfiguration, smithy::AuthSchemeResolverBase<>, + Aws::Crt::Variant, BedrockEndpointProviderBase, + smithy::client::JsonOutcomeSerializer, smithy::client::JsonOutcome, Aws::Client::BedrockErrorMarshaller> { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "Bedrock"; } typedef BedrockClientConfiguration ClientConfigurationType; typedef BedrockEndpointProvider EndpointProviderType; + /** + * Initializes client to use BearerTokenAuthSignerProvider, with default http client factory, and optional client config. + */ + BedrockClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + std::shared_ptr endpointProvider = nullptr, + const Aws::Bedrock::BedrockClientConfiguration& clientConfiguration = Aws::Bedrock::BedrockClientConfiguration()); /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client * config is not specified, it will be initialized to default values. @@ -49,6 +65,11 @@ class AWS_BEDROCK_API BedrockClient : public Aws::Client::AWSJsonClient, public const Aws::Bedrock::BedrockClientConfiguration& clientConfiguration = Aws::Bedrock::BedrockClientConfiguration()); /* Legacy constructors due deprecation */ + /** + * Initializes client to use BearerTokenAuthSignerProvider, with default http client factory, and optional client config. + */ + BedrockClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client * config is not specified, it will be initialized to default values. @@ -3167,10 +3188,6 @@ class AWS_BEDROCK_API BedrockClient : public Aws::Client::AWSJsonClient, public private: friend class Aws::Client::ClientWithAsyncTemplateMethods; - void init(const BedrockClientConfiguration& clientConfiguration); - - BedrockClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace Bedrock diff --git a/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h b/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h index 92fc996ce67..298e0c594bf 100644 --- a/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h +++ b/generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h @@ -154,6 +154,7 @@ class Executor; } // namespace Utils namespace Auth { +class BearerTokenAuthSignerProvider; class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth diff --git a/generated/src/aws-cpp-sdk-bedrock/source/BedrockClient.cpp b/generated/src/aws-cpp-sdk-bedrock/source/BedrockClient.cpp index db94a8f6a84..ea179eccba6 100644 --- a/generated/src/aws-cpp-sdk-bedrock/source/BedrockClient.cpp +++ b/generated/src/aws-cpp-sdk-bedrock/source/BedrockClient.cpp @@ -104,20 +104,21 @@ #include #include #include -#include #include +#include #include #include #include #include -#include #include #include -#include #include #include #include #include +#include +#include +#include #include using namespace Aws; @@ -132,114 +133,155 @@ using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; namespace Aws { namespace Bedrock { -const char SERVICE_NAME[] = "bedrock"; const char ALLOCATION_TAG[] = "BedrockClient"; +const char SERVICE_NAME[] = "bedrock"; } // namespace Bedrock } // namespace Aws const char* BedrockClient::GetServiceName() { return SERVICE_NAME; } const char* BedrockClient::GetAllocationTag() { return ALLOCATION_TAG; } +BedrockClient::BedrockClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + std::shared_ptr endpointProvider, + const Bedrock::BedrockClientConfiguration& clientConfiguration) + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG, bearerTokenProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} + +BedrockClient::BedrockClient(const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider, + const Aws::Client::ClientConfiguration& clientConfiguration) + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG, bearerTokenProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} + BedrockClient::BedrockClient(const Bedrock::BedrockClientConfiguration& clientConfiguration, std::shared_ptr endpointProvider) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{GetServiceName(), clientConfiguration.region, clientConfiguration.credentialProviderConfig}}, + }) {} BedrockClient::BedrockClient(const AWSCredentials& credentials, std::shared_ptr endpointProvider, const Bedrock::BedrockClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockClient::BedrockClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider, const Bedrock::BedrockClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* Legacy constructors due deprecation */ BedrockClient::BedrockClient(const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared( - ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared( + ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + GetServiceName(), clientConfiguration.region}}, + {smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption.schemeId, + smithy::BearerTokenAuthScheme{Aws::MakeShared(ALLOCATION_TAG), GetServiceName(), + clientConfiguration.region}}, + }) {} BedrockClient::BedrockClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), - SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), + GetServiceName(), clientConfiguration.region}}, + }) {} BedrockClient::BedrockClient(const std::shared_ptr& credentialsProvider, const Client::ClientConfiguration& clientConfiguration) - : BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { - init(m_clientConfiguration); -} - + : AwsSmithyClientT( + clientConfiguration, GetServiceName(), "Bedrock", Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>( + ALLOCATION_TAG, Aws::Vector({smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption, + smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption})), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, + smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), + GetServiceName(), clientConfiguration.region}}, + }) {} /* End of legacy constructors due deprecation */ + BedrockClient::~BedrockClient() { ShutdownSdkClient(this, -1); } std::shared_ptr& BedrockClient::accessEndpointProvider() { return m_endpointProvider; } -void BedrockClient::init(const Bedrock::BedrockClientConfiguration& config) { - AWSClient::SetServiceClientName("Bedrock"); - if (!m_clientConfiguration.executor) { - if (!m_clientConfiguration.configFactories.executorCreateFn()) { - AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); - m_isInitialized = false; - return; - } - m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); - } - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config, "bedrock"); -} - void BedrockClient::OverrideEndpoint(const Aws::String& endpoint) { AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); m_clientConfiguration.endpointOverride = endpoint; m_endpointProvider->OverrideEndpoint(endpoint); } - BatchDeleteEvaluationJobOutcome BedrockClient::BatchDeleteEvaluationJob(const BatchDeleteEvaluationJobRequest& request) const { AWS_OPERATION_GUARD(BatchDeleteEvaluationJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, BatchDeleteEvaluationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, BatchDeleteEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, BatchDeleteEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, BatchDeleteEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".BatchDeleteEvaluationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -248,16 +290,11 @@ BatchDeleteEvaluationJobOutcome BedrockClient::BatchDeleteEvaluationJob(const Ba smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> BatchDeleteEvaluationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, BatchDeleteEvaluationJob, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/evaluation-jobs/batch-delete"); - return BatchDeleteEvaluationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return BatchDeleteEvaluationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/evaluation-jobs/batch-delete"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -279,9 +316,10 @@ CancelAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::CancelAutomate return CancelAutomatedReasoningPolicyBuildWorkflowOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CancelAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CancelAutomatedReasoningPolicyBuildWorkflow, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CancelAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CancelAutomatedReasoningPolicyBuildWorkflow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -290,20 +328,15 @@ CancelAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::CancelAutomate smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CancelAutomatedReasoningPolicyBuildWorkflowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CancelAutomatedReasoningPolicyBuildWorkflow, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/cancel"); return CancelAutomatedReasoningPolicyBuildWorkflowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/cancel"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -314,9 +347,9 @@ CreateAutomatedReasoningPolicyOutcome BedrockClient::CreateAutomatedReasoningPol const CreateAutomatedReasoningPolicyRequest& request) const { AWS_OPERATION_GUARD(CreateAutomatedReasoningPolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateAutomatedReasoningPolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAutomatedReasoningPolicy", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -325,16 +358,11 @@ CreateAutomatedReasoningPolicyOutcome BedrockClient::CreateAutomatedReasoningPol smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAutomatedReasoningPolicyOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAutomatedReasoningPolicy, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies"); return CreateAutomatedReasoningPolicyOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -350,9 +378,10 @@ CreateAutomatedReasoningPolicyTestCaseOutcome BedrockClient::CreateAutomatedReas return CreateAutomatedReasoningPolicyTestCaseOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAutomatedReasoningPolicyTestCase, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAutomatedReasoningPolicyTestCase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -361,18 +390,13 @@ CreateAutomatedReasoningPolicyTestCaseOutcome BedrockClient::CreateAutomatedReas smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAutomatedReasoningPolicyTestCaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAutomatedReasoningPolicyTestCase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases"); return CreateAutomatedReasoningPolicyTestCaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/test-cases"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -388,9 +412,10 @@ CreateAutomatedReasoningPolicyVersionOutcome BedrockClient::CreateAutomatedReaso return CreateAutomatedReasoningPolicyVersionOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateAutomatedReasoningPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateAutomatedReasoningPolicyVersion, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateAutomatedReasoningPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateAutomatedReasoningPolicyVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -399,18 +424,13 @@ CreateAutomatedReasoningPolicyVersionOutcome BedrockClient::CreateAutomatedReaso smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateAutomatedReasoningPolicyVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateAutomatedReasoningPolicyVersion, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/versions"); return CreateAutomatedReasoningPolicyVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/versions"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -420,9 +440,9 @@ CreateAutomatedReasoningPolicyVersionOutcome BedrockClient::CreateAutomatedReaso CreateCustomModelOutcome BedrockClient::CreateCustomModel(const CreateCustomModelRequest& request) const { AWS_OPERATION_GUARD(CreateCustomModel); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateCustomModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateCustomModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -431,16 +451,10 @@ CreateCustomModelOutcome BedrockClient::CreateCustomModel(const CreateCustomMode smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateCustomModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateCustomModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/custom-models/create-custom-model"); - return CreateCustomModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateCustomModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/custom-models/create-custom-model"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -450,9 +464,9 @@ CreateCustomModelOutcome BedrockClient::CreateCustomModel(const CreateCustomMode CreateCustomModelDeploymentOutcome BedrockClient::CreateCustomModelDeployment(const CreateCustomModelDeploymentRequest& request) const { AWS_OPERATION_GUARD(CreateCustomModelDeployment); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateCustomModelDeployment, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateCustomModelDeployment", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -461,16 +475,11 @@ CreateCustomModelDeploymentOutcome BedrockClient::CreateCustomModelDeployment(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateCustomModelDeploymentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateCustomModelDeployment, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization/custom-model-deployments"); return CreateCustomModelDeploymentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization/custom-model-deployments"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -480,9 +489,9 @@ CreateCustomModelDeploymentOutcome BedrockClient::CreateCustomModelDeployment(co CreateEvaluationJobOutcome BedrockClient::CreateEvaluationJob(const CreateEvaluationJobRequest& request) const { AWS_OPERATION_GUARD(CreateEvaluationJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateEvaluationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateEvaluationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -491,16 +500,9 @@ CreateEvaluationJobOutcome BedrockClient::CreateEvaluationJob(const CreateEvalua smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateEvaluationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateEvaluationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/evaluation-jobs"); - return CreateEvaluationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateEvaluationJobOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/evaluation-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -511,9 +513,9 @@ CreateFoundationModelAgreementOutcome BedrockClient::CreateFoundationModelAgreem const CreateFoundationModelAgreementRequest& request) const { AWS_OPERATION_GUARD(CreateFoundationModelAgreement); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateFoundationModelAgreement, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateFoundationModelAgreement", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -522,16 +524,11 @@ CreateFoundationModelAgreementOutcome BedrockClient::CreateFoundationModelAgreem smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateFoundationModelAgreementOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateFoundationModelAgreement, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/create-foundation-model-agreement"); return CreateFoundationModelAgreementOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/create-foundation-model-agreement"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -541,9 +538,9 @@ CreateFoundationModelAgreementOutcome BedrockClient::CreateFoundationModelAgreem CreateGuardrailOutcome BedrockClient::CreateGuardrail(const CreateGuardrailRequest& request) const { AWS_OPERATION_GUARD(CreateGuardrail); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateGuardrail", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -552,16 +549,9 @@ CreateGuardrailOutcome BedrockClient::CreateGuardrail(const CreateGuardrailReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateGuardrailOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails"); - return CreateGuardrailOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateGuardrailOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/guardrails"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -576,9 +566,9 @@ CreateGuardrailVersionOutcome BedrockClient::CreateGuardrailVersion(const Create return CreateGuardrailVersionOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GuardrailIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateGuardrailVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateGuardrailVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateGuardrailVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateGuardrailVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -587,17 +577,12 @@ CreateGuardrailVersionOutcome BedrockClient::CreateGuardrailVersion(const Create smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateGuardrailVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateGuardrailVersion, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailIdentifier()); - return CreateGuardrailVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateGuardrailVersionOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/guardrails/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -607,9 +592,9 @@ CreateGuardrailVersionOutcome BedrockClient::CreateGuardrailVersion(const Create CreateInferenceProfileOutcome BedrockClient::CreateInferenceProfile(const CreateInferenceProfileRequest& request) const { AWS_OPERATION_GUARD(CreateInferenceProfile); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateInferenceProfile, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateInferenceProfile", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -618,16 +603,9 @@ CreateInferenceProfileOutcome BedrockClient::CreateInferenceProfile(const Create smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateInferenceProfileOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateInferenceProfile, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/inference-profiles"); - return CreateInferenceProfileOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateInferenceProfileOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/inference-profiles"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -638,9 +616,9 @@ CreateMarketplaceModelEndpointOutcome BedrockClient::CreateMarketplaceModelEndpo const CreateMarketplaceModelEndpointRequest& request) const { AWS_OPERATION_GUARD(CreateMarketplaceModelEndpoint); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateMarketplaceModelEndpoint, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -649,16 +627,11 @@ CreateMarketplaceModelEndpointOutcome BedrockClient::CreateMarketplaceModelEndpo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints"); return CreateMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -668,9 +641,9 @@ CreateMarketplaceModelEndpointOutcome BedrockClient::CreateMarketplaceModelEndpo CreateModelCopyJobOutcome BedrockClient::CreateModelCopyJob(const CreateModelCopyJobRequest& request) const { AWS_OPERATION_GUARD(CreateModelCopyJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateModelCopyJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateModelCopyJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -679,16 +652,9 @@ CreateModelCopyJobOutcome BedrockClient::CreateModelCopyJob(const CreateModelCop smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateModelCopyJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateModelCopyJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-copy-jobs"); - return CreateModelCopyJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateModelCopyJobOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-copy-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -698,9 +664,9 @@ CreateModelCopyJobOutcome BedrockClient::CreateModelCopyJob(const CreateModelCop CreateModelCustomizationJobOutcome BedrockClient::CreateModelCustomizationJob(const CreateModelCustomizationJobRequest& request) const { AWS_OPERATION_GUARD(CreateModelCustomizationJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateModelCustomizationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateModelCustomizationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -709,16 +675,9 @@ CreateModelCustomizationJobOutcome BedrockClient::CreateModelCustomizationJob(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateModelCustomizationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateModelCustomizationJob, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization-jobs"); - return CreateModelCustomizationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateModelCustomizationJobOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-customization-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -728,9 +687,9 @@ CreateModelCustomizationJobOutcome BedrockClient::CreateModelCustomizationJob(co CreateModelImportJobOutcome BedrockClient::CreateModelImportJob(const CreateModelImportJobRequest& request) const { AWS_OPERATION_GUARD(CreateModelImportJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateModelImportJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateModelImportJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -739,16 +698,9 @@ CreateModelImportJobOutcome BedrockClient::CreateModelImportJob(const CreateMode smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateModelImportJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateModelImportJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-import-jobs"); - return CreateModelImportJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateModelImportJobOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-import-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -758,9 +710,9 @@ CreateModelImportJobOutcome BedrockClient::CreateModelImportJob(const CreateMode CreateModelInvocationJobOutcome BedrockClient::CreateModelInvocationJob(const CreateModelInvocationJobRequest& request) const { AWS_OPERATION_GUARD(CreateModelInvocationJob); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateModelInvocationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateModelInvocationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -769,16 +721,9 @@ CreateModelInvocationJobOutcome BedrockClient::CreateModelInvocationJob(const Cr smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateModelInvocationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateModelInvocationJob, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-invocation-job"); - return CreateModelInvocationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreateModelInvocationJobOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-invocation-job"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -788,9 +733,9 @@ CreateModelInvocationJobOutcome BedrockClient::CreateModelInvocationJob(const Cr CreatePromptRouterOutcome BedrockClient::CreatePromptRouter(const CreatePromptRouterRequest& request) const { AWS_OPERATION_GUARD(CreatePromptRouter); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreatePromptRouter, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreatePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreatePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreatePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreatePromptRouter", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -799,16 +744,9 @@ CreatePromptRouterOutcome BedrockClient::CreatePromptRouter(const CreatePromptRo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreatePromptRouterOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreatePromptRouter, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompt-routers"); - return CreatePromptRouterOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return CreatePromptRouterOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/prompt-routers"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -819,9 +757,10 @@ CreateProvisionedModelThroughputOutcome BedrockClient::CreateProvisionedModelThr const CreateProvisionedModelThroughputRequest& request) const { AWS_OPERATION_GUARD(CreateProvisionedModelThroughput); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateProvisionedModelThroughput, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, CreateProvisionedModelThroughput, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, CreateProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateProvisionedModelThroughput", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -830,16 +769,11 @@ CreateProvisionedModelThroughputOutcome BedrockClient::CreateProvisionedModelThr smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> CreateProvisionedModelThroughputOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, CreateProvisionedModelThroughput, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/provisioned-model-throughput"); return CreateProvisionedModelThroughputOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/provisioned-model-throughput"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -855,9 +789,9 @@ DeleteAutomatedReasoningPolicyOutcome BedrockClient::DeleteAutomatedReasoningPol return DeleteAutomatedReasoningPolicyOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAutomatedReasoningPolicy", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -866,17 +800,12 @@ DeleteAutomatedReasoningPolicyOutcome BedrockClient::DeleteAutomatedReasoningPol smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAutomatedReasoningPolicyOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAutomatedReasoningPolicy, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); return DeleteAutomatedReasoningPolicyOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -903,9 +832,10 @@ DeleteAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::DeleteAutomate return DeleteAutomatedReasoningPolicyBuildWorkflowOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [LastUpdatedAt]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAutomatedReasoningPolicyBuildWorkflow, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAutomatedReasoningPolicyBuildWorkflow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -914,19 +844,14 @@ DeleteAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::DeleteAutomate smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAutomatedReasoningPolicyBuildWorkflowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAutomatedReasoningPolicyBuildWorkflow, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); return DeleteAutomatedReasoningPolicyBuildWorkflowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -952,9 +877,10 @@ DeleteAutomatedReasoningPolicyTestCaseOutcome BedrockClient::DeleteAutomatedReas return DeleteAutomatedReasoningPolicyTestCaseOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [LastUpdatedAt]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteAutomatedReasoningPolicyTestCase, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteAutomatedReasoningPolicyTestCase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -963,19 +889,14 @@ DeleteAutomatedReasoningPolicyTestCaseOutcome BedrockClient::DeleteAutomatedReas smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteAutomatedReasoningPolicyTestCaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteAutomatedReasoningPolicyTestCase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTestCaseId()); return DeleteAutomatedReasoningPolicyTestCaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/test-cases/"); + resolvedEndpoint.AddPathSegment(request.GetTestCaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -990,9 +911,9 @@ DeleteCustomModelOutcome BedrockClient::DeleteCustomModel(const DeleteCustomMode return DeleteCustomModelOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteCustomModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1001,17 +922,12 @@ DeleteCustomModelOutcome BedrockClient::DeleteCustomModel(const DeleteCustomMode smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteCustomModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteCustomModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/custom-models/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelIdentifier()); - return DeleteCustomModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteCustomModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/custom-models/"); + resolvedEndpoint.AddPathSegment(request.GetModelIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1026,9 +942,9 @@ DeleteCustomModelDeploymentOutcome BedrockClient::DeleteCustomModelDeployment(co return DeleteCustomModelDeploymentOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CustomModelDeploymentIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteCustomModelDeployment", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1037,17 +953,12 @@ DeleteCustomModelDeploymentOutcome BedrockClient::DeleteCustomModelDeployment(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteCustomModelDeploymentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteCustomModelDeployment, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization/custom-model-deployments/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCustomModelDeploymentIdentifier()); return DeleteCustomModelDeploymentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization/custom-model-deployments/"); + resolvedEndpoint.AddPathSegment(request.GetCustomModelDeploymentIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1063,9 +974,10 @@ DeleteEnforcedGuardrailConfigurationOutcome BedrockClient::DeleteEnforcedGuardra return DeleteEnforcedGuardrailConfigurationOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConfigId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteEnforcedGuardrailConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteEnforcedGuardrailConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteEnforcedGuardrailConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteEnforcedGuardrailConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1074,17 +986,12 @@ DeleteEnforcedGuardrailConfigurationOutcome BedrockClient::DeleteEnforcedGuardra smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteEnforcedGuardrailConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteEnforcedGuardrailConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/enforcedGuardrailsConfiguration/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConfigId()); return DeleteEnforcedGuardrailConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/enforcedGuardrailsConfiguration/"); + resolvedEndpoint.AddPathSegment(request.GetConfigId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1095,9 +1002,9 @@ DeleteFoundationModelAgreementOutcome BedrockClient::DeleteFoundationModelAgreem const DeleteFoundationModelAgreementRequest& request) const { AWS_OPERATION_GUARD(DeleteFoundationModelAgreement); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteFoundationModelAgreement, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteFoundationModelAgreement, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteFoundationModelAgreement", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1106,16 +1013,11 @@ DeleteFoundationModelAgreementOutcome BedrockClient::DeleteFoundationModelAgreem smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteFoundationModelAgreementOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteFoundationModelAgreement, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/delete-foundation-model-agreement"); return DeleteFoundationModelAgreementOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/delete-foundation-model-agreement"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1130,9 +1032,9 @@ DeleteGuardrailOutcome BedrockClient::DeleteGuardrail(const DeleteGuardrailReque return DeleteGuardrailOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GuardrailIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteGuardrail", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1141,17 +1043,11 @@ DeleteGuardrailOutcome BedrockClient::DeleteGuardrail(const DeleteGuardrailReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteGuardrailOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailIdentifier()); - return DeleteGuardrailOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/guardrails/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1166,9 +1062,9 @@ DeleteImportedModelOutcome BedrockClient::DeleteImportedModel(const DeleteImport return DeleteImportedModelOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteImportedModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1177,17 +1073,12 @@ DeleteImportedModelOutcome BedrockClient::DeleteImportedModel(const DeleteImport smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteImportedModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteImportedModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/imported-models/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelIdentifier()); - return DeleteImportedModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteImportedModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/imported-models/"); + resolvedEndpoint.AddPathSegment(request.GetModelIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1202,9 +1093,9 @@ DeleteInferenceProfileOutcome BedrockClient::DeleteInferenceProfile(const Delete return DeleteInferenceProfileOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InferenceProfileIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteInferenceProfile", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1213,17 +1104,12 @@ DeleteInferenceProfileOutcome BedrockClient::DeleteInferenceProfile(const Delete smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteInferenceProfileOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteInferenceProfile, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/inference-profiles/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetInferenceProfileIdentifier()); return DeleteInferenceProfileOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/inference-profiles/"); + resolvedEndpoint.AddPathSegment(request.GetInferenceProfileIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1239,9 +1125,9 @@ DeleteMarketplaceModelEndpointOutcome BedrockClient::DeleteMarketplaceModelEndpo return DeleteMarketplaceModelEndpointOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1250,17 +1136,12 @@ DeleteMarketplaceModelEndpointOutcome BedrockClient::DeleteMarketplaceModelEndpo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointArn()); return DeleteMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints/"); + resolvedEndpoint.AddPathSegment(request.GetEndpointArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1272,9 +1153,10 @@ DeleteModelInvocationLoggingConfigurationOutcome BedrockClient::DeleteModelInvoc AWS_OPERATION_GUARD(DeleteModelInvocationLoggingConfiguration); AWS_OPERATION_CHECK_PTR(m_endpointProvider, DeleteModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteModelInvocationLoggingConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteModelInvocationLoggingConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1283,16 +1165,9 @@ DeleteModelInvocationLoggingConfigurationOutcome BedrockClient::DeleteModelInvoc smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteModelInvocationLoggingConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteModelInvocationLoggingConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/logging/modelinvocations"); - return DeleteModelInvocationLoggingConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeleteModelInvocationLoggingConfigurationOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/logging/modelinvocations"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1307,9 +1182,9 @@ DeletePromptRouterOutcome BedrockClient::DeletePromptRouter(const DeletePromptRo return DeletePromptRouterOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptRouterArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeletePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeletePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeletePromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeletePromptRouter", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1318,17 +1193,12 @@ DeletePromptRouterOutcome BedrockClient::DeletePromptRouter(const DeletePromptRo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeletePromptRouterOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeletePromptRouter, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompt-routers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptRouterArn()); - return DeletePromptRouterOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + return DeletePromptRouterOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompt-routers/"); + resolvedEndpoint.AddPathSegment(request.GetPromptRouterArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1344,9 +1214,10 @@ DeleteProvisionedModelThroughputOutcome BedrockClient::DeleteProvisionedModelThr return DeleteProvisionedModelThroughputOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProvisionedModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeleteProvisionedModelThroughput, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeleteProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteProvisionedModelThroughput", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1355,17 +1226,12 @@ DeleteProvisionedModelThroughputOutcome BedrockClient::DeleteProvisionedModelThr smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeleteProvisionedModelThroughputOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteProvisionedModelThroughput, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/provisioned-model-throughput/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetProvisionedModelId()); return DeleteProvisionedModelThroughputOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/provisioned-model-throughput/"); + resolvedEndpoint.AddPathSegment(request.GetProvisionedModelId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1381,9 +1247,10 @@ DeregisterMarketplaceModelEndpointOutcome BedrockClient::DeregisterMarketplaceMo return DeregisterMarketplaceModelEndpointOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeregisterMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, DeregisterMarketplaceModelEndpoint, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, DeregisterMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeregisterMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1392,18 +1259,13 @@ DeregisterMarketplaceModelEndpointOutcome BedrockClient::DeregisterMarketplaceMo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> DeregisterMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeregisterMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/registration"); return DeregisterMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints/"); + resolvedEndpoint.AddPathSegment(request.GetEndpointArn()); + resolvedEndpoint.AddPathSegments("/registration"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1419,9 +1281,10 @@ ExportAutomatedReasoningPolicyVersionOutcome BedrockClient::ExportAutomatedReaso return ExportAutomatedReasoningPolicyVersionOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ExportAutomatedReasoningPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ExportAutomatedReasoningPolicyVersion, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ExportAutomatedReasoningPolicyVersion, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ExportAutomatedReasoningPolicyVersion", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1430,18 +1293,13 @@ ExportAutomatedReasoningPolicyVersionOutcome BedrockClient::ExportAutomatedReaso smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ExportAutomatedReasoningPolicyVersionOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ExportAutomatedReasoningPolicyVersion, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/export"); return ExportAutomatedReasoningPolicyVersionOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/export"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1456,9 +1314,9 @@ GetAutomatedReasoningPolicyOutcome BedrockClient::GetAutomatedReasoningPolicy(co return GetAutomatedReasoningPolicyOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicy", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1467,17 +1325,12 @@ GetAutomatedReasoningPolicyOutcome BedrockClient::GetAutomatedReasoningPolicy(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicy, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); return GetAutomatedReasoningPolicyOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1498,9 +1351,10 @@ GetAutomatedReasoningPolicyAnnotationsOutcome BedrockClient::GetAutomatedReasoni return GetAutomatedReasoningPolicyAnnotationsOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyAnnotations, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyAnnotations, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyAnnotations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyAnnotations", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1509,20 +1363,15 @@ GetAutomatedReasoningPolicyAnnotationsOutcome BedrockClient::GetAutomatedReasoni smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyAnnotationsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyAnnotations, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/annotations"); return GetAutomatedReasoningPolicyAnnotationsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/annotations"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1544,9 +1393,10 @@ GetAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::GetAutomatedReaso return GetAutomatedReasoningPolicyBuildWorkflowOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyBuildWorkflow, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyBuildWorkflow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1555,19 +1405,14 @@ GetAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::GetAutomatedReaso smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyBuildWorkflowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyBuildWorkflow, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); return GetAutomatedReasoningPolicyBuildWorkflowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1594,10 +1439,10 @@ GetAutomatedReasoningPolicyBuildWorkflowResultAssetsOutcome BedrockClient::GetAu return GetAutomatedReasoningPolicyBuildWorkflowResultAssetsOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetType]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyBuildWorkflowResultAssets, CoreErrors, + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyBuildWorkflowResultAssets, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyBuildWorkflowResultAssets, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyBuildWorkflowResultAssets", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1606,20 +1451,15 @@ GetAutomatedReasoningPolicyBuildWorkflowResultAssetsOutcome BedrockClient::GetAu smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyBuildWorkflowResultAssetsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyBuildWorkflowResultAssets, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/result-assets"); return GetAutomatedReasoningPolicyBuildWorkflowResultAssetsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/result-assets"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1640,9 +1480,10 @@ GetAutomatedReasoningPolicyNextScenarioOutcome BedrockClient::GetAutomatedReason return GetAutomatedReasoningPolicyNextScenarioOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyNextScenario, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyNextScenario, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyNextScenario, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyNextScenario", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1651,20 +1492,15 @@ GetAutomatedReasoningPolicyNextScenarioOutcome BedrockClient::GetAutomatedReason smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyNextScenarioOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyNextScenario, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/scenarios"); return GetAutomatedReasoningPolicyNextScenarioOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/scenarios"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1685,9 +1521,10 @@ GetAutomatedReasoningPolicyTestCaseOutcome BedrockClient::GetAutomatedReasoningP return GetAutomatedReasoningPolicyTestCaseOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TestCaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyTestCase, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyTestCase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1696,19 +1533,14 @@ GetAutomatedReasoningPolicyTestCaseOutcome BedrockClient::GetAutomatedReasoningP smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyTestCaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyTestCase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTestCaseId()); return GetAutomatedReasoningPolicyTestCaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/test-cases/"); + resolvedEndpoint.AddPathSegment(request.GetTestCaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1734,9 +1566,10 @@ GetAutomatedReasoningPolicyTestResultOutcome BedrockClient::GetAutomatedReasonin return GetAutomatedReasoningPolicyTestResultOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TestCaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAutomatedReasoningPolicyTestResult, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetAutomatedReasoningPolicyTestResult, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetAutomatedReasoningPolicyTestResult, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAutomatedReasoningPolicyTestResult", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1745,22 +1578,17 @@ GetAutomatedReasoningPolicyTestResultOutcome BedrockClient::GetAutomatedReasonin smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetAutomatedReasoningPolicyTestResultOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAutomatedReasoningPolicyTestResult, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTestCaseId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-results"); return GetAutomatedReasoningPolicyTestResultOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/test-cases/"); + resolvedEndpoint.AddPathSegment(request.GetTestCaseId()); + resolvedEndpoint.AddPathSegments("/test-results"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1775,9 +1603,9 @@ GetCustomModelOutcome BedrockClient::GetCustomModel(const GetCustomModelRequest& return GetCustomModelOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCustomModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCustomModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1786,17 +1614,11 @@ GetCustomModelOutcome BedrockClient::GetCustomModel(const GetCustomModelRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetCustomModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetCustomModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/custom-models/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelIdentifier()); - return GetCustomModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetCustomModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/custom-models/"); + resolvedEndpoint.AddPathSegment(request.GetModelIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1811,9 +1633,9 @@ GetCustomModelDeploymentOutcome BedrockClient::GetCustomModelDeployment(const Ge return GetCustomModelDeploymentOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CustomModelDeploymentIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetCustomModelDeployment", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1822,17 +1644,12 @@ GetCustomModelDeploymentOutcome BedrockClient::GetCustomModelDeployment(const Ge smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetCustomModelDeploymentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetCustomModelDeployment, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization/custom-model-deployments/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCustomModelDeploymentIdentifier()); return GetCustomModelDeploymentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization/custom-model-deployments/"); + resolvedEndpoint.AddPathSegment(request.GetCustomModelDeploymentIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1847,9 +1664,9 @@ GetEvaluationJobOutcome BedrockClient::GetEvaluationJob(const GetEvaluationJobRe return GetEvaluationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetEvaluationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1858,17 +1675,11 @@ GetEvaluationJobOutcome BedrockClient::GetEvaluationJob(const GetEvaluationJobRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetEvaluationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetEvaluationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/evaluation-jobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - return GetEvaluationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetEvaluationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/evaluation-jobs/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1883,9 +1694,9 @@ GetFoundationModelOutcome BedrockClient::GetFoundationModel(const GetFoundationM return GetFoundationModelOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFoundationModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFoundationModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFoundationModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFoundationModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1894,17 +1705,11 @@ GetFoundationModelOutcome BedrockClient::GetFoundationModel(const GetFoundationM smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFoundationModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFoundationModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/foundation-models/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelIdentifier()); - return GetFoundationModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetFoundationModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/foundation-models/"); + resolvedEndpoint.AddPathSegment(request.GetModelIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1920,9 +1725,9 @@ GetFoundationModelAvailabilityOutcome BedrockClient::GetFoundationModelAvailabil return GetFoundationModelAvailabilityOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFoundationModelAvailability, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetFoundationModelAvailability, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetFoundationModelAvailability, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFoundationModelAvailability", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1931,17 +1736,12 @@ GetFoundationModelAvailabilityOutcome BedrockClient::GetFoundationModelAvailabil smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetFoundationModelAvailabilityOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetFoundationModelAvailability, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/foundation-model-availability/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); return GetFoundationModelAvailabilityOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/foundation-model-availability/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1956,9 +1756,9 @@ GetGuardrailOutcome BedrockClient::GetGuardrail(const GetGuardrailRequest& reque return GetGuardrailOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GuardrailIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetGuardrail", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1967,17 +1767,11 @@ GetGuardrailOutcome BedrockClient::GetGuardrail(const GetGuardrailRequest& reque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetGuardrailOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailIdentifier()); - return GetGuardrailOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/guardrails/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -1992,9 +1786,9 @@ GetImportedModelOutcome BedrockClient::GetImportedModel(const GetImportedModelRe return GetImportedModelOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetImportedModel, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetImportedModel", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2003,17 +1797,11 @@ GetImportedModelOutcome BedrockClient::GetImportedModel(const GetImportedModelRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetImportedModelOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetImportedModel, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/imported-models/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelIdentifier()); - return GetImportedModelOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetImportedModelOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/imported-models/"); + resolvedEndpoint.AddPathSegment(request.GetModelIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2028,9 +1816,9 @@ GetInferenceProfileOutcome BedrockClient::GetInferenceProfile(const GetInference return GetInferenceProfileOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InferenceProfileIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetInferenceProfile, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetInferenceProfile", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2039,17 +1827,11 @@ GetInferenceProfileOutcome BedrockClient::GetInferenceProfile(const GetInference smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetInferenceProfileOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetInferenceProfile, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/inference-profiles/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetInferenceProfileIdentifier()); - return GetInferenceProfileOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetInferenceProfileOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/inference-profiles/"); + resolvedEndpoint.AddPathSegment(request.GetInferenceProfileIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2064,9 +1846,9 @@ GetMarketplaceModelEndpointOutcome BedrockClient::GetMarketplaceModelEndpoint(co return GetMarketplaceModelEndpointOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2075,17 +1857,12 @@ GetMarketplaceModelEndpointOutcome BedrockClient::GetMarketplaceModelEndpoint(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointArn()); return GetMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints/"); + resolvedEndpoint.AddPathSegment(request.GetEndpointArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2100,9 +1877,9 @@ GetModelCopyJobOutcome BedrockClient::GetModelCopyJob(const GetModelCopyJobReque return GetModelCopyJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetModelCopyJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetModelCopyJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2111,17 +1888,11 @@ GetModelCopyJobOutcome BedrockClient::GetModelCopyJob(const GetModelCopyJobReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetModelCopyJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetModelCopyJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-copy-jobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobArn()); - return GetModelCopyJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetModelCopyJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-copy-jobs/"); + resolvedEndpoint.AddPathSegment(request.GetJobArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2136,9 +1907,9 @@ GetModelCustomizationJobOutcome BedrockClient::GetModelCustomizationJob(const Ge return GetModelCustomizationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetModelCustomizationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2147,17 +1918,12 @@ GetModelCustomizationJobOutcome BedrockClient::GetModelCustomizationJob(const Ge smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetModelCustomizationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetModelCustomizationJob, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization-jobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - return GetModelCustomizationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetModelCustomizationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization-jobs/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2172,9 +1938,9 @@ GetModelImportJobOutcome BedrockClient::GetModelImportJob(const GetModelImportJo return GetModelImportJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetModelImportJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetModelImportJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2183,17 +1949,11 @@ GetModelImportJobOutcome BedrockClient::GetModelImportJob(const GetModelImportJo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetModelImportJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetModelImportJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-import-jobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - return GetModelImportJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetModelImportJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-import-jobs/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2208,9 +1968,9 @@ GetModelInvocationJobOutcome BedrockClient::GetModelInvocationJob(const GetModel return GetModelInvocationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetModelInvocationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2219,17 +1979,12 @@ GetModelInvocationJobOutcome BedrockClient::GetModelInvocationJob(const GetModel smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetModelInvocationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetModelInvocationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-invocation-job/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - return GetModelInvocationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetModelInvocationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-invocation-job/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2240,9 +1995,10 @@ GetModelInvocationLoggingConfigurationOutcome BedrockClient::GetModelInvocationL const GetModelInvocationLoggingConfigurationRequest& request) const { AWS_OPERATION_GUARD(GetModelInvocationLoggingConfiguration); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetModelInvocationLoggingConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetModelInvocationLoggingConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2251,16 +2007,9 @@ GetModelInvocationLoggingConfigurationOutcome BedrockClient::GetModelInvocationL smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetModelInvocationLoggingConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetModelInvocationLoggingConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/logging/modelinvocations"); - return GetModelInvocationLoggingConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetModelInvocationLoggingConfigurationOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/logging/modelinvocations"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2275,9 +2024,9 @@ GetPromptRouterOutcome BedrockClient::GetPromptRouter(const GetPromptRouterReque return GetPromptRouterOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PromptRouterArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetPromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetPromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetPromptRouter, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetPromptRouter", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2286,17 +2035,11 @@ GetPromptRouterOutcome BedrockClient::GetPromptRouter(const GetPromptRouterReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetPromptRouterOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetPromptRouter, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompt-routers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPromptRouterArn()); - return GetPromptRouterOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetPromptRouterOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/prompt-routers/"); + resolvedEndpoint.AddPathSegment(request.GetPromptRouterArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2312,9 +2055,9 @@ GetProvisionedModelThroughputOutcome BedrockClient::GetProvisionedModelThroughpu return GetProvisionedModelThroughputOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProvisionedModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetProvisionedModelThroughput", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2323,17 +2066,12 @@ GetProvisionedModelThroughputOutcome BedrockClient::GetProvisionedModelThroughpu smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetProvisionedModelThroughputOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetProvisionedModelThroughput, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/provisioned-model-throughput/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetProvisionedModelId()); return GetProvisionedModelThroughputOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/provisioned-model-throughput/"); + resolvedEndpoint.AddPathSegment(request.GetProvisionedModelId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2343,9 +2081,9 @@ GetProvisionedModelThroughputOutcome BedrockClient::GetProvisionedModelThroughpu GetUseCaseForModelAccessOutcome BedrockClient::GetUseCaseForModelAccess(const GetUseCaseForModelAccessRequest& request) const { AWS_OPERATION_GUARD(GetUseCaseForModelAccess); AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetUseCaseForModelAccess, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, GetUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, GetUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetUseCaseForModelAccess", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2354,16 +2092,9 @@ GetUseCaseForModelAccessOutcome BedrockClient::GetUseCaseForModelAccess(const Ge smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> GetUseCaseForModelAccessOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetUseCaseForModelAccess, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/use-case-for-model-access"); - return GetUseCaseForModelAccessOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return GetUseCaseForModelAccessOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/use-case-for-model-access"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2374,9 +2105,9 @@ ListAutomatedReasoningPoliciesOutcome BedrockClient::ListAutomatedReasoningPolic const ListAutomatedReasoningPoliciesRequest& request) const { AWS_OPERATION_GUARD(ListAutomatedReasoningPolicies); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListAutomatedReasoningPolicies, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAutomatedReasoningPolicies, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAutomatedReasoningPolicies, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAutomatedReasoningPolicies, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAutomatedReasoningPolicies", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2385,16 +2116,11 @@ ListAutomatedReasoningPoliciesOutcome BedrockClient::ListAutomatedReasoningPolic smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAutomatedReasoningPoliciesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAutomatedReasoningPolicies, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies"); return ListAutomatedReasoningPoliciesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2411,9 +2137,10 @@ ListAutomatedReasoningPolicyBuildWorkflowsOutcome BedrockClient::ListAutomatedRe return ListAutomatedReasoningPolicyBuildWorkflowsOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAutomatedReasoningPolicyBuildWorkflows, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAutomatedReasoningPolicyBuildWorkflows, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAutomatedReasoningPolicyBuildWorkflows, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAutomatedReasoningPolicyBuildWorkflows", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2422,18 +2149,13 @@ ListAutomatedReasoningPolicyBuildWorkflowsOutcome BedrockClient::ListAutomatedRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAutomatedReasoningPolicyBuildWorkflowsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAutomatedReasoningPolicyBuildWorkflows, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows"); return ListAutomatedReasoningPolicyBuildWorkflowsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2449,9 +2171,10 @@ ListAutomatedReasoningPolicyTestCasesOutcome BedrockClient::ListAutomatedReasoni return ListAutomatedReasoningPolicyTestCasesOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAutomatedReasoningPolicyTestCases, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAutomatedReasoningPolicyTestCases, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAutomatedReasoningPolicyTestCases, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAutomatedReasoningPolicyTestCases", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2460,18 +2183,13 @@ ListAutomatedReasoningPolicyTestCasesOutcome BedrockClient::ListAutomatedReasoni smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAutomatedReasoningPolicyTestCasesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAutomatedReasoningPolicyTestCases, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases"); return ListAutomatedReasoningPolicyTestCasesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/test-cases"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2492,9 +2210,10 @@ ListAutomatedReasoningPolicyTestResultsOutcome BedrockClient::ListAutomatedReaso return ListAutomatedReasoningPolicyTestResultsOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListAutomatedReasoningPolicyTestResults, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListAutomatedReasoningPolicyTestResults, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListAutomatedReasoningPolicyTestResults, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListAutomatedReasoningPolicyTestResults", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2503,20 +2222,15 @@ ListAutomatedReasoningPolicyTestResultsOutcome BedrockClient::ListAutomatedReaso smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListAutomatedReasoningPolicyTestResultsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListAutomatedReasoningPolicyTestResults, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-results"); return ListAutomatedReasoningPolicyTestResultsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/test-results"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2526,9 +2240,9 @@ ListAutomatedReasoningPolicyTestResultsOutcome BedrockClient::ListAutomatedReaso ListCustomModelDeploymentsOutcome BedrockClient::ListCustomModelDeployments(const ListCustomModelDeploymentsRequest& request) const { AWS_OPERATION_GUARD(ListCustomModelDeployments); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListCustomModelDeployments, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListCustomModelDeployments, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListCustomModelDeployments, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListCustomModelDeployments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListCustomModelDeployments", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2537,16 +2251,11 @@ ListCustomModelDeploymentsOutcome BedrockClient::ListCustomModelDeployments(cons smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListCustomModelDeploymentsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListCustomModelDeployments, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization/custom-model-deployments"); return ListCustomModelDeploymentsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization/custom-model-deployments"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2556,9 +2265,9 @@ ListCustomModelDeploymentsOutcome BedrockClient::ListCustomModelDeployments(cons ListCustomModelsOutcome BedrockClient::ListCustomModels(const ListCustomModelsRequest& request) const { AWS_OPERATION_GUARD(ListCustomModels); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListCustomModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListCustomModels, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListCustomModels, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListCustomModels, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListCustomModels", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2567,16 +2276,9 @@ ListCustomModelsOutcome BedrockClient::ListCustomModels(const ListCustomModelsRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListCustomModelsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListCustomModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/custom-models"); - return ListCustomModelsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListCustomModelsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/custom-models"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2587,9 +2289,10 @@ ListEnforcedGuardrailsConfigurationOutcome BedrockClient::ListEnforcedGuardrails const ListEnforcedGuardrailsConfigurationRequest& request) const { AWS_OPERATION_GUARD(ListEnforcedGuardrailsConfiguration); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListEnforcedGuardrailsConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListEnforcedGuardrailsConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListEnforcedGuardrailsConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListEnforcedGuardrailsConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListEnforcedGuardrailsConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2598,16 +2301,11 @@ ListEnforcedGuardrailsConfigurationOutcome BedrockClient::ListEnforcedGuardrails smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListEnforcedGuardrailsConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListEnforcedGuardrailsConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/enforcedGuardrailsConfiguration"); return ListEnforcedGuardrailsConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/enforcedGuardrailsConfiguration"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2617,9 +2315,9 @@ ListEnforcedGuardrailsConfigurationOutcome BedrockClient::ListEnforcedGuardrails ListEvaluationJobsOutcome BedrockClient::ListEvaluationJobs(const ListEvaluationJobsRequest& request) const { AWS_OPERATION_GUARD(ListEvaluationJobs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListEvaluationJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListEvaluationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListEvaluationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListEvaluationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListEvaluationJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2628,16 +2326,9 @@ ListEvaluationJobsOutcome BedrockClient::ListEvaluationJobs(const ListEvaluation smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListEvaluationJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListEvaluationJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/evaluation-jobs"); - return ListEvaluationJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListEvaluationJobsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/evaluation-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2653,9 +2344,10 @@ ListFoundationModelAgreementOffersOutcome BedrockClient::ListFoundationModelAgre return ListFoundationModelAgreementOffersOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFoundationModelAgreementOffers, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFoundationModelAgreementOffers, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFoundationModelAgreementOffers, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFoundationModelAgreementOffers", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2664,17 +2356,12 @@ ListFoundationModelAgreementOffersOutcome BedrockClient::ListFoundationModelAgre smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFoundationModelAgreementOffersOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFoundationModelAgreementOffers, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/list-foundation-model-agreement-offers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetModelId()); return ListFoundationModelAgreementOffersOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/list-foundation-model-agreement-offers/"); + resolvedEndpoint.AddPathSegment(request.GetModelId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2684,9 +2371,9 @@ ListFoundationModelAgreementOffersOutcome BedrockClient::ListFoundationModelAgre ListFoundationModelsOutcome BedrockClient::ListFoundationModels(const ListFoundationModelsRequest& request) const { AWS_OPERATION_GUARD(ListFoundationModels); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListFoundationModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListFoundationModels, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListFoundationModels, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListFoundationModels, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListFoundationModels", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2695,16 +2382,9 @@ ListFoundationModelsOutcome BedrockClient::ListFoundationModels(const ListFounda smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListFoundationModelsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListFoundationModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/foundation-models"); - return ListFoundationModelsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListFoundationModelsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/foundation-models"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2714,9 +2394,9 @@ ListFoundationModelsOutcome BedrockClient::ListFoundationModels(const ListFounda ListGuardrailsOutcome BedrockClient::ListGuardrails(const ListGuardrailsRequest& request) const { AWS_OPERATION_GUARD(ListGuardrails); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListGuardrails, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListGuardrails, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListGuardrails, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListGuardrails, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListGuardrails", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2725,16 +2405,9 @@ ListGuardrailsOutcome BedrockClient::ListGuardrails(const ListGuardrailsRequest& smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListGuardrailsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListGuardrails, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails"); - return ListGuardrailsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListGuardrailsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/guardrails"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2744,9 +2417,9 @@ ListGuardrailsOutcome BedrockClient::ListGuardrails(const ListGuardrailsRequest& ListImportedModelsOutcome BedrockClient::ListImportedModels(const ListImportedModelsRequest& request) const { AWS_OPERATION_GUARD(ListImportedModels); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListImportedModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListImportedModels, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListImportedModels, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListImportedModels, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListImportedModels", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2755,16 +2428,9 @@ ListImportedModelsOutcome BedrockClient::ListImportedModels(const ListImportedMo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListImportedModelsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListImportedModels, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/imported-models"); - return ListImportedModelsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListImportedModelsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/imported-models"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2774,9 +2440,9 @@ ListImportedModelsOutcome BedrockClient::ListImportedModels(const ListImportedMo ListInferenceProfilesOutcome BedrockClient::ListInferenceProfiles(const ListInferenceProfilesRequest& request) const { AWS_OPERATION_GUARD(ListInferenceProfiles); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListInferenceProfiles, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListInferenceProfiles, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListInferenceProfiles, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListInferenceProfiles, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListInferenceProfiles", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2785,16 +2451,9 @@ ListInferenceProfilesOutcome BedrockClient::ListInferenceProfiles(const ListInfe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListInferenceProfilesOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListInferenceProfiles, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/inference-profiles"); - return ListInferenceProfilesOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListInferenceProfilesOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/inference-profiles"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2805,9 +2464,9 @@ ListMarketplaceModelEndpointsOutcome BedrockClient::ListMarketplaceModelEndpoint const ListMarketplaceModelEndpointsRequest& request) const { AWS_OPERATION_GUARD(ListMarketplaceModelEndpoints); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListMarketplaceModelEndpoints, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListMarketplaceModelEndpoints, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListMarketplaceModelEndpoints, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListMarketplaceModelEndpoints, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListMarketplaceModelEndpoints", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2816,16 +2475,11 @@ ListMarketplaceModelEndpointsOutcome BedrockClient::ListMarketplaceModelEndpoint smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListMarketplaceModelEndpointsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListMarketplaceModelEndpoints, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints"); return ListMarketplaceModelEndpointsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2835,9 +2489,9 @@ ListMarketplaceModelEndpointsOutcome BedrockClient::ListMarketplaceModelEndpoint ListModelCopyJobsOutcome BedrockClient::ListModelCopyJobs(const ListModelCopyJobsRequest& request) const { AWS_OPERATION_GUARD(ListModelCopyJobs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListModelCopyJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListModelCopyJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListModelCopyJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListModelCopyJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListModelCopyJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2846,16 +2500,9 @@ ListModelCopyJobsOutcome BedrockClient::ListModelCopyJobs(const ListModelCopyJob smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListModelCopyJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListModelCopyJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-copy-jobs"); - return ListModelCopyJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListModelCopyJobsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-copy-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2865,9 +2512,9 @@ ListModelCopyJobsOutcome BedrockClient::ListModelCopyJobs(const ListModelCopyJob ListModelCustomizationJobsOutcome BedrockClient::ListModelCustomizationJobs(const ListModelCustomizationJobsRequest& request) const { AWS_OPERATION_GUARD(ListModelCustomizationJobs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListModelCustomizationJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListModelCustomizationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListModelCustomizationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListModelCustomizationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListModelCustomizationJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2876,16 +2523,9 @@ ListModelCustomizationJobsOutcome BedrockClient::ListModelCustomizationJobs(cons smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListModelCustomizationJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListModelCustomizationJobs, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization-jobs"); - return ListModelCustomizationJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListModelCustomizationJobsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-customization-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2895,9 +2535,9 @@ ListModelCustomizationJobsOutcome BedrockClient::ListModelCustomizationJobs(cons ListModelImportJobsOutcome BedrockClient::ListModelImportJobs(const ListModelImportJobsRequest& request) const { AWS_OPERATION_GUARD(ListModelImportJobs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListModelImportJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListModelImportJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListModelImportJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListModelImportJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListModelImportJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2906,16 +2546,9 @@ ListModelImportJobsOutcome BedrockClient::ListModelImportJobs(const ListModelImp smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListModelImportJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListModelImportJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-import-jobs"); - return ListModelImportJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListModelImportJobsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-import-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2925,9 +2558,9 @@ ListModelImportJobsOutcome BedrockClient::ListModelImportJobs(const ListModelImp ListModelInvocationJobsOutcome BedrockClient::ListModelInvocationJobs(const ListModelInvocationJobsRequest& request) const { AWS_OPERATION_GUARD(ListModelInvocationJobs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListModelInvocationJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListModelInvocationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListModelInvocationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListModelInvocationJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListModelInvocationJobs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2936,16 +2569,9 @@ ListModelInvocationJobsOutcome BedrockClient::ListModelInvocationJobs(const List smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListModelInvocationJobsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListModelInvocationJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-invocation-jobs"); - return ListModelInvocationJobsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListModelInvocationJobsOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/model-invocation-jobs"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2955,9 +2581,9 @@ ListModelInvocationJobsOutcome BedrockClient::ListModelInvocationJobs(const List ListPromptRoutersOutcome BedrockClient::ListPromptRouters(const ListPromptRoutersRequest& request) const { AWS_OPERATION_GUARD(ListPromptRouters); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListPromptRouters, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListPromptRouters, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListPromptRouters, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListPromptRouters, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListPromptRouters", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2966,16 +2592,9 @@ ListPromptRoutersOutcome BedrockClient::ListPromptRouters(const ListPromptRouter smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListPromptRoutersOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListPromptRouters, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/prompt-routers"); - return ListPromptRoutersOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + return ListPromptRoutersOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/prompt-routers"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2986,9 +2605,10 @@ ListProvisionedModelThroughputsOutcome BedrockClient::ListProvisionedModelThroug const ListProvisionedModelThroughputsRequest& request) const { AWS_OPERATION_GUARD(ListProvisionedModelThroughputs); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListProvisionedModelThroughputs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListProvisionedModelThroughputs, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListProvisionedModelThroughputs, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListProvisionedModelThroughputs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListProvisionedModelThroughputs", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -2997,16 +2617,11 @@ ListProvisionedModelThroughputsOutcome BedrockClient::ListProvisionedModelThroug smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListProvisionedModelThroughputsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListProvisionedModelThroughputs, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/provisioned-model-throughputs"); return ListProvisionedModelThroughputsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/provisioned-model-throughputs"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3016,9 +2631,9 @@ ListProvisionedModelThroughputsOutcome BedrockClient::ListProvisionedModelThroug ListTagsForResourceOutcome BedrockClient::ListTagsForResource(const ListTagsForResourceRequest& request) const { AWS_OPERATION_GUARD(ListTagsForResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, ListTagsForResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListTagsForResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3027,16 +2642,9 @@ ListTagsForResourceOutcome BedrockClient::ListTagsForResource(const ListTagsForR smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> ListTagsForResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, ListTagsForResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/listTagsForResource"); - return ListTagsForResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ListTagsForResourceOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/listTagsForResource"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3047,9 +2655,10 @@ PutEnforcedGuardrailConfigurationOutcome BedrockClient::PutEnforcedGuardrailConf const PutEnforcedGuardrailConfigurationRequest& request) const { AWS_OPERATION_GUARD(PutEnforcedGuardrailConfiguration); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutEnforcedGuardrailConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutEnforcedGuardrailConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PutEnforcedGuardrailConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutEnforcedGuardrailConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutEnforcedGuardrailConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3058,16 +2667,11 @@ PutEnforcedGuardrailConfigurationOutcome BedrockClient::PutEnforcedGuardrailConf smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PutEnforcedGuardrailConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PutEnforcedGuardrailConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/enforcedGuardrailsConfiguration"); return PutEnforcedGuardrailConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/enforcedGuardrailsConfiguration"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3078,9 +2682,10 @@ PutModelInvocationLoggingConfigurationOutcome BedrockClient::PutModelInvocationL const PutModelInvocationLoggingConfigurationRequest& request) const { AWS_OPERATION_GUARD(PutModelInvocationLoggingConfiguration); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PutModelInvocationLoggingConfiguration, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutModelInvocationLoggingConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutModelInvocationLoggingConfiguration", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3089,16 +2694,9 @@ PutModelInvocationLoggingConfigurationOutcome BedrockClient::PutModelInvocationL smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PutModelInvocationLoggingConfigurationOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PutModelInvocationLoggingConfiguration, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/logging/modelinvocations"); - return PutModelInvocationLoggingConfigurationOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return PutModelInvocationLoggingConfigurationOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/logging/modelinvocations"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3108,9 +2706,9 @@ PutModelInvocationLoggingConfigurationOutcome BedrockClient::PutModelInvocationL PutUseCaseForModelAccessOutcome BedrockClient::PutUseCaseForModelAccess(const PutUseCaseForModelAccessRequest& request) const { AWS_OPERATION_GUARD(PutUseCaseForModelAccess); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutUseCaseForModelAccess, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, PutUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, PutUseCaseForModelAccess, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutUseCaseForModelAccess", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3119,16 +2717,9 @@ PutUseCaseForModelAccessOutcome BedrockClient::PutUseCaseForModelAccess(const Pu smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> PutUseCaseForModelAccessOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PutUseCaseForModelAccess, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/use-case-for-model-access"); - return PutUseCaseForModelAccessOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return PutUseCaseForModelAccessOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/use-case-for-model-access"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3144,9 +2735,10 @@ RegisterMarketplaceModelEndpointOutcome BedrockClient::RegisterMarketplaceModelE return RegisterMarketplaceModelEndpointOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RegisterMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, RegisterMarketplaceModelEndpoint, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, RegisterMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RegisterMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3155,18 +2747,13 @@ RegisterMarketplaceModelEndpointOutcome BedrockClient::RegisterMarketplaceModelE smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> RegisterMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, RegisterMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/registration"); return RegisterMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints/"); + resolvedEndpoint.AddPathSegment(request.GetEndpointIdentifier()); + resolvedEndpoint.AddPathSegments("/registration"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3188,9 +2775,10 @@ StartAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::StartAutomatedR return StartAutomatedReasoningPolicyBuildWorkflowOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowType]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StartAutomatedReasoningPolicyBuildWorkflow, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartAutomatedReasoningPolicyBuildWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartAutomatedReasoningPolicyBuildWorkflow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3199,22 +2787,17 @@ StartAutomatedReasoningPolicyBuildWorkflowOutcome BedrockClient::StartAutomatedR smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StartAutomatedReasoningPolicyBuildWorkflowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartAutomatedReasoningPolicyBuildWorkflow, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment( - AutomatedReasoningPolicyBuildWorkflowTypeMapper::GetNameForAutomatedReasoningPolicyBuildWorkflowType( - request.GetBuildWorkflowType())); - endpointResolutionOutcome.GetResult().AddPathSegments("/start"); - return StartAutomatedReasoningPolicyBuildWorkflowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StartAutomatedReasoningPolicyBuildWorkflowOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment( + AutomatedReasoningPolicyBuildWorkflowTypeMapper::GetNameForAutomatedReasoningPolicyBuildWorkflowType( + request.GetBuildWorkflowType())); + resolvedEndpoint.AddPathSegments("/start"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3236,9 +2819,10 @@ StartAutomatedReasoningPolicyTestWorkflowOutcome BedrockClient::StartAutomatedRe return StartAutomatedReasoningPolicyTestWorkflowOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartAutomatedReasoningPolicyTestWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StartAutomatedReasoningPolicyTestWorkflow, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StartAutomatedReasoningPolicyTestWorkflow, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartAutomatedReasoningPolicyTestWorkflow", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3247,20 +2831,15 @@ StartAutomatedReasoningPolicyTestWorkflowOutcome BedrockClient::StartAutomatedRe smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StartAutomatedReasoningPolicyTestWorkflowOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StartAutomatedReasoningPolicyTestWorkflow, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-workflows"); return StartAutomatedReasoningPolicyTestWorkflowOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/test-workflows"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3275,9 +2854,9 @@ StopEvaluationJobOutcome BedrockClient::StopEvaluationJob(const StopEvaluationJo return StopEvaluationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StopEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StopEvaluationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopEvaluationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3286,18 +2865,12 @@ StopEvaluationJobOutcome BedrockClient::StopEvaluationJob(const StopEvaluationJo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StopEvaluationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StopEvaluationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/evaluation-job/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stop"); - return StopEvaluationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StopEvaluationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/evaluation-job/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + resolvedEndpoint.AddPathSegments("/stop"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3312,9 +2885,9 @@ StopModelCustomizationJobOutcome BedrockClient::StopModelCustomizationJob(const return StopModelCustomizationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StopModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StopModelCustomizationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopModelCustomizationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3323,18 +2896,13 @@ StopModelCustomizationJobOutcome BedrockClient::StopModelCustomizationJob(const smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StopModelCustomizationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StopModelCustomizationJob, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization-jobs/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stop"); - return StopModelCustomizationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StopModelCustomizationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization-jobs/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + resolvedEndpoint.AddPathSegments("/stop"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3349,9 +2917,9 @@ StopModelInvocationJobOutcome BedrockClient::StopModelInvocationJob(const StopMo return StopModelInvocationJobOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, StopModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, StopModelInvocationJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopModelInvocationJob", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3360,18 +2928,13 @@ StopModelInvocationJobOutcome BedrockClient::StopModelInvocationJob(const StopMo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> StopModelInvocationJobOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, StopModelInvocationJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-invocation-job/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetJobIdentifier()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stop"); - return StopModelInvocationJobOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return StopModelInvocationJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), + Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-invocation-job/"); + resolvedEndpoint.AddPathSegment(request.GetJobIdentifier()); + resolvedEndpoint.AddPathSegments("/stop"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3381,9 +2944,9 @@ StopModelInvocationJobOutcome BedrockClient::StopModelInvocationJob(const StopMo TagResourceOutcome BedrockClient::TagResource(const TagResourceRequest& request) const { AWS_OPERATION_GUARD(TagResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, TagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".TagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3392,16 +2955,9 @@ TagResourceOutcome BedrockClient::TagResource(const TagResourceRequest& request) smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> TagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, TagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/tagResource"); - return TagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return TagResourceOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/tagResource"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3411,9 +2967,9 @@ TagResourceOutcome BedrockClient::TagResource(const TagResourceRequest& request) UntagResourceOutcome BedrockClient::UntagResource(const UntagResourceRequest& request) const { AWS_OPERATION_GUARD(UntagResource); AWS_OPERATION_CHECK_PTR(m_endpointProvider, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UntagResource, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UntagResource", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3422,16 +2978,9 @@ UntagResourceOutcome BedrockClient::UntagResource(const UntagResourceRequest& re smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UntagResourceOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UntagResource, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/untagResource"); - return UntagResourceOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return UntagResourceOutcome(MakeRequestDeserialize( + &request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { resolvedEndpoint.AddPathSegments("/untagResource"); })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3447,9 +2996,9 @@ UpdateAutomatedReasoningPolicyOutcome BedrockClient::UpdateAutomatedReasoningPol return UpdateAutomatedReasoningPolicyOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PolicyArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAutomatedReasoningPolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAutomatedReasoningPolicy", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3458,17 +3007,12 @@ UpdateAutomatedReasoningPolicyOutcome BedrockClient::UpdateAutomatedReasoningPol smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAutomatedReasoningPolicyOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAutomatedReasoningPolicy, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); return UpdateAutomatedReasoningPolicyOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3490,9 +3034,10 @@ UpdateAutomatedReasoningPolicyAnnotationsOutcome BedrockClient::UpdateAutomatedR return UpdateAutomatedReasoningPolicyAnnotationsOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [BuildWorkflowId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAutomatedReasoningPolicyAnnotations, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAutomatedReasoningPolicyAnnotations, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAutomatedReasoningPolicyAnnotations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAutomatedReasoningPolicyAnnotations", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3501,20 +3046,15 @@ UpdateAutomatedReasoningPolicyAnnotationsOutcome BedrockClient::UpdateAutomatedR smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAutomatedReasoningPolicyAnnotationsOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAutomatedReasoningPolicyAnnotations, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/build-workflows/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetBuildWorkflowId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/annotations"); return UpdateAutomatedReasoningPolicyAnnotationsOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/build-workflows/"); + resolvedEndpoint.AddPathSegment(request.GetBuildWorkflowId()); + resolvedEndpoint.AddPathSegments("/annotations"); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3535,9 +3075,10 @@ UpdateAutomatedReasoningPolicyTestCaseOutcome BedrockClient::UpdateAutomatedReas return UpdateAutomatedReasoningPolicyTestCaseOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TestCaseId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateAutomatedReasoningPolicyTestCase, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateAutomatedReasoningPolicyTestCase, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateAutomatedReasoningPolicyTestCase", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3546,19 +3087,14 @@ UpdateAutomatedReasoningPolicyTestCaseOutcome BedrockClient::UpdateAutomatedReas smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateAutomatedReasoningPolicyTestCaseOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateAutomatedReasoningPolicyTestCase, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/automated-reasoning-policies/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPolicyArn()); - endpointResolutionOutcome.GetResult().AddPathSegments("/test-cases/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetTestCaseId()); return UpdateAutomatedReasoningPolicyTestCaseOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/automated-reasoning-policies/"); + resolvedEndpoint.AddPathSegment(request.GetPolicyArn()); + resolvedEndpoint.AddPathSegments("/test-cases/"); + resolvedEndpoint.AddPathSegment(request.GetTestCaseId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3573,9 +3109,9 @@ UpdateCustomModelDeploymentOutcome BedrockClient::UpdateCustomModelDeployment(co return UpdateCustomModelDeploymentOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [CustomModelDeploymentIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateCustomModelDeployment, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateCustomModelDeployment", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3584,17 +3120,12 @@ UpdateCustomModelDeploymentOutcome BedrockClient::UpdateCustomModelDeployment(co smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateCustomModelDeploymentOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateCustomModelDeployment, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/model-customization/custom-model-deployments/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetCustomModelDeploymentIdentifier()); return UpdateCustomModelDeploymentOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/model-customization/custom-model-deployments/"); + resolvedEndpoint.AddPathSegment(request.GetCustomModelDeploymentIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3609,9 +3140,9 @@ UpdateGuardrailOutcome BedrockClient::UpdateGuardrail(const UpdateGuardrailReque return UpdateGuardrailOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GuardrailIdentifier]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateGuardrail, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateGuardrail", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3620,17 +3151,11 @@ UpdateGuardrailOutcome BedrockClient::UpdateGuardrail(const UpdateGuardrailReque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateGuardrailOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateGuardrail, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, - endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/guardrails/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGuardrailIdentifier()); - return UpdateGuardrailOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + return UpdateGuardrailOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/guardrails/"); + resolvedEndpoint.AddPathSegment(request.GetGuardrailIdentifier()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3646,9 +3171,9 @@ UpdateMarketplaceModelEndpointOutcome BedrockClient::UpdateMarketplaceModelEndpo return UpdateMarketplaceModelEndpointOutcome(Aws::Client::AWSError(BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EndpointArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateMarketplaceModelEndpoint, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateMarketplaceModelEndpoint", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3657,17 +3182,12 @@ UpdateMarketplaceModelEndpointOutcome BedrockClient::UpdateMarketplaceModelEndpo smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateMarketplaceModelEndpointOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateMarketplaceModelEndpoint, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/marketplace-model/endpoints/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetEndpointArn()); return UpdateMarketplaceModelEndpointOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/marketplace-model/endpoints/"); + resolvedEndpoint.AddPathSegment(request.GetEndpointArn()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3683,9 +3203,10 @@ UpdateProvisionedModelThroughputOutcome BedrockClient::UpdateProvisionedModelThr return UpdateProvisionedModelThroughputOutcome(Aws::Client::AWSError( BedrockErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProvisionedModelId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); - auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); - auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, UpdateProvisionedModelThroughput, CoreErrors, + CoreErrors::NOT_INITIALIZED); + auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); AWS_OPERATION_CHECK_PTR(meter, UpdateProvisionedModelThroughput, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateProvisionedModelThroughput", {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, @@ -3694,17 +3215,12 @@ UpdateProvisionedModelThroughputOutcome BedrockClient::UpdateProvisionedModelThr smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]() -> UpdateProvisionedModelThroughputOutcome { - auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( - [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, - TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, *meter, - {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, - {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); - AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateProvisionedModelThroughput, CoreErrors, - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/provisioned-model-throughput/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetProvisionedModelId()); return UpdateProvisionedModelThroughputOutcome( - MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, + [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + resolvedEndpoint.AddPathSegments("/provisioned-model-throughput/"); + resolvedEndpoint.AddPathSegment(request.GetProvisionedModelId()); + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, From 268bb5409ef1e24368cbb12611e815a7d999d61f Mon Sep 17 00:00:00 2001 From: sbaluja Date: Mon, 29 Dec 2025 20:14:19 -0500 Subject: [PATCH 3/4] Use full namepsace for Event::Message --- .../aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp | 2 +- .../include/aws/core/utils/event/EventEncoderStream.h | 2 +- .../cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp b/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp index 0169b0e8fe0..1dea6aa0931 100644 --- a/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp +++ b/generated/src/aws-cpp-sdk-bedrock-runtime/source/BedrockRuntimeClient.cpp @@ -424,7 +424,7 @@ void BedrockRuntimeClient::InvokeModelWithBidirectionalStreamAsync( auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); auto authCallback = [&](std::shared_ptr ctx) -> void { - eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Event::Message& message, Aws::String& seed) -> bool { + eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Aws::Utils::Event::Message& message, Aws::String& seed) -> bool { auto outcome = SignEventMessage(message, seed, ctx); return outcome.IsSuccess(); }); diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h index 2108ba7bf88..b457ab4ae84 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h +++ b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h @@ -57,7 +57,7 @@ namespace Aws /** * Sets a custom signing callback for event signing. */ - void SetSigningCallback(const EventStreamEncoder::SigningCallback& callback) { m_encoder.SetSigningCallback(callback); } + void SetSigningCallback(const Aws::Utils::Event::EventStreamEncoder::SigningCallback& callback) { m_encoder.SetSigningCallback(callback); } /** * Allows a stream writer to communicate the end of the stream to a stream reader. diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm index d939a598215..e4191d14e53 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm @@ -29,7 +29,7 @@ void ${className}::${operation.name}Async(Model::${operation.request.shape.name} #set($streamModelNameWithFirstLetterCapitalized = $CppViewHelper.capitalizeFirstChar($streamModelName)) auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); auto authCallback = [&](std::shared_ptr ctx) -> void { - eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Event::Message& message, Aws::String& seed) -> bool { + eventEncoderStream->SetSigningCallback([this, ctx, eventEncoderStream](Aws::Utils::Event::Message& message, Aws::String& seed) -> bool { auto outcome = SignEventMessage(message, seed, ctx); return outcome.IsSuccess(); }); From 9d67d276025893e4e1b550c588ac22500eb2d509 Mon Sep 17 00:00:00 2001 From: sbaluja Date: Mon, 29 Dec 2025 21:09:54 -0500 Subject: [PATCH 4/4] Fix 'hides overloaded virtual function' error --- .../include/smithy/client/common/AwsSmithyRequestSigning.h | 2 +- .../include/smithy/identity/signer/AwsSignerBase.h | 2 +- .../include/smithy/identity/signer/built-in/SigV4Signer.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h index 46452759d6e..682646a6afd 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h @@ -281,7 +281,7 @@ namespace smithy false/*retryable*/)); return; } - result.emplace(signer->sign(m_message, m_seed, *static_cast(m_requestContext->m_awsIdentity.get()), + result.emplace(signer->signMessage(m_message, m_seed, *static_cast(m_requestContext->m_awsIdentity.get()), m_requestContext->m_authSchemeOption.signerProperties())); } }; diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h b/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h index f4ec7ed157c..4e98c08ee61 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/signer/AwsSignerBase.h @@ -49,7 +49,7 @@ namespace smithy { // signer may copy the original httpRequest or create a new one virtual SigningFutureOutcome sign(std::shared_ptr httpRequest, const IdentityT& identity, SigningProperties properties) = 0; virtual SigningFutureOutcome presign(std::shared_ptr httpRequest, const IdentityT& identity, SigningProperties properties, const Aws::String& region, const Aws::String& serviceName, long long expirationTimeInSeconds) = 0; - virtual SigningEventOutcome sign(Aws::Utils::Event::Message&, Aws::String&, const IdentityT&, SigningProperties) { return SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, "", "Failed to sign with a signer that doesn't support signing event messages", false /*retryable*/); }; + virtual SigningEventOutcome signMessage(Aws::Utils::Event::Message&, Aws::String&, const IdentityT&, SigningProperties) { return SigningError(Aws::Client::CoreErrors::CLIENT_SIGNING_FAILURE, "", "Failed to sign with a signer that doesn't support signing event messages", false /*retryable*/); }; virtual ~AwsSignerBase() {}; }; diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h index 8657dc9f0fb..4d4586ebc29 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/SigV4Signer.h @@ -95,7 +95,7 @@ namespace smithy { false /*retryable*/)); } - SigningEventOutcome sign(Aws::Utils::Event::Message& msg, Aws::String& seed, const AwsCredentialIdentityBase& identity, SigningProperties properties) override { + SigningEventOutcome signMessage(Aws::Utils::Event::Message& msg, Aws::String& seed, const AwsCredentialIdentityBase& identity, SigningProperties properties) override { AWS_UNREFERENCED_PARAM(properties); const auto legacyCreds = [&identity]() -> Aws::Auth::AWSCredentials { if(identity.sessionToken().has_value() && identity.expiration().has_value())