diff --git a/generated/src/aws-cpp-sdk-marketplace-catalog/include/aws/marketplace-catalog/MarketplaceCatalogClient.h b/generated/src/aws-cpp-sdk-marketplace-catalog/include/aws/marketplace-catalog/MarketplaceCatalogClient.h index 699f2991526..92f1c71ebe6 100644 --- a/generated/src/aws-cpp-sdk-marketplace-catalog/include/aws/marketplace-catalog/MarketplaceCatalogClient.h +++ b/generated/src/aws-cpp-sdk-marketplace-catalog/include/aws/marketplace-catalog/MarketplaceCatalogClient.h @@ -6,15 +6,18 @@ #pragma once #include #include -#include #include -#include #include +#include +#include +#include +#include namespace Aws { namespace MarketplaceCatalog { + AWS_MARKETPLACECATALOG_API extern const char SERVICE_NAME[]; /** *

Catalog API actions allow you to manage your entities through list, describe, * and update capabilities. An entity can be a product or an offer on AWS @@ -23,12 +26,19 @@ namespace MarketplaceCatalog * deployment pipelines. You can also create your own applications on top of the * Catalog API to manage your products on AWS Marketplace.

*/ - class AWS_MARKETPLACECATALOG_API MarketplaceCatalogClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods + class AWS_MARKETPLACECATALOG_API MarketplaceCatalogClient : smithy::client::AwsSmithyClientT, + Aws::Crt::Variant, + MarketplaceCatalogEndpointProviderBase, + smithy::client::JsonOutcomeSerializer, + smithy::client::JsonOutcome>, + Aws::Client::ClientWithAsyncTemplateMethods { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "Marketplace Catalog"; } typedef MarketplaceCatalogClientConfiguration ClientConfigurationType; typedef MarketplaceCatalogEndpointProvider EndpointProviderType; @@ -459,8 +469,6 @@ namespace MarketplaceCatalog friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const MarketplaceCatalogClientConfiguration& clientConfiguration); - MarketplaceCatalogClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace MarketplaceCatalog diff --git a/generated/src/aws-cpp-sdk-marketplace-catalog/source/MarketplaceCatalogClient.cpp b/generated/src/aws-cpp-sdk-marketplace-catalog/source/MarketplaceCatalogClient.cpp index 7984ef542ef..139b39d6f39 100644 --- a/generated/src/aws-cpp-sdk-marketplace-catalog/source/MarketplaceCatalogClient.cpp +++ b/generated/src/aws-cpp-sdk-marketplace-catalog/source/MarketplaceCatalogClient.cpp @@ -4,20 +4,18 @@ */ #include -#include #include #include #include -#include #include #include -#include #include #include #include #include #include + #include #include #include @@ -37,6 +35,9 @@ #include +#include +#include +#include using namespace Aws; using namespace Aws::Auth; @@ -52,100 +53,106 @@ namespace Aws { namespace MarketplaceCatalog { - const char SERVICE_NAME[] = "aws-marketplace"; const char ALLOCATION_TAG[] = "MarketplaceCatalogClient"; + const char SERVICE_NAME[] = "aws-marketplace"; } } const char* MarketplaceCatalogClient::GetServiceName() {return SERVICE_NAME;} const char* MarketplaceCatalogClient::GetAllocationTag() {return ALLOCATION_TAG;} MarketplaceCatalogClient::MarketplaceCatalogClient(const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& clientConfiguration, - std::shared_ptr endpointProvider) : - BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG), - SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) + std::shared_ptr endpointProvider) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + }) { init(m_clientConfiguration); } MarketplaceCatalogClient::MarketplaceCatalogClient(const AWSCredentials& credentials, - std::shared_ptr endpointProvider, - const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& 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)) + std::shared_ptr endpointProvider, + const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), GetServiceName(), clientConfiguration.region}}, + }) { init(m_clientConfiguration); } MarketplaceCatalogClient::MarketplaceCatalogClient(const std::shared_ptr& credentialsProvider, - std::shared_ptr endpointProvider, - const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& 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)) + std::shared_ptr endpointProvider, + const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{ Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } - /* Legacy constructors due deprecation */ - MarketplaceCatalogClient::MarketplaceCatalogClient(const Client::ClientConfiguration& clientConfiguration) : - BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG), - SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) +/* Legacy constructors due deprecation */ +MarketplaceCatalogClient::MarketplaceCatalogClient(const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } MarketplaceCatalogClient::MarketplaceCatalogClient(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)) + const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } MarketplaceCatalogClient::MarketplaceCatalogClient(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)) + const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } +/* End of legacy constructors due deprecation */ - /* End of legacy constructors due deprecation */ MarketplaceCatalogClient::~MarketplaceCatalogClient() { ShutdownSdkClient(this, -1); @@ -158,7 +165,6 @@ std::shared_ptr& MarketplaceCatalogClien void MarketplaceCatalogClient::init(const MarketplaceCatalog::MarketplaceCatalogClientConfiguration& config) { - AWSClient::SetServiceClientName("Marketplace Catalog"); if (!m_clientConfiguration.executor) { if (!m_clientConfiguration.configFactories.executorCreateFn()) { AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); @@ -173,31 +179,27 @@ void MarketplaceCatalogClient::init(const MarketplaceCatalog::MarketplaceCatalog void MarketplaceCatalogClient::OverrideEndpoint(const Aws::String& endpoint) { - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->OverrideEndpoint(endpoint); + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_endpointProvider->OverrideEndpoint(endpoint); } BatchDescribeEntitiesOutcome MarketplaceCatalogClient::BatchDescribeEntities(const BatchDescribeEntitiesRequest& request) const { AWS_OPERATION_GUARD(BatchDescribeEntities); AWS_OPERATION_CHECK_PTR(m_endpointProvider, BatchDescribeEntities, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, BatchDescribeEntities, 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, BatchDescribeEntities, 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, BatchDescribeEntities, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".BatchDescribeEntities", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> BatchDescribeEntitiesOutcome { - 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, BatchDescribeEntities, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/BatchDescribeEntities"); - return BatchDescribeEntitiesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/BatchDescribeEntities"); + return BatchDescribeEntitiesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -218,23 +220,19 @@ CancelChangeSetOutcome MarketplaceCatalogClient::CancelChangeSet(const CancelCha AWS_LOGSTREAM_ERROR("CancelChangeSet", "Required field: ChangeSetId, is not set"); return CancelChangeSetOutcome(Aws::Client::AWSError(MarketplaceCatalogErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ChangeSetId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CancelChangeSet, 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, CancelChangeSet, 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, CancelChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CancelChangeSet", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CancelChangeSetOutcome { - 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, CancelChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/CancelChangeSet"); - return CancelChangeSetOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/CancelChangeSet"); + return CancelChangeSetOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -250,23 +248,19 @@ DeleteResourcePolicyOutcome MarketplaceCatalogClient::DeleteResourcePolicy(const AWS_LOGSTREAM_ERROR("DeleteResourcePolicy", "Required field: ResourceArn, is not set"); return DeleteResourcePolicyOutcome(Aws::Client::AWSError(MarketplaceCatalogErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteResourcePolicy, 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, DeleteResourcePolicy, 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, DeleteResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteResourcePolicy", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteResourcePolicyOutcome { - 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, DeleteResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/DeleteResourcePolicy"); - return DeleteResourcePolicyOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/DeleteResourcePolicy"); + return DeleteResourcePolicyOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -287,23 +281,19 @@ DescribeChangeSetOutcome MarketplaceCatalogClient::DescribeChangeSet(const Descr AWS_LOGSTREAM_ERROR("DescribeChangeSet", "Required field: ChangeSetId, is not set"); return DescribeChangeSetOutcome(Aws::Client::AWSError(MarketplaceCatalogErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ChangeSetId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeChangeSet, 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, DescribeChangeSet, 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, DescribeChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeChangeSet", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeChangeSetOutcome { - 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, DescribeChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/DescribeChangeSet"); - return DescribeChangeSetOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/DescribeChangeSet"); + return DescribeChangeSetOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -324,23 +314,19 @@ DescribeEntityOutcome MarketplaceCatalogClient::DescribeEntity(const DescribeEnt AWS_LOGSTREAM_ERROR("DescribeEntity", "Required field: EntityId, is not set"); return DescribeEntityOutcome(Aws::Client::AWSError(MarketplaceCatalogErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EntityId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DescribeEntity, 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, DescribeEntity, 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, DescribeEntity, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DescribeEntity", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DescribeEntityOutcome { - 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, DescribeEntity, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/DescribeEntity"); - return DescribeEntityOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/DescribeEntity"); + return DescribeEntityOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -356,23 +342,19 @@ GetResourcePolicyOutcome MarketplaceCatalogClient::GetResourcePolicy(const GetRe AWS_LOGSTREAM_ERROR("GetResourcePolicy", "Required field: ResourceArn, is not set"); return GetResourcePolicyOutcome(Aws::Client::AWSError(MarketplaceCatalogErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetResourcePolicy, 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, GetResourcePolicy, 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, GetResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetResourcePolicy", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetResourcePolicyOutcome { - 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, GetResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/GetResourcePolicy"); - return GetResourcePolicyOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/GetResourcePolicy"); + return GetResourcePolicyOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -383,23 +365,19 @@ ListChangeSetsOutcome MarketplaceCatalogClient::ListChangeSets(const ListChangeS { AWS_OPERATION_GUARD(ListChangeSets); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListChangeSets, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListChangeSets, 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, ListChangeSets, 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, ListChangeSets, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListChangeSets", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListChangeSetsOutcome { - 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, ListChangeSets, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ListChangeSets"); - return ListChangeSetsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/ListChangeSets"); + return ListChangeSetsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -410,23 +388,19 @@ ListEntitiesOutcome MarketplaceCatalogClient::ListEntities(const ListEntitiesReq { AWS_OPERATION_GUARD(ListEntities); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListEntities, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListEntities, 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, ListEntities, 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, ListEntities, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListEntities", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListEntitiesOutcome { - 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, ListEntities, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/ListEntities"); - return ListEntitiesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/ListEntities"); + return ListEntitiesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -437,23 +411,19 @@ ListTagsForResourceOutcome MarketplaceCatalogClient::ListTagsForResource(const L { 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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/ListTagsForResource"); + return ListTagsForResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -464,23 +434,19 @@ PutResourcePolicyOutcome MarketplaceCatalogClient::PutResourcePolicy(const PutRe { AWS_OPERATION_GUARD(PutResourcePolicy); AWS_OPERATION_CHECK_PTR(m_endpointProvider, PutResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutResourcePolicy, 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, PutResourcePolicy, 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, PutResourcePolicy, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutResourcePolicy", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> PutResourcePolicyOutcome { - 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, PutResourcePolicy, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/PutResourcePolicy"); - return PutResourcePolicyOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/PutResourcePolicy"); + return PutResourcePolicyOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -491,23 +457,19 @@ StartChangeSetOutcome MarketplaceCatalogClient::StartChangeSet(const StartChange { AWS_OPERATION_GUARD(StartChangeSet); AWS_OPERATION_CHECK_PTR(m_endpointProvider, StartChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartChangeSet, 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, StartChangeSet, 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, StartChangeSet, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartChangeSet", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> StartChangeSetOutcome { - 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, StartChangeSet, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/StartChangeSet"); - return StartChangeSetOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/StartChangeSet"); + return StartChangeSetOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -518,23 +480,19 @@ TagResourceOutcome MarketplaceCatalogClient::TagResource(const TagResourceReques { 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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/TagResource"); + return TagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -545,26 +503,23 @@ UntagResourceOutcome MarketplaceCatalogClient::UntagResource(const UntagResource { 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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/UntagResource"); + return UntagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } + diff --git a/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/QBusinessClient.h b/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/QBusinessClient.h index c40ded8432a..5a367e25bba 100644 --- a/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/QBusinessClient.h +++ b/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/QBusinessClient.h @@ -6,15 +6,18 @@ #pragma once #include #include -#include #include -#include #include +#include +#include +#include +#include namespace Aws { namespace QBusiness { + AWS_QBUSINESS_API extern const char SERVICE_NAME[]; /** *

This is the Amazon Q Business API Reference. Amazon Q Business is a * fully managed, generative-AI powered enterprise chat assistant that you can @@ -41,12 +44,19 @@ namespace QBusiness * href="https://docs.aws.amazon.com/general/latest/gr/amazonq.html">Amazon Web * Services General Reference

*/ - class AWS_QBUSINESS_API QBusinessClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods + class AWS_QBUSINESS_API QBusinessClient : smithy::client::AwsSmithyClientT, + Aws::Crt::Variant, + QBusinessEndpointProviderBase, + smithy::client::JsonOutcomeSerializer, + smithy::client::JsonOutcome>, + Aws::Client::ClientWithAsyncTemplateMethods { public: - typedef Aws::Client::AWSJsonClient BASECLASS; static const char* GetServiceName(); static const char* GetAllocationTag(); + inline const char* GetServiceClientName() const override { return "QBusiness"; } typedef QBusinessClientConfiguration ClientConfigurationType; typedef QBusinessEndpointProvider EndpointProviderType; @@ -1587,8 +1597,6 @@ namespace QBusiness friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const QBusinessClientConfiguration& clientConfiguration); - QBusinessClientConfiguration m_clientConfiguration; - std::shared_ptr m_endpointProvider; }; } // namespace QBusiness diff --git a/generated/src/aws-cpp-sdk-qbusiness/source/QBusinessClient.cpp b/generated/src/aws-cpp-sdk-qbusiness/source/QBusinessClient.cpp index 2e96b86d436..e1ab38324bc 100644 --- a/generated/src/aws-cpp-sdk-qbusiness/source/QBusinessClient.cpp +++ b/generated/src/aws-cpp-sdk-qbusiness/source/QBusinessClient.cpp @@ -4,19 +4,17 @@ */ #include -#include #include #include #include -#include #include #include -#include #include #include #include #include #include + #include #include @@ -81,6 +79,9 @@ #include +#include +#include +#include using namespace Aws; using namespace Aws::Auth; @@ -96,100 +97,106 @@ namespace Aws { namespace QBusiness { - const char SERVICE_NAME[] = "qbusiness"; const char ALLOCATION_TAG[] = "QBusinessClient"; + const char SERVICE_NAME[] = "qbusiness"; } } const char* QBusinessClient::GetServiceName() {return SERVICE_NAME;} const char* QBusinessClient::GetAllocationTag() {return ALLOCATION_TAG;} QBusinessClient::QBusinessClient(const QBusiness::QBusinessClientConfiguration& clientConfiguration, - std::shared_ptr endpointProvider) : - BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG), - SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) + std::shared_ptr endpointProvider) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{GetServiceName(), clientConfiguration.region}}, + }) { init(m_clientConfiguration); } QBusinessClient::QBusinessClient(const AWSCredentials& credentials, - std::shared_ptr endpointProvider, - const QBusiness::QBusinessClientConfiguration& 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)) + std::shared_ptr endpointProvider, + const QBusiness::QBusinessClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), GetServiceName(), clientConfiguration.region}}, + }) { init(m_clientConfiguration); } QBusinessClient::QBusinessClient(const std::shared_ptr& credentialsProvider, - std::shared_ptr endpointProvider, - const QBusiness::QBusinessClientConfiguration& 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)) + std::shared_ptr endpointProvider, + const QBusiness::QBusinessClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + endpointProvider ? endpointProvider : Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{ Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } - /* Legacy constructors due deprecation */ - QBusinessClient::QBusinessClient(const Client::ClientConfiguration& clientConfiguration) : - BASECLASS(clientConfiguration, - Aws::MakeShared(ALLOCATION_TAG, - Aws::MakeShared(ALLOCATION_TAG), - SERVICE_NAME, - Aws::Region::ComputeSignerRegion(clientConfiguration.region)), - Aws::MakeShared(ALLOCATION_TAG)), - m_clientConfiguration(clientConfiguration), - m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) +/* Legacy constructors due deprecation */ +QBusinessClient::QBusinessClient(const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } QBusinessClient::QBusinessClient(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)) + const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentials), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } QBusinessClient::QBusinessClient(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)) + const Client::ClientConfiguration& clientConfiguration) : + AwsSmithyClientT(clientConfiguration, + GetServiceName(), + Aws::Http::CreateHttpClient(clientConfiguration), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared(ALLOCATION_TAG), + Aws::MakeShared>(ALLOCATION_TAG), + { + {smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption.schemeId, smithy::SigV4AuthScheme{Aws::MakeShared(ALLOCATION_TAG, credentialsProvider), GetServiceName(), clientConfiguration.region}} + }) { init(m_clientConfiguration); } +/* End of legacy constructors due deprecation */ - /* End of legacy constructors due deprecation */ QBusinessClient::~QBusinessClient() { ShutdownSdkClient(this, -1); @@ -202,7 +209,6 @@ std::shared_ptr& QBusinessClient::accessEndpointP void QBusinessClient::init(const QBusiness::QBusinessClientConfiguration& config) { - AWSClient::SetServiceClientName("QBusiness"); if (!m_clientConfiguration.executor) { if (!m_clientConfiguration.configFactories.executorCreateFn()) { AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); @@ -217,8 +223,8 @@ void QBusinessClient::init(const QBusiness::QBusinessClientConfiguration& config void QBusinessClient::OverrideEndpoint(const Aws::String& endpoint) { - AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->OverrideEndpoint(endpoint); + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_endpointProvider->OverrideEndpoint(endpoint); } BatchDeleteDocumentOutcome QBusinessClient::BatchDeleteDocument(const BatchDeleteDocumentRequest& request) const @@ -235,27 +241,23 @@ BatchDeleteDocumentOutcome QBusinessClient::BatchDeleteDocument(const BatchDelet AWS_LOGSTREAM_ERROR("BatchDeleteDocument", "Required field: IndexId, is not set"); return BatchDeleteDocumentOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, BatchDeleteDocument, 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, BatchDeleteDocument, 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, BatchDeleteDocument, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".BatchDeleteDocument", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> BatchDeleteDocumentOutcome { - 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, BatchDeleteDocument, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents/delete"); - return BatchDeleteDocumentOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/documents/delete"); + return BatchDeleteDocumentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -276,27 +278,23 @@ BatchPutDocumentOutcome QBusinessClient::BatchPutDocument(const BatchPutDocument AWS_LOGSTREAM_ERROR("BatchPutDocument", "Required field: IndexId, is not set"); return BatchPutDocumentOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, BatchPutDocument, 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, BatchPutDocument, 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, BatchPutDocument, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".BatchPutDocument", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> BatchPutDocumentOutcome { - 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, BatchPutDocument, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents"); - return BatchPutDocumentOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/documents"); + return BatchPutDocumentOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -320,19 +318,10 @@ void QBusinessClient::ChatAsync(Model::ChatRequest& request, 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, ChatOutcome(Aws::Client::AWSError( - CoreErrors::ENDPOINT_RESOLUTION_FAILURE, "ENDPOINT_RESOLUTION_FAILURE", endpointResolutionOutcome.GetError().GetMessage(), false)), handlerContext); - return; - } - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations"); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations"); request.SetResponseStreamFactory( [&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); } ); @@ -343,8 +332,10 @@ void QBusinessClient::ChatAsync(Model::ChatRequest& request, auto sem = Aws::MakeShared(ALLOCATION_TAG, 0, 1); request.SetRequestSignedHandler([eventEncoderStream, sem](const Aws::Http::HttpRequest& httpRequest) { eventEncoderStream->SetSignatureSeed(Aws::Client::GetAuthorizationHeader(httpRequest)); sem->ReleaseAll(); }); - m_clientConfiguration.executor->Submit([this, endpointResolutionOutcome, &request, handler, handlerContext] () mutable { - JsonOutcome outcome = MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::EVENTSTREAM_SIGV4_SIGNER); + m_clientConfiguration.executor->Submit([this, &request, handler, handlerContext] () mutable { + JsonOutcome outcome = MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + }, + endpointOverrides) if(outcome.IsSuccess()) { handler(this, request, ChatOutcome(NoResult()), handlerContext); @@ -355,7 +346,9 @@ void QBusinessClient::ChatAsync(Model::ChatRequest& request, handler(this, request, ChatOutcome(outcome.GetError()), handlerContext); } return ChatOutcome(NoResult()); - }); + } + + ); sem->WaitOne(); streamReadyHandler(*request.GetInputStream()); } @@ -368,28 +361,24 @@ ChatSyncOutcome QBusinessClient::ChatSync(const ChatSyncRequest& request) const AWS_LOGSTREAM_ERROR("ChatSync", "Required field: ApplicationId, is not set"); return ChatSyncOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ChatSync, 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, ChatSync, 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, ChatSync, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ChatSync", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ChatSyncOutcome { - 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, ChatSync, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); Aws::StringStream ss; - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations"); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations"); ss.str("?sync"); endpointResolutionOutcome.GetResult().SetQueryString(ss.str()); - return ChatSyncOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + return ChatSyncOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -400,23 +389,19 @@ CreateApplicationOutcome QBusinessClient::CreateApplication(const CreateApplicat { AWS_OPERATION_GUARD(CreateApplication); AWS_OPERATION_CHECK_PTR(m_endpointProvider, CreateApplication, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateApplication, 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, CreateApplication, 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, CreateApplication, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateApplication", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateApplicationOutcome { - 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, CreateApplication, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications"); - return CreateApplicationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications"); + return CreateApplicationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -437,27 +422,23 @@ CreateDataSourceOutcome QBusinessClient::CreateDataSource(const CreateDataSource AWS_LOGSTREAM_ERROR("CreateDataSource", "Required field: IndexId, is not set"); return CreateDataSourceOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", 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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources"); - return CreateDataSourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources"); + return CreateDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -473,25 +454,21 @@ CreateIndexOutcome QBusinessClient::CreateIndex(const CreateIndexRequest& reques AWS_LOGSTREAM_ERROR("CreateIndex", "Required field: ApplicationId, is not set"); return CreateIndexOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateIndex, 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, CreateIndex, 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, CreateIndex, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateIndex", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateIndexOutcome { - 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, CreateIndex, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices"); - return CreateIndexOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices"); + return CreateIndexOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -507,25 +484,21 @@ CreatePluginOutcome QBusinessClient::CreatePlugin(const CreatePluginRequest& req AWS_LOGSTREAM_ERROR("CreatePlugin", "Required field: ApplicationId, is not set"); return CreatePluginOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreatePlugin, 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, CreatePlugin, 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, CreatePlugin, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreatePlugin", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreatePluginOutcome { - 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, CreatePlugin, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/plugins"); - return CreatePluginOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/plugins"); + return CreatePluginOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -541,25 +514,21 @@ CreateRetrieverOutcome QBusinessClient::CreateRetriever(const CreateRetrieverReq AWS_LOGSTREAM_ERROR("CreateRetriever", "Required field: ApplicationId, is not set"); return CreateRetrieverOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateRetriever, 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, CreateRetriever, 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, CreateRetriever, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateRetriever", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateRetrieverOutcome { - 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, CreateRetriever, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrievers"); - return CreateRetrieverOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/retrievers"); + return CreateRetrieverOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -575,25 +544,21 @@ CreateUserOutcome QBusinessClient::CreateUser(const CreateUserRequest& request) AWS_LOGSTREAM_ERROR("CreateUser", "Required field: ApplicationId, is not set"); return CreateUserOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateUser, 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, CreateUser, 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, CreateUser, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateUser", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateUserOutcome { - 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, CreateUser, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/users"); - return CreateUserOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/users"); + return CreateUserOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -609,25 +574,21 @@ CreateWebExperienceOutcome QBusinessClient::CreateWebExperience(const CreateWebE AWS_LOGSTREAM_ERROR("CreateWebExperience", "Required field: ApplicationId, is not set"); return CreateWebExperienceOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, CreateWebExperience, 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, CreateWebExperience, 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, CreateWebExperience, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".CreateWebExperience", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> CreateWebExperienceOutcome { - 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, CreateWebExperience, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/experiences"); - return CreateWebExperienceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/experiences"); + return CreateWebExperienceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -643,24 +604,20 @@ DeleteApplicationOutcome QBusinessClient::DeleteApplication(const DeleteApplicat AWS_LOGSTREAM_ERROR("DeleteApplication", "Required field: ApplicationId, is not set"); return DeleteApplicationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteApplication, 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, DeleteApplication, 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, DeleteApplication, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteApplication", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteApplicationOutcome { - 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, DeleteApplication, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - return DeleteApplicationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + return DeleteApplicationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -676,25 +633,21 @@ DeleteChatControlsConfigurationOutcome QBusinessClient::DeleteChatControlsConfig AWS_LOGSTREAM_ERROR("DeleteChatControlsConfiguration", "Required field: ApplicationId, is not set"); return DeleteChatControlsConfigurationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteChatControlsConfiguration, 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, DeleteChatControlsConfiguration, 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, DeleteChatControlsConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteChatControlsConfiguration", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteChatControlsConfigurationOutcome { - 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, DeleteChatControlsConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/chatcontrols"); - return DeleteChatControlsConfigurationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/chatcontrols"); + return DeleteChatControlsConfigurationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -715,26 +668,22 @@ DeleteConversationOutcome QBusinessClient::DeleteConversation(const DeleteConver AWS_LOGSTREAM_ERROR("DeleteConversation", "Required field: ApplicationId, is not set"); return DeleteConversationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteConversation, 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, DeleteConversation, 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, DeleteConversation, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteConversation", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteConversationOutcome { - 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, DeleteConversation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConversationId()); - return DeleteConversationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations/"); + endpointOverrides.pathSegments.emplace_back(request.GetConversationId()); + return DeleteConversationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -760,28 +709,24 @@ DeleteDataSourceOutcome QBusinessClient::DeleteDataSource(const DeleteDataSource AWS_LOGSTREAM_ERROR("DeleteDataSource", "Required field: DataSourceId, is not set"); return DeleteDataSourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return DeleteDataSourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + return DeleteDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -807,28 +752,24 @@ DeleteGroupOutcome QBusinessClient::DeleteGroup(const DeleteGroupRequest& reques AWS_LOGSTREAM_ERROR("DeleteGroup", "Required field: GroupName, is not set"); return DeleteGroupOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GroupName]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteGroup, 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, DeleteGroup, 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, DeleteGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteGroup", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteGroupOutcome { - 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, DeleteGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/groups/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGroupName()); - return DeleteGroupOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/groups/"); + endpointOverrides.pathSegments.emplace_back(request.GetGroupName()); + return DeleteGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -849,26 +790,22 @@ DeleteIndexOutcome QBusinessClient::DeleteIndex(const DeleteIndexRequest& reques AWS_LOGSTREAM_ERROR("DeleteIndex", "Required field: IndexId, is not set"); return DeleteIndexOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteIndex, 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, DeleteIndex, 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, DeleteIndex, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteIndex", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteIndexOutcome { - 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, DeleteIndex, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - return DeleteIndexOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + return DeleteIndexOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -889,26 +826,22 @@ DeletePluginOutcome QBusinessClient::DeletePlugin(const DeletePluginRequest& req AWS_LOGSTREAM_ERROR("DeletePlugin", "Required field: PluginId, is not set"); return DeletePluginOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PluginId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeletePlugin, 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, DeletePlugin, 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, DeletePlugin, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeletePlugin", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeletePluginOutcome { - 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, DeletePlugin, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/plugins/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPluginId()); - return DeletePluginOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/plugins/"); + endpointOverrides.pathSegments.emplace_back(request.GetPluginId()); + return DeletePluginOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -929,26 +862,22 @@ DeleteRetrieverOutcome QBusinessClient::DeleteRetriever(const DeleteRetrieverReq AWS_LOGSTREAM_ERROR("DeleteRetriever", "Required field: RetrieverId, is not set"); return DeleteRetrieverOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RetrieverId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteRetriever, 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, DeleteRetriever, 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, DeleteRetriever, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteRetriever", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteRetrieverOutcome { - 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, DeleteRetriever, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrievers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetRetrieverId()); - return DeleteRetrieverOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/retrievers/"); + endpointOverrides.pathSegments.emplace_back(request.GetRetrieverId()); + return DeleteRetrieverOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -969,26 +898,22 @@ DeleteUserOutcome QBusinessClient::DeleteUser(const DeleteUserRequest& request) AWS_LOGSTREAM_ERROR("DeleteUser", "Required field: UserId, is not set"); return DeleteUserOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UserId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteUser, 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, DeleteUser, 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, DeleteUser, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteUser", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteUserOutcome { - 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, DeleteUser, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/users/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetUserId()); - return DeleteUserOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/users/"); + endpointOverrides.pathSegments.emplace_back(request.GetUserId()); + return DeleteUserOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1009,26 +934,22 @@ DeleteWebExperienceOutcome QBusinessClient::DeleteWebExperience(const DeleteWebE AWS_LOGSTREAM_ERROR("DeleteWebExperience", "Required field: WebExperienceId, is not set"); return DeleteWebExperienceOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [WebExperienceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteWebExperience, 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, DeleteWebExperience, 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, DeleteWebExperience, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteWebExperience", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> DeleteWebExperienceOutcome { - 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, DeleteWebExperience, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/experiences/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetWebExperienceId()); - return DeleteWebExperienceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/experiences/"); + endpointOverrides.pathSegments.emplace_back(request.GetWebExperienceId()); + return DeleteWebExperienceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1044,24 +965,20 @@ GetApplicationOutcome QBusinessClient::GetApplication(const GetApplicationReques AWS_LOGSTREAM_ERROR("GetApplication", "Required field: ApplicationId, is not set"); return GetApplicationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetApplication, 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, GetApplication, 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, GetApplication, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetApplication", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetApplicationOutcome { - 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, GetApplication, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - return GetApplicationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + return GetApplicationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1077,25 +994,21 @@ GetChatControlsConfigurationOutcome QBusinessClient::GetChatControlsConfiguratio AWS_LOGSTREAM_ERROR("GetChatControlsConfiguration", "Required field: ApplicationId, is not set"); return GetChatControlsConfigurationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetChatControlsConfiguration, 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, GetChatControlsConfiguration, 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, GetChatControlsConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetChatControlsConfiguration", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetChatControlsConfigurationOutcome { - 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, GetChatControlsConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/chatcontrols"); - return GetChatControlsConfigurationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/chatcontrols"); + return GetChatControlsConfigurationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1121,28 +1034,24 @@ GetDataSourceOutcome QBusinessClient::GetDataSource(const GetDataSourceRequest& AWS_LOGSTREAM_ERROR("GetDataSource", "Required field: DataSourceId, is not set"); return GetDataSourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return GetDataSourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + return GetDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1168,28 +1077,24 @@ GetGroupOutcome QBusinessClient::GetGroup(const GetGroupRequest& request) const AWS_LOGSTREAM_ERROR("GetGroup", "Required field: GroupName, is not set"); return GetGroupOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [GroupName]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetGroup, 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, GetGroup, 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, GetGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetGroup", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetGroupOutcome { - 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, GetGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/groups/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetGroupName()); - return GetGroupOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/groups/"); + endpointOverrides.pathSegments.emplace_back(request.GetGroupName()); + return GetGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1210,26 +1115,22 @@ GetIndexOutcome QBusinessClient::GetIndex(const GetIndexRequest& request) const AWS_LOGSTREAM_ERROR("GetIndex", "Required field: IndexId, is not set"); return GetIndexOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetIndex, 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, GetIndex, 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, GetIndex, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetIndex", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetIndexOutcome { - 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, GetIndex, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - return GetIndexOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + return GetIndexOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1250,26 +1151,22 @@ GetPluginOutcome QBusinessClient::GetPlugin(const GetPluginRequest& request) con AWS_LOGSTREAM_ERROR("GetPlugin", "Required field: PluginId, is not set"); return GetPluginOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PluginId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetPlugin, 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, GetPlugin, 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, GetPlugin, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetPlugin", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetPluginOutcome { - 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, GetPlugin, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/plugins/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPluginId()); - return GetPluginOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/plugins/"); + endpointOverrides.pathSegments.emplace_back(request.GetPluginId()); + return GetPluginOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1290,26 +1187,22 @@ GetRetrieverOutcome QBusinessClient::GetRetriever(const GetRetrieverRequest& req AWS_LOGSTREAM_ERROR("GetRetriever", "Required field: RetrieverId, is not set"); return GetRetrieverOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RetrieverId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetRetriever, 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, GetRetriever, 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, GetRetriever, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetRetriever", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetRetrieverOutcome { - 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, GetRetriever, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrievers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetRetrieverId()); - return GetRetrieverOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/retrievers/"); + endpointOverrides.pathSegments.emplace_back(request.GetRetrieverId()); + return GetRetrieverOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1330,26 +1223,22 @@ GetUserOutcome QBusinessClient::GetUser(const GetUserRequest& request) const AWS_LOGSTREAM_ERROR("GetUser", "Required field: UserId, is not set"); return GetUserOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UserId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetUser, 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, GetUser, 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, GetUser, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetUser", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetUserOutcome { - 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, GetUser, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/users/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetUserId()); - return GetUserOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/users/"); + endpointOverrides.pathSegments.emplace_back(request.GetUserId()); + return GetUserOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1370,26 +1259,22 @@ GetWebExperienceOutcome QBusinessClient::GetWebExperience(const GetWebExperience AWS_LOGSTREAM_ERROR("GetWebExperience", "Required field: WebExperienceId, is not set"); return GetWebExperienceOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [WebExperienceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetWebExperience, 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, GetWebExperience, 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, GetWebExperience, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetWebExperience", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> GetWebExperienceOutcome { - 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, GetWebExperience, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/experiences/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetWebExperienceId()); - return GetWebExperienceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/experiences/"); + endpointOverrides.pathSegments.emplace_back(request.GetWebExperienceId()); + return GetWebExperienceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1400,23 +1285,19 @@ ListApplicationsOutcome QBusinessClient::ListApplications(const ListApplications { AWS_OPERATION_GUARD(ListApplications); AWS_OPERATION_CHECK_PTR(m_endpointProvider, ListApplications, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListApplications, 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, ListApplications, 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, ListApplications, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListApplications", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListApplicationsOutcome { - 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, ListApplications, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications"); - return ListApplicationsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications"); + return ListApplicationsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1432,25 +1313,21 @@ ListConversationsOutcome QBusinessClient::ListConversations(const ListConversati AWS_LOGSTREAM_ERROR("ListConversations", "Required field: ApplicationId, is not set"); return ListConversationsOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListConversations, 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, ListConversations, 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, ListConversations, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListConversations", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListConversationsOutcome { - 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, ListConversations, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations"); - return ListConversationsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations"); + return ListConversationsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1476,29 +1353,25 @@ ListDataSourceSyncJobsOutcome QBusinessClient::ListDataSourceSyncJobs(const List AWS_LOGSTREAM_ERROR("ListDataSourceSyncJobs", "Required field: IndexId, is not set"); return ListDataSourceSyncJobsOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListDataSourceSyncJobs, 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, ListDataSourceSyncJobs, 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, ListDataSourceSyncJobs, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListDataSourceSyncJobs", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListDataSourceSyncJobsOutcome { - 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, ListDataSourceSyncJobs, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/syncjobs"); - return ListDataSourceSyncJobsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + endpointOverrides.pathSegments.emplace_back("/syncjobs"); + return ListDataSourceSyncJobsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1519,27 +1392,23 @@ ListDataSourcesOutcome QBusinessClient::ListDataSources(const ListDataSourcesReq AWS_LOGSTREAM_ERROR("ListDataSources", "Required field: IndexId, is not set"); return ListDataSourcesOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", 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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources"); - return ListDataSourcesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources"); + return ListDataSourcesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1560,27 +1429,23 @@ ListDocumentsOutcome QBusinessClient::ListDocuments(const ListDocumentsRequest& AWS_LOGSTREAM_ERROR("ListDocuments", "Required field: IndexId, is not set"); return ListDocumentsOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListDocuments, 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, ListDocuments, 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, ListDocuments, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListDocuments", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListDocumentsOutcome { - 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, ListDocuments, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/index/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/documents"); - return ListDocumentsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/index/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/documents"); + return ListDocumentsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1606,27 +1471,23 @@ ListGroupsOutcome QBusinessClient::ListGroups(const ListGroupsRequest& request) AWS_LOGSTREAM_ERROR("ListGroups", "Required field: UpdatedEarlierThan, is not set"); return ListGroupsOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UpdatedEarlierThan]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListGroups, 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, ListGroups, 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, ListGroups, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListGroups", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListGroupsOutcome { - 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, ListGroups, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/groups"); - return ListGroupsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/groups"); + return ListGroupsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1642,25 +1503,21 @@ ListIndicesOutcome QBusinessClient::ListIndices(const ListIndicesRequest& reques AWS_LOGSTREAM_ERROR("ListIndices", "Required field: ApplicationId, is not set"); return ListIndicesOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListIndices, 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, ListIndices, 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, ListIndices, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListIndices", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListIndicesOutcome { - 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, ListIndices, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices"); - return ListIndicesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices"); + return ListIndicesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1681,26 +1538,22 @@ ListMessagesOutcome QBusinessClient::ListMessages(const ListMessagesRequest& req AWS_LOGSTREAM_ERROR("ListMessages", "Required field: ApplicationId, is not set"); return ListMessagesOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListMessages, 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, ListMessages, 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, ListMessages, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListMessages", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListMessagesOutcome { - 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, ListMessages, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConversationId()); - return ListMessagesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations/"); + endpointOverrides.pathSegments.emplace_back(request.GetConversationId()); + return ListMessagesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1716,25 +1569,21 @@ ListPluginsOutcome QBusinessClient::ListPlugins(const ListPluginsRequest& reques AWS_LOGSTREAM_ERROR("ListPlugins", "Required field: ApplicationId, is not set"); return ListPluginsOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListPlugins, 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, ListPlugins, 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, ListPlugins, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListPlugins", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListPluginsOutcome { - 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, ListPlugins, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/plugins"); - return ListPluginsOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/plugins"); + return ListPluginsOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1750,25 +1599,21 @@ ListRetrieversOutcome QBusinessClient::ListRetrievers(const ListRetrieversReques AWS_LOGSTREAM_ERROR("ListRetrievers", "Required field: ApplicationId, is not set"); return ListRetrieversOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListRetrievers, 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, ListRetrievers, 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, ListRetrievers, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListRetrievers", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListRetrieversOutcome { - 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, ListRetrievers, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrievers"); - return ListRetrieversOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/retrievers"); + return ListRetrieversOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1784,24 +1629,20 @@ ListTagsForResourceOutcome QBusinessClient::ListTagsForResource(const ListTagsFo AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceARN, is not set"); return ListTagsForResourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/v1/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceARN()); - return ListTagsForResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/v1/tags/"); + endpointOverrides.pathSegments.emplace_back(request.GetResourceARN()); + return ListTagsForResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1817,25 +1658,21 @@ ListWebExperiencesOutcome QBusinessClient::ListWebExperiences(const ListWebExper AWS_LOGSTREAM_ERROR("ListWebExperiences", "Required field: ApplicationId, is not set"); return ListWebExperiencesOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, ListWebExperiences, 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, ListWebExperiences, 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, ListWebExperiences, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".ListWebExperiences", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> ListWebExperiencesOutcome { - 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, ListWebExperiences, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/experiences"); - return ListWebExperiencesOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/experiences"); + return ListWebExperiencesOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_GET, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1861,29 +1698,25 @@ PutFeedbackOutcome QBusinessClient::PutFeedback(const PutFeedbackRequest& reques AWS_LOGSTREAM_ERROR("PutFeedback", "Required field: MessageId, is not set"); return PutFeedbackOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [MessageId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutFeedback, 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, PutFeedback, 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, PutFeedback, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutFeedback", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> PutFeedbackOutcome { - 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, PutFeedback, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/conversations/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConversationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/messages/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetMessageId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/feedback"); - return PutFeedbackOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/conversations/"); + endpointOverrides.pathSegments.emplace_back(request.GetConversationId()); + endpointOverrides.pathSegments.emplace_back("/messages/"); + endpointOverrides.pathSegments.emplace_back(request.GetMessageId()); + endpointOverrides.pathSegments.emplace_back("/feedback"); + return PutFeedbackOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1904,27 +1737,23 @@ PutGroupOutcome QBusinessClient::PutGroup(const PutGroupRequest& request) const AWS_LOGSTREAM_ERROR("PutGroup", "Required field: IndexId, is not set"); return PutGroupOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PutGroup, 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, PutGroup, 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, PutGroup, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PutGroup", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> PutGroupOutcome { - 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, PutGroup, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/groups"); - return PutGroupOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/groups"); + return PutGroupOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1950,29 +1779,25 @@ StartDataSourceSyncJobOutcome QBusinessClient::StartDataSourceSyncJob(const Star AWS_LOGSTREAM_ERROR("StartDataSourceSyncJob", "Required field: IndexId, is not set"); return StartDataSourceSyncJobOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StartDataSourceSyncJob, 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, StartDataSourceSyncJob, 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, StartDataSourceSyncJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StartDataSourceSyncJob", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> StartDataSourceSyncJobOutcome { - 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, StartDataSourceSyncJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/startsync"); - return StartDataSourceSyncJobOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + endpointOverrides.pathSegments.emplace_back("/startsync"); + return StartDataSourceSyncJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -1998,29 +1823,25 @@ StopDataSourceSyncJobOutcome QBusinessClient::StopDataSourceSyncJob(const StopDa AWS_LOGSTREAM_ERROR("StopDataSourceSyncJob", "Required field: IndexId, is not set"); return StopDataSourceSyncJobOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, StopDataSourceSyncJob, 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, StopDataSourceSyncJob, 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, StopDataSourceSyncJob, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".StopDataSourceSyncJob", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> StopDataSourceSyncJobOutcome { - 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, StopDataSourceSyncJob, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/stopsync"); - return StopDataSourceSyncJobOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + endpointOverrides.pathSegments.emplace_back("/stopsync"); + return StopDataSourceSyncJobOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2036,24 +1857,20 @@ TagResourceOutcome QBusinessClient::TagResource(const TagResourceRequest& reques AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceARN, is not set"); return TagResourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/v1/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceARN()); - return TagResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/v1/tags/"); + endpointOverrides.pathSegments.emplace_back(request.GetResourceARN()); + return TagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_POST, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2074,24 +1891,20 @@ UntagResourceOutcome QBusinessClient::UntagResource(const UntagResourceRequest& AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set"); return UntagResourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/v1/tags/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetResourceARN()); - return UntagResourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/v1/tags/"); + endpointOverrides.pathSegments.emplace_back(request.GetResourceARN()); + return UntagResourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_DELETE, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2107,24 +1920,20 @@ UpdateApplicationOutcome QBusinessClient::UpdateApplication(const UpdateApplicat AWS_LOGSTREAM_ERROR("UpdateApplication", "Required field: ApplicationId, is not set"); return UpdateApplicationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateApplication, 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, UpdateApplication, 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, UpdateApplication, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateApplication", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateApplicationOutcome { - 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, UpdateApplication, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - return UpdateApplicationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + return UpdateApplicationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2140,25 +1949,21 @@ UpdateChatControlsConfigurationOutcome QBusinessClient::UpdateChatControlsConfig AWS_LOGSTREAM_ERROR("UpdateChatControlsConfiguration", "Required field: ApplicationId, is not set"); return UpdateChatControlsConfigurationOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ApplicationId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateChatControlsConfiguration, 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, UpdateChatControlsConfiguration, 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, UpdateChatControlsConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateChatControlsConfiguration", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateChatControlsConfigurationOutcome { - 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, UpdateChatControlsConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/chatcontrols"); - return UpdateChatControlsConfigurationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/chatcontrols"); + return UpdateChatControlsConfigurationOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PATCH, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2184,28 +1989,24 @@ UpdateDataSourceOutcome QBusinessClient::UpdateDataSource(const UpdateDataSource AWS_LOGSTREAM_ERROR("UpdateDataSource", "Required field: DataSourceId, is not set"); return UpdateDataSourceOutcome(Aws::Client::AWSError(QBusinessErrors::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() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, 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("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/datasources/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetDataSourceId()); - return UpdateDataSourceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + endpointOverrides.pathSegments.emplace_back("/datasources/"); + endpointOverrides.pathSegments.emplace_back(request.GetDataSourceId()); + return UpdateDataSourceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2226,26 +2027,22 @@ UpdateIndexOutcome QBusinessClient::UpdateIndex(const UpdateIndexRequest& reques AWS_LOGSTREAM_ERROR("UpdateIndex", "Required field: IndexId, is not set"); return UpdateIndexOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [IndexId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateIndex, 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, UpdateIndex, 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, UpdateIndex, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateIndex", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateIndexOutcome { - 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, UpdateIndex, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/indices/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetIndexId()); - return UpdateIndexOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/indices/"); + endpointOverrides.pathSegments.emplace_back(request.GetIndexId()); + return UpdateIndexOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2266,26 +2063,22 @@ UpdatePluginOutcome QBusinessClient::UpdatePlugin(const UpdatePluginRequest& req AWS_LOGSTREAM_ERROR("UpdatePlugin", "Required field: PluginId, is not set"); return UpdatePluginOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [PluginId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdatePlugin, 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, UpdatePlugin, 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, UpdatePlugin, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdatePlugin", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdatePluginOutcome { - 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, UpdatePlugin, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/plugins/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetPluginId()); - return UpdatePluginOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/plugins/"); + endpointOverrides.pathSegments.emplace_back(request.GetPluginId()); + return UpdatePluginOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2306,26 +2099,22 @@ UpdateRetrieverOutcome QBusinessClient::UpdateRetriever(const UpdateRetrieverReq AWS_LOGSTREAM_ERROR("UpdateRetriever", "Required field: RetrieverId, is not set"); return UpdateRetrieverOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RetrieverId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateRetriever, 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, UpdateRetriever, 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, UpdateRetriever, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateRetriever", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateRetrieverOutcome { - 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, UpdateRetriever, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/retrievers/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetRetrieverId()); - return UpdateRetrieverOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/retrievers/"); + endpointOverrides.pathSegments.emplace_back(request.GetRetrieverId()); + return UpdateRetrieverOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2346,26 +2135,22 @@ UpdateUserOutcome QBusinessClient::UpdateUser(const UpdateUserRequest& request) AWS_LOGSTREAM_ERROR("UpdateUser", "Required field: UserId, is not set"); return UpdateUserOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [UserId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateUser, 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, UpdateUser, 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, UpdateUser, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateUser", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateUserOutcome { - 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, UpdateUser, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/users/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetUserId()); - return UpdateUserOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/users/"); + endpointOverrides.pathSegments.emplace_back(request.GetUserId()); + return UpdateUserOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, @@ -2386,29 +2171,26 @@ UpdateWebExperienceOutcome QBusinessClient::UpdateWebExperience(const UpdateWebE AWS_LOGSTREAM_ERROR("UpdateWebExperience", "Required field: WebExperienceId, is not set"); return UpdateWebExperienceOutcome(Aws::Client::AWSError(QBusinessErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [WebExperienceId]", false)); } - AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateWebExperience, 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, UpdateWebExperience, 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, UpdateWebExperience, CoreErrors, CoreErrors::NOT_INITIALIZED); auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateWebExperience", {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming( [&]()-> UpdateWebExperienceOutcome { - 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, UpdateWebExperience, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); - endpointResolutionOutcome.GetResult().AddPathSegments("/applications/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetApplicationId()); - endpointResolutionOutcome.GetResult().AddPathSegments("/experiences/"); - endpointResolutionOutcome.GetResult().AddPathSegment(request.GetWebExperienceId()); - return UpdateWebExperienceOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; + endpointOverrides.pathSegments.emplace_back("/applications/"); + endpointOverrides.pathSegments.emplace_back(request.GetApplicationId()); + endpointOverrides.pathSegments.emplace_back("/experiences/"); + endpointOverrides.pathSegments.emplace_back(request.GetWebExperienceId()); + return UpdateWebExperienceOutcome(MakeRequestDeserialize(&request, request.GetServiceRequestName(), Aws::Http::HttpMethod::HTTP_PUT, [&](Aws::Endpoint::AWSEndpoint& resolvedEndpoint) -> void { + })); }, TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } + 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 045c9ce7d43..0bce47b72c8 100644 --- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h +++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h @@ -55,6 +55,12 @@ namespace Aws namespace Endpoint { class AWSEndpoint; + + struct AWSEndpointResolutionOverrides + { + Aws::Vector pathSegments; + bool setRfc3986Encoded{false}; + }; } } @@ -131,7 +137,9 @@ namespace client Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback, ResponseHandlerFunc&& responseHandler, - std::shared_ptr pExecutor) const; + std::shared_ptr pExecutor, + const Aws::Endpoint::AWSEndpointResolutionOverrides& pathSegments = Aws::Endpoint::AWSEndpointResolutionOverrides{} + ) const; HttpResponseOutcome MakeRequestSync(Aws::AmazonWebServiceRequest const * const request, const char* requestName, 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 27f0304a6bf..020776d0785 100644 --- a/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp +++ b/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp @@ -99,7 +99,9 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback, ResponseHandlerFunc&& responseHandler, - std::shared_ptr pExecutor) const + std::shared_ptr pExecutor, + const Aws::Endpoint::AWSEndpointResolutionOverrides& overrides + ) const { if(!responseHandler) { @@ -153,6 +155,16 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c } ); return; } + if(!overrides.pathSegments.empty()) + { + for (const auto& p : overrides.pathSegments) + { + epResolutionOutcome.GetResult().AddPathSegments(p); + } + } + + epResolutionOutcome.GetResult().SetRfc3986Encoded(overrides.setRfc3986Encoded); + pRequestCtx->m_endpoint = std::move(epResolutionOutcome.GetResultWithOwnership()); if (!Aws::Utils::IsValidHost(pRequestCtx->m_endpoint.GetURI().GetAuthority())) { diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppClientGenerator.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppClientGenerator.java index 7ab3845ae22..25092c65e8f 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppClientGenerator.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppClientGenerator.java @@ -39,6 +39,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -672,7 +673,16 @@ protected SdkFileEntry generateClientSmithyHeaderFile(final ServiceModel service VelocityContext context = createContext(serviceModel); context.put("CppViewHelper", CppViewHelper.class); context.put("RequestlessOperations", requestlessOperations); - context.put("AuthSchemeResolver", "SigV4AuthSchemeResolver"); + Optional firstAuthScheme = serviceModel.getAuthSchemes().stream().filter(entry->ResolverMapping.containsKey(entry)).findFirst(); + if(firstAuthScheme.isPresent()) + { + context.put("AuthSchemeResolver", ResolverMapping.get(firstAuthScheme.get())); + } + else + { + throw new RuntimeException(String.format("authSchemes '%s'",serviceModel.getAuthSchemes().stream().collect(Collectors.toList()) + )); + } context.put("AuthSchemeVariants", serviceModel.getAuthSchemes().stream().map(this::mapAuthSchemes).collect(Collectors.joining(","))); String fileName = String.format("include/aws/%s/%sClient.h", serviceModel.getMetadata().getProjectName(), @@ -688,7 +698,16 @@ protected List generateSmithyClientSourceFile(final List firstAuthScheme = serviceModels.get(i).getAuthSchemes().stream().filter(entry->ResolverMapping.containsKey(entry)).findFirst(); + if(firstAuthScheme.isPresent()) + { + context.put("AuthSchemeResolver", ResolverMapping.get(firstAuthScheme.get())); + } + else + { + throw new RuntimeException(String.format("authSchemes '%s'",serviceModels.get(i).getAuthSchemes().stream().collect(Collectors.toList()) + )); + } context.put("AuthSchemeMapEntries", createAuthSchemeMapEntries(serviceModels.get(i))); final String fileName; @@ -706,7 +725,9 @@ protected List generateSmithyClientSourceFile(final List AuthSchemeMapping = ImmutableMap.of( "aws.auth#sigv4", "smithy::SigV4AuthScheme", - "aws.auth#sigv4a", "smithy::SigV4aAuthScheme" + "aws.auth#sigv4a", "smithy::SigV4aAuthScheme", + "bearer", "smithy::BearerAuthScheme", + "v4", "smithy::SigV4AuthScheme" ); protected String mapAuthSchemes(final String authSchemeName) { @@ -719,8 +740,19 @@ protected String mapAuthSchemes(final String authSchemeName) { private static final Map SchemeIdMapping = ImmutableMap.of( "aws.auth#sigv4", "smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption", - "aws.auth#sigv4a", "smithy::SigV4AuthSchemeOption::sigV4aAuthSchemeOption" + "aws.auth#sigv4a", "smithy::SigV4AuthSchemeOption::sigV4aAuthSchemeOption", + "bearer", "smithy::BearerTokenAuthSchemeOption::bearerTokenAuthSchemeOption", + "v4", "smithy::SigV4AuthSchemeOption::sigV4AuthSchemeOption" + ); + + private static final Map ResolverMapping = ImmutableMap.of( + "aws.auth#sigv4", "SigV4AuthSchemeResolver", + "aws.auth#sigv4a", "SigV4aAuthSchemeResolver", + "bearer", "BearerTokenAuthSchemeResolver", + "v4", "SigV4AuthSchemeResolver" ); + + private static final String SchemeMapFormat = "%s.schemeId, %s"; private List createAuthSchemeMapEntries(final ServiceModel serviceModel) { return serviceModel.getAuthSchemes().stream() 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 807d31528dd..eb01cd75ea8 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; public class JsonCppClientGenerator extends CppClientGenerator { @@ -150,6 +151,10 @@ else if (shape.isResult()) { @Override protected SdkFileEntry generateClientHeaderFile(final ServiceModel serviceModel) throws Exception { + if (serviceModel.isUseSmithyClient()) { + return generateClientSmithyHeaderFile(serviceModel); + } + Template template = velocityEngine.getTemplate("/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/JsonServiceClientHeader.vm", StandardCharsets.UTF_8.name()); VelocityContext context = createContext(serviceModel); @@ -158,14 +163,23 @@ protected SdkFileEntry generateClientHeaderFile(final ServiceModel serviceModel) String fileName = String.format("include/aws/%s/%sClient.h", serviceModel.getMetadata().getProjectName(), serviceModel.getMetadata().getClassNamePrefix()); - return makeFile(template, context, fileName, true); } @Override protected List generateClientSourceFile(final List serviceModels) throws Exception { List sourceFiles = new ArrayList<>(); + + sourceFiles = generateSmithyClientSourceFile(serviceModels.stream() + .filter(ServiceModel::isUseSmithyClient) + .collect(Collectors.toList())); + + for (int i = 0; i < serviceModels.size(); i++) { + if(serviceModels.get(i).isUseSmithyClient()) + { + continue; + } Template template = velocityEngine.getTemplate("/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/JsonServiceClientSource.vm", StandardCharsets.UTF_8.name()); VelocityContext context = createContext(serviceModels.get(i)); diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java index 422e9eed7b3..396f0f37d77 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java @@ -153,6 +153,12 @@ public ServiceModel convert() { serviceModel.setDocumentation(formatDocumentation(c2jServiceModel.getDocumentation(), 3)); serviceModel.setServiceName(c2jServiceModel.getServiceName()); serviceModel.setAuthSchemes(c2jServiceModel.getMetadata().getAuth()); + //if auth field is not present, check for SignatureVersion + if( (c2jServiceModel.getMetadata().getAuth() == null || c2jServiceModel.getMetadata().getAuth().isEmpty() ) + && (c2jServiceModel.getMetadata().getSignatureVersion() != null)) + { + serviceModel.setAuthSchemes(Arrays.asList(c2jServiceModel.getMetadata().getSignatureVersion())); + } convertShapes(); convertOperations(); diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSource.vm index 35121c390ef..cc58f9baf73 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSource.vm @@ -47,7 +47,7 @@ const char* ${className}::GetAllocationTag() {return ALLOCATION_TAG;} #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyClientSourceInit.vm") #end -#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm") +#parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm") #if($metadata.hasEndpointDiscoveryTrait) #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEndpointDiscoveryDefinition.vm") 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 new file mode 100644 index 00000000000..cfa7e471429 --- /dev/null +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm @@ -0,0 +1,55 @@ +void ${className}::${operation.name}Async(Model::${operation.request.shape.name}& request, + const ${operation.name}StreamReadyHandler& streamReadyHandler, + const ${operation.name}ResponseReceivedHandler& handler, + const std::shared_ptr& handlerContext) const +{ + AWS_ASYNC_OPERATION_GUARD(${operation.name}); +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/common/ServiceClientOperationEndpointPrepareCommonBody.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()); } + ); +#else + JsonOutcome outcome = MakeRequestDeserialize(&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") + }) +#end + +#set($streamModelName = '') +#foreach($entity in $operation.request.shape.members.entrySet()) +#if($entity.value.shape.isEventStream()) +#set($streamModelName = ${entity.key}) +#set($streamModelType = ${entity.value.shape.name}) +#break +#end +#end +#set($streamModelNameWithFirstLetterCapitalized = $CppViewHelper.capitalizeFirstChar($streamModelName)) + auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); + eventEncoderStream->SetSigner(GetSignerByName(Aws::Auth::EVENTSTREAM_SIGV4_SIGNER)); + request.Set${streamModelNameWithFirstLetterCapitalized}(eventEncoderStream); // this becomes the body of the request + auto sem = Aws::MakeShared(ALLOCATION_TAG, 0, 1); + request.SetRequestSignedHandler([eventEncoderStream, sem](const Aws::Http::HttpRequest& httpRequest) { eventEncoderStream->SetSignatureSeed(Aws::Client::GetAuthorizationHeader(httpRequest)); sem->ReleaseAll(); }); + + m_clientConfiguration.executor->Submit([this, &request, handler, handlerContext] () mutable { + JsonOutcome outcome = MakeRequestDeserialize(&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") + }, + endpointOverrides) + 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()); + } + + ); + sem->WaitOne(); + streamReadyHandler(*request.Get${streamModelNameWithFirstLetterCapitalized}()); +} 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 new file mode 100644 index 00000000000..685eb19acab --- /dev/null +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceOperationsSource.vm @@ -0,0 +1,7 @@ +#foreach($operation in $serviceModel.operations) +#if($operation.request.shape.hasEventStreamMembers()) +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyJsonServiceEventStreamOperationsSource.vm") +#else +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm") +#end +#end \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm index eb57244ddd4..3034c35461a 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyServiceOperationsSource.vm @@ -1,8 +1,7 @@ -#foreach($operation in $serviceModel.operations) ${operation.name}Outcome ${className}::${operation.name}(const ${operation.request.shape.name}& request) const { AWS_OPERATION_GUARD(${operation.name}); - AWS_OPERATION_CHECK_PTR(m_endpointProvider, ${operation.name}, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/common/ServiceClientOperationRequestRequiredMemberValidate.vm") AWS_OPERATION_CHECK_PTR(m_clientConfiguration.telemetryProvider, ${operation.name}, CoreErrors, CoreErrors::NOT_INITIALIZED); auto tracer = m_clientConfiguration.telemetryProvider->getTracer(this->GetServiceClientName(), {}); auto meter = m_clientConfiguration.telemetryProvider->getMeter(this->GetServiceClientName(), {}); @@ -12,6 +11,14 @@ ${operation.name}Outcome ${className}::${operation.name}(const ${operation.reque smithy::components::tracing::SpanKind::CLIENT); return TracingUtils::MakeCallWithTiming<${operation.name}Outcome>( [&]()-> ${operation.name}Outcome { +#parse("/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm") +#if($operation.result && $operation.result.shape.hasStreamMembers()) + return ${operation.name}Outcome(MakeRequestWithUnparsedResponse(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_${operation.http.method})); +#elseif($operation.result && $operation.result.shape.hasEventStreamMembers()) + request.SetResponseStreamFactory( + [&] { request.GetEventStreamDecoder().Reset(); return Aws::New(ALLOCATION_TAG, request.GetEventStreamDecoder()); } + ); +#end return ${operation.name}Outcome(MakeRequestDeserialize(&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") })); @@ -21,4 +28,3 @@ ${operation.name}Outcome ${className}::${operation.name}(const ${operation.reque {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } -#end \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm new file mode 100644 index 00000000000..73ea98acac2 --- /dev/null +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyUriRequestQueryParams.vm @@ -0,0 +1,90 @@ +#if(($serviceNamespace == "S3Crt" && $operation.s3CrtEnabled) || $operation.getRequest().getShape().hasEventStreamMembers()) +#set($meterNeeded = true) +#set($indent = "") +#else +#set($meterNeeded = false) +#set($indent = " ") +#end +#if($meterNeeded) +${indent} auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); +#end +#if($operation.http.requestUri.contains("?")) +${indent} Aws::StringStream ss; +#end +#set($uriParts = $operation.http.requestUriParts) +#set($uriVars = $operation.http.requestParameters) +#if(!$startIndex) +#set($startIndex = 0) +#end +#set($partIndex = 1) +#set($queryStart = false) +#if($uriParts.size() > $startIndex) +#set($uriPartString = ${uriParts.get($startIndex)}) +#if($uriPartString.contains("?"))## if (request uri contains query) ---------- +#set($queryStart = true) +#set($pathAndQuery = $operation.http.splitUriPartIntoPathAndQuery($uriPartString)) +Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; +#if(!$pathAndQuery.get(0).isEmpty()) +#if($pathAndQuery.get(0).toLowerCase().contains("resourcearn")) +${indent} endpointOverrides.setRfc3986Encoded = true; +#end +${indent} endpointOverrides.pathSegments.emplace_back("${pathAndQuery.get(0)}"); +#end +${indent} ss.str("${pathAndQuery.get(1)}"); +#elseif(!$uriPartString.equals("/")) +${indent} Aws::Endpoint::AWSEndpointResolutionOverrides endpointOverrides; +#if($uriPartString.get(0).toLowerCase().contains("resourcearn")) +${indent} endpointOverrides.setRfc3986Encoded = true; +#end +${indent} endpointOverrides.pathSegments.emplace_back("$uriPartString"); +#end## ---------------------------- if (request uri contains query) end ------ +#foreach($var in $uriVars)## for (parameter in request uri parameters) ------- +#set($varIndex = $partIndex - 1) +#set($uriVar = $uriVars.get($varIndex).replace('+', '')) +#set($greedySyntax = $uriVars.get($varIndex).contains("+")) +#if(!$skipFirst) +#set($partShapeMember = $operation.request.shape.getMemberByLocationName($uriVar)) +#if($partShapeMember.shape.enum) +#set($parameter = "${partShapeMember.shape.name}Mapper::GetNameFor${partShapeMember.shape.name}(request.Get${CppViewHelper.convertToUpperCamel($operation.request.shape.getMemberNameByLocationName($uriVar))}())") +#else +#set($parameter = "request.Get${CppViewHelper.convertToUpperCamel($operation.request.shape.getMemberNameByLocationName($uriVar))}()") +#end +#if($queryStart) +${indent} ss << $parameter; +#else +#if($greedySyntax) +#if($parameter.toLowerCase().contains("resourcearn")) +${indent} endpointOverrides.setRfc3986Encoded = true; +#end +${indent} endpointOverrides.pathSegments.emplace_back($parameter); +#else +${indent} endpointOverrides.pathSegments.emplace_back($parameter); +#end +#end +#if($uriParts.size() > $partIndex) +#set($uriPartString = "${uriParts.get($partIndex)}") +#if(!$queryStart && $uriPartString.contains("?")) +#set($queryStart = true) +#set($pathAndQuery = $operation.http.splitUriPartIntoPathAndQuery($uriPartString)) +#if(!$pathAndQuery.get(0).isEmpty()) +#if($pathAndQuery.get(0).toLowerCase().contains("resourcearn")) +${indent} endpointOverrides.setRfc3986Encoded = true; +#end +${indent} endpointOverrides.pathSegments.emplace_back("${pathAndQuery.get(0)}"); +#end +${indent} ss.str("${pathAndQuery.get(1)}"); +#elseif(!$uriPartString.equals("/")) +#if($uriPartString.toLowerCase().contains("resourcearn")) +${indent} endpointOverrides.setRfc3986Encoded = true; +#end +${indent} endpointOverrides.pathSegments.emplace_back("$uriPartString"); +#end +#end +#end## --------------------- if !skipFirst end --- +#set($partIndex = $partIndex + 1) +#set($skipFirst = false) +#end## --------------------- if uriParts.size() > startIndex end --- +#end## --------------------- for (parameter in request uri parameters) end --- +#if($queryStart) +${indent} endpointResolutionOutcome.GetResult().SetQueryString(ss.str()); +#end \ No newline at end of file diff --git a/tools/scripts/run_code_generation.py b/tools/scripts/run_code_generation.py index ea6fd80238e..bbb92277749 100644 --- a/tools/scripts/run_code_generation.py +++ b/tools/scripts/run_code_generation.py @@ -50,11 +50,11 @@ CORE_COMPONENT_TO_MODEL = {"defaults": DEFAULTS_FILE_LOCATION, "partitions": PARTITIONS_FILE_LOCATION} -SMITHY_SUPPORTED_CLIENTS = [ +SMITHY_SUPPORTED_CLIENTS = { "dynamodb" -] +} -DEBUG = False +DEBUG = True class ServiceModel(object): def __init__(self, service_id, c2j_model, endpoint_rule_set, endpoint_tests): @@ -137,6 +137,11 @@ def collect_available_models(models_dir: str, endpoint_rules_dir: str, legacy_ma key = model["metadata"]["serviceId"] #convert into smithy case convention key = key.lower().replace(' ', '-') + + #if protocol is + if ("protocol" in model["metadata"] and + (model["metadata"]["protocol"] == "json" or model["metadata"]["protocol"] == "rest-json")): + SMITHY_SUPPORTED_CLIENTS.add(key) else: print("service Id not found in model file:", model_file_date[0], " Skipping.") continue @@ -164,7 +169,6 @@ def collect_available_models(models_dir: str, endpoint_rules_dir: str, legacy_ma if service_name_to_model_filename.get("s3") and "s3-crt" not in service_name_to_model_filename: service_name_to_model_filename["s3-crt"] = service_name_to_model_filename["s3"] - return service_name_to_model_filename @@ -292,6 +296,7 @@ def generate_single_client(service_name: str, generator_filepath: str, output_dir: str, tmp_dir: str, + use_smithy: bool, kwargs): """Generate a single AWS client in AWS-SDK-CPP from c2j model @@ -330,8 +335,7 @@ def generate_single_client(service_name: str, run_command += ["--endpoint-tests", f"{endpoints_filepath}/{model_files.endpoint_tests}"] run_command += ["--service", service_name] run_command += ["--outputfile", output_filename] - - if service_name in SMITHY_SUPPORTED_CLIENTS: + if use_smithy: run_command += ["--use-smithy-client"] for key, val in kwargs.items(): @@ -592,14 +596,12 @@ def main(): None, args["raw_generator_arguments"]) pending.add(task) - for service in clients_to_build: model_files = available_models[service] while len(pending) >= max_workers: new_done, pending = wait(pending, return_when=FIRST_COMPLETED) done.update(new_done) - task = executor.submit(generate_single_client, service, model_files, @@ -608,6 +610,7 @@ def main(): args["path_to_generator"], args["output_location"], None, + service in SMITHY_SUPPORTED_CLIENTS, args["raw_generator_arguments"]) pending.add(task)