AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
InterceptorContext.h
1
5#pragma once
6#include <aws/core/utils/memory/stl/AWSString.h>
7#include <aws/core/AmazonWebServiceRequest.h>
8#include <aws/core/AmazonWebServiceResult.h>
9#include <aws/core/http/HttpRequest.h>
10#include <aws/core/http/HttpResponse.h>
11#include <aws/core/client/CoreErrors.h>
12
13namespace smithy
14{
15 namespace interceptor
16 {
18 {
19 public:
20 explicit InterceptorContext(const Aws::AmazonWebServiceRequest& m_modeled_request)
21 : m_modeledRequest(m_modeled_request)
22 {
23 }
24
25 virtual ~InterceptorContext() = default;
26 InterceptorContext(const InterceptorContext& other) = delete;
27 InterceptorContext(InterceptorContext&& other) noexcept = delete;
29 InterceptorContext& operator=(InterceptorContext&& other) noexcept = delete;
30
32 {
33 return m_modeledRequest;
34 }
35
36 std::shared_ptr<Aws::Http::HttpRequest> GetTransmitRequest() const
37 {
38 return m_transmitRequest;
39 }
40
41 void SetTransmitRequest(const std::shared_ptr<Aws::Http::HttpRequest>& transmitRequest)
42 {
43 m_transmitRequest = transmitRequest;
44 }
45
46 std::shared_ptr<Aws::Http::HttpResponse> GetTransmitResponse() const
47 {
48 return m_transmitResponse;
49 }
50
51 void SetTransmitResponse(const std::shared_ptr<Aws::Http::HttpResponse>& transmitResponse)
52 {
53 m_transmitResponse = transmitResponse;
54 }
55
57 {
58 return m_attributes.at(key);
59 }
60
61 void SetAttribute(const Aws::String& key, const Aws::String& value)
62 {
63 m_attributes.insert({key, value});
64 }
65
66 private:
68 const Aws::AmazonWebServiceRequest& m_modeledRequest;
69 std::shared_ptr<Aws::Http::HttpRequest> m_transmitRequest{nullptr};
70 std::shared_ptr<Aws::Http::HttpResponse> m_transmitResponse{nullptr};
71 };
72 }
73}
void SetTransmitResponse(const std::shared_ptr< Aws::Http::HttpResponse > &transmitResponse)
InterceptorContext(InterceptorContext &&other) noexcept=delete
const Aws::AmazonWebServiceRequest & GetModeledRequest() const
void SetTransmitRequest(const std::shared_ptr< Aws::Http::HttpRequest > &transmitRequest)
InterceptorContext(const InterceptorContext &other)=delete
Aws::String GetAttribute(const Aws::String &key) const
void SetAttribute(const Aws::String &key, const Aws::String &value)
InterceptorContext(const Aws::AmazonWebServiceRequest &m_modeled_request)
InterceptorContext & operator=(const InterceptorContext &other)=delete
std::shared_ptr< Aws::Http::HttpRequest > GetTransmitRequest() const
std::shared_ptr< Aws::Http::HttpResponse > GetTransmitResponse() const
InterceptorContext & operator=(InterceptorContext &&other) noexcept=delete
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition AWSMap.h:20
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97