diff --git a/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/model/ChatInputStream.h b/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/model/ChatInputStream.h
index 38a532009c4..1a364696c78 100644
--- a/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/model/ChatInputStream.h
+++ b/generated/src/aws-cpp-sdk-qbusiness/include/aws/qbusiness/model/ChatInputStream.h
@@ -28,7 +28,7 @@ namespace Model
* href="http://docs.aws.amazon.com/goto/WebAPI/qbusiness-2023-11-27/ChatInputStream">AWS
* API Reference
*/
- class AWS_QBUSINESS_API ChatInputStream : public Aws::Utils::Event::SmithyEventEncoderStream
+ class AWS_QBUSINESS_API ChatInputStream : public Aws::Utils::Event::SmithyEventEncoderStream
{
public:
ChatInputStream& WriteConfigurationEvent(const ConfigurationEvent& value)
diff --git a/generated/src/aws-cpp-sdk-transcribestreaming/include/aws/transcribestreaming/model/AudioStream.h b/generated/src/aws-cpp-sdk-transcribestreaming/include/aws/transcribestreaming/model/AudioStream.h
index d086f7ec0b7..bfe2239c754 100644
--- a/generated/src/aws-cpp-sdk-transcribestreaming/include/aws/transcribestreaming/model/AudioStream.h
+++ b/generated/src/aws-cpp-sdk-transcribestreaming/include/aws/transcribestreaming/model/AudioStream.h
@@ -25,7 +25,7 @@ namespace Model
* href="http://docs.aws.amazon.com/goto/WebAPI/transcribe-streaming-2017-10-26/AudioStream">AWS
* API Reference
*/
- class AWS_TRANSCRIBESTREAMINGSERVICE_API AudioStream : public Aws::Utils::Event::SmithyEventEncoderStream
+ class AWS_TRANSCRIBESTREAMINGSERVICE_API AudioStream : public Aws::Utils::Event::SmithyEventEncoderStream
{
public:
AudioStream& WriteAudioEvent(const AudioEvent& value)
diff --git a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthBearerSigner.h b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthBearerSigner.h
index 3eba7a96103..78e61a883ba 100644
--- a/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthBearerSigner.h
+++ b/src/aws-cpp-sdk-core/include/aws/core/auth/signer/AWSAuthBearerSigner.h
@@ -97,11 +97,9 @@ namespace Aws
return PresignRequest(ioRequest, expirationInSeconds);
}
- std::shared_ptr BearerTokenProvider() const
- {
- return m_bearerTokenProvider;
- }
- protected:
+ std::shared_ptr BearerTokenProvider() const { return m_bearerTokenProvider; }
+
+ protected:
std::shared_ptr m_bearerTokenProvider;
};
diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h
index 34b35e839bc..1e2140d50f7 100644
--- a/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h
+++ b/src/aws-cpp-sdk-core/include/aws/core/utils/event/EventEncoderStream.h
@@ -75,12 +75,12 @@ namespace Aws
EventStreamEncoder m_encoder;
};
- template
class AWS_CORE_API SmithyEventEncoderStream : public EventEncoderStream {
public:
explicit SmithyEventEncoderStream(size_t bufferSize = DEFAULT_BUF_SIZE) : EventEncoderStream(bufferSize) {}
virtual ~SmithyEventEncoderStream() {}
- void SetSigner(std::shared_ptr > signer, Aws::UniquePtr identity) {
+ void SetSigner(std::shared_ptr > signer,
+ Aws::UniquePtr identity) {
m_evtEncoder.SetSigner(signer, std::move(identity));
}
void SetSignatureSeed(const Aws::String& seed) override { m_evtEncoder.SetSignatureSeed(seed); }
@@ -89,7 +89,7 @@ namespace Aws
Aws::Vector EncodeAndSign(const Aws::Utils::Event::Message& msg) override {
return m_evtEncoder.EncodeAndSign(msg);
}
- SmithyEventStreamEncoder m_evtEncoder;
+ SmithyEventStreamEncoder m_evtEncoder;
};
} // namespace Event
}
diff --git a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h
index 653c5a601ad..aa743d0c750 100644
--- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h
+++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClient.h
@@ -131,9 +131,10 @@ namespace client
return m_serializer->Deserialize(std::move(httpResponseOutcome), GetServiceClientName(), requestName);
}
- ResponseT MakeEventStreamRequestDeserialize(Aws::AmazonWebServiceRequest const* const request, const char* requestName,
- Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback,
- std::shared_ptr eventEncoderStream_sp) const {
+ ResponseT MakeEventStreamRequestDeserialize(
+ Aws::AmazonWebServiceRequest const* const request, const char* requestName, Aws::Http::HttpMethod method,
+ EndpointUpdateCallback&& endpointCallback,
+ std::shared_ptr eventEncoderStream_sp) const {
std::shared_ptr pExecutor =
Aws::MakeShared("AwsSmithyClient");
assert(pExecutor);
@@ -149,8 +150,9 @@ namespace client
}
protected:
- void SetSignerInEventStreamRequest(std::shared_ptr& pRequestCtx,
- std::shared_ptr& eventEncoderStreamSp) const override {
+ void SetSignerInEventStreamRequest(
+ std::shared_ptr& pRequestCtx,
+ std::shared_ptr& eventEncoderStreamSp) const override {
if (pRequestCtx && pRequestCtx->m_pRequest && eventEncoderStreamSp) {
if (AwsClientRequestSigning::SetSignerInEventStream(eventEncoderStreamSp, pRequestCtx->m_authSchemeOption,
m_authSchemes)) {
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 4d10937cb1f..26179223d99 100644
--- a/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h
+++ b/src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h
@@ -135,7 +135,7 @@ namespace client
void MakeRequestAsync(Aws::AmazonWebServiceRequest const* const request, const char* requestName, Aws::Http::HttpMethod method,
EndpointUpdateCallback&& endpointCallback, ResponseHandlerFunc&& responseHandler,
std::shared_ptr pExecutor,
- std::shared_ptr eventEncoderStream_sp = nullptr) const;
+ std::shared_ptr eventEncoderStream_sp = nullptr) const;
HttpResponseOutcome MakeRequestSync(Aws::AmazonWebServiceRequest const* const request, const char* requestName,
Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback) const;
@@ -164,7 +164,7 @@ namespace client
protected:
virtual void SetSignerInEventStreamRequest(std::shared_ptr&,
- std::shared_ptr&) const {};
+ std::shared_ptr&) const {};
Aws::UniquePtr m_clientConfig;
Aws::String m_serviceName;
Aws::String m_userAgent;
diff --git a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h
index c54f9bbae06..585f5f7ab04 100644
--- a/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h
+++ b/src/aws-cpp-sdk-core/include/smithy/client/common/AwsSmithyRequestSigning.h
@@ -19,6 +19,7 @@
#include
#include
+#include
namespace smithy
@@ -80,7 +81,7 @@ namespace smithy
return visitor.m_resultShouldWait;
}
- static bool SetSignerInEventStream(std::shared_ptr eventEncoderStreamSp,
+ static bool SetSignerInEventStream(std::shared_ptr eventEncoderStreamSp,
const AuthSchemeOption& authSchemeOption,
const Aws::UnorderedMap& authSchemes) {
bool result = false;
@@ -197,7 +198,7 @@ namespace smithy
<< ", while client time is "
<< DateTime::Now().ToGmtString(DateFormat::RFC822));
auto diff = DateTime::Diff(m_serverTime, signingTimestamp);
- //only try again if clock skew was the cause of the error.
+ // only try again if clock skew was the cause of the error.
if (diff >= TIME_DIFF_MAX || diff <= TIME_DIFF_MIN) {
diff = DateTime::Diff(m_serverTime, DateTime::Now());
AWS_LOGSTREAM_INFO(AWS_SMITHY_CLIENT_SIGNING_TAG,
@@ -213,22 +214,23 @@ namespace smithy
};
struct EventStreamSignerVisitor {
- explicit EventStreamSignerVisitor(std::shared_ptr evSp,
+ explicit EventStreamSignerVisitor(std::shared_ptr evSp,
const AuthSchemeOption& targetAuthSchemeOption)
: m_eventEncoderStreamSp(evSp), m_targetAuthSchemeOption(targetAuthSchemeOption) {}
- std::shared_ptr m_eventEncoderStreamSp;
+ std::shared_ptr m_eventEncoderStreamSp;
const AuthSchemeOption& m_targetAuthSchemeOption;
template
- void operator()(AuthSchemeAlternativeT& authScheme) {
+ void operator()(AuthSchemeAlternativeT&) {}
+
+ template <>
+ void operator()(smithy::SigV4AuthScheme& authScheme) {
// Auth Scheme Variant alternative contains the requested auth option
assert(strcmp(authScheme.schemeId, m_targetAuthSchemeOption.schemeId) == 0);
-
- using IdentityT = typename std::remove_reference::type::IdentityT;
+ using IdentityT = smithy::SigV4AuthScheme::IdentityT;
using IdentityResolver = IdentityResolverBase;
using Signer = AwsSignerBase;
-
std::shared_ptr signer = authScheme.signer(m_targetAuthSchemeOption.isEventStreaming);
if (!signer) {
AWS_LOGSTREAM_ERROR(AWS_SMITHY_CLIENT_SIGNING_TAG, "Failed to adjust signing clock skew. Signer is null.");
@@ -251,8 +253,7 @@ namespace smithy
}
// typecast to streaming type as we know this visitor is for smithy types
- (std::dynamic_pointer_cast>(m_eventEncoderStreamSp))
- ->SetSigner(signer, std::move(identityResult.GetResultWithOwnership()));
+ m_eventEncoderStreamSp->SetSigner(signer, std::move(identityResult.GetResultWithOwnership()));
}
};
};
diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/resolver/AwsBearerTokenIdentityResolver.h b/src/aws-cpp-sdk-core/include/smithy/identity/resolver/AwsBearerTokenIdentityResolver.h
index 94a40e6c3a4..f65bc2b0ba2 100644
--- a/src/aws-cpp-sdk-core/include/smithy/identity/resolver/AwsBearerTokenIdentityResolver.h
+++ b/src/aws-cpp-sdk-core/include/smithy/identity/resolver/AwsBearerTokenIdentityResolver.h
@@ -6,10 +6,10 @@
#include
#include
-#include
-#include
#include
#include
+#include
+#include
namespace smithy
{
@@ -32,17 +32,11 @@ class AwsBearerTokenIdentityResolver
{
}
- AwsBearerTokenIdentityResolver(
- const Aws::Auth::BearerTokenAuthSignerProvider& bearerTokenProvider
- )
- {
- auto signer = bearerTokenProvider.GetSigner(Aws::Auth::BEARER_SIGNER);
- if(signer)
- {
- m_providerChainLegacy.emplace_back(
- std::dynamic_pointer_cast(signer)->BearerTokenProvider()
- );
- }
+ AwsBearerTokenIdentityResolver(const Aws::Auth::BearerTokenAuthSignerProvider &bearerTokenProvider) {
+ auto signer = bearerTokenProvider.GetSigner(Aws::Auth::BEARER_SIGNER);
+ if (signer) {
+ m_providerChainLegacy.emplace_back(std::dynamic_pointer_cast(signer)->BearerTokenProvider());
+ }
}
ResolveIdentityFutureOutcome
@@ -100,9 +94,8 @@ class DefaultAwsBearerTokenIdentityResolver
virtual ~DefaultAwsBearerTokenIdentityResolver() = default;
DefaultAwsBearerTokenIdentityResolver()
- : AwsBearerTokenIdentityResolver(
- Aws::Vector>{Aws::MakeShared(
- "SSOBearerTokenProvider")}){};
+ : AwsBearerTokenIdentityResolver(Aws::Vector>{
+ Aws::MakeShared("SSOBearerTokenProvider")}){};
};
const char
AwsBearerTokenIdentityResolver::BEARER_TOKEN_PROVIDER_CHAIN_LOG_TAG[] =
diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/resolver/built-in/DefaultAwsCredentialIdentityResolver.h b/src/aws-cpp-sdk-core/include/smithy/identity/resolver/built-in/DefaultAwsCredentialIdentityResolver.h
index 0f5e5b3ef10..c2d4f01ab6c 100644
--- a/src/aws-cpp-sdk-core/include/smithy/identity/resolver/built-in/DefaultAwsCredentialIdentityResolver.h
+++ b/src/aws-cpp-sdk-core/include/smithy/identity/resolver/built-in/DefaultAwsCredentialIdentityResolver.h
@@ -8,7 +8,7 @@
#include
#include
-
+#include
namespace smithy {
constexpr char ALLOC_ID[] = "DefaultAwsCredentialIdentityResolver";
/**
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 8756dc73d54..f19c9bfdc6d 100644
--- a/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp
+++ b/src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp
@@ -100,7 +100,7 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c
Aws::Http::HttpMethod method, EndpointUpdateCallback&& endpointCallback,
ResponseHandlerFunc&& responseHandler,
std::shared_ptr pExecutor,
- std::shared_ptr eventEncoderStreamSp) const {
+ std::shared_ptr eventEncoderStreamSp) const {
if (!responseHandler) {
assert(!"Missing a mandatory response handler!");
AWS_LOGSTREAM_FATAL(AWS_SMITHY_CLIENT_LOG, "Unable to continue AWSClient request: response handler is missing!");
diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEventStreamHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEventStreamHeader.vm
index 5d66f12cfb6..f2313dc88e1 100644
--- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEventStreamHeader.vm
+++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/smithy/SmithyEventStreamHeader.vm
@@ -40,7 +40,7 @@ namespace Model
* $shape.documentation
*/
#end
- class $typeInfo.exportValue $typeInfo.className : public Aws::Utils::Event::SmithyEventEncoderStream
+ class $typeInfo.exportValue $typeInfo.className : public Aws::Utils::Event::SmithyEventEncoderStream
{
public:
#foreach($entry in $shape.members.entrySet())