AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
InvokeResult.h
1
6#pragma once
7#include <aws/lambda/Lambda_EXPORTS.h>
8#include <aws/core/utils/stream/ResponseStream.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/Array.h>
11#include <utility>
12
13namespace Aws
14{
15template<typename RESULT_TYPE>
16class AmazonWebServiceResult;
17
18namespace Lambda
19{
20namespace Model
21{
23 {
24 public:
25 AWS_LAMBDA_API InvokeResult();
26 //We have to define these because Microsoft doesn't auto generate them
27 AWS_LAMBDA_API InvokeResult(InvokeResult&&);
29 //we delete these because Microsoft doesn't handle move generation correctly
30 //and we therefore don't trust them to get it right here either.
31 InvokeResult(const InvokeResult&) = delete;
33
34
37
38
39
41
47 inline int GetStatusCode() const{ return m_statusCode; }
48 inline void SetStatusCode(int value) { m_statusCode = value; }
49 inline InvokeResult& WithStatusCode(int value) { SetStatusCode(value); return *this;}
51
53
57 inline const Aws::String& GetFunctionError() const{ return m_functionError; }
58 inline void SetFunctionError(const Aws::String& value) { m_functionError = value; }
59 inline void SetFunctionError(Aws::String&& value) { m_functionError = std::move(value); }
60 inline void SetFunctionError(const char* value) { m_functionError.assign(value); }
61 inline InvokeResult& WithFunctionError(const Aws::String& value) { SetFunctionError(value); return *this;}
62 inline InvokeResult& WithFunctionError(Aws::String&& value) { SetFunctionError(std::move(value)); return *this;}
63 inline InvokeResult& WithFunctionError(const char* value) { SetFunctionError(value); return *this;}
65
67
70 inline const Aws::String& GetLogResult() const{ return m_logResult; }
71 inline void SetLogResult(const Aws::String& value) { m_logResult = value; }
72 inline void SetLogResult(Aws::String&& value) { m_logResult = std::move(value); }
73 inline void SetLogResult(const char* value) { m_logResult.assign(value); }
74 inline InvokeResult& WithLogResult(const Aws::String& value) { SetLogResult(value); return *this;}
75 inline InvokeResult& WithLogResult(Aws::String&& value) { SetLogResult(std::move(value)); return *this;}
76 inline InvokeResult& WithLogResult(const char* value) { SetLogResult(value); return *this;}
78
80
83 inline Aws::IOStream& GetPayload() const { return m_payload.GetUnderlyingStream(); }
84 inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
85
87
89
93 inline const Aws::String& GetExecutedVersion() const{ return m_executedVersion; }
94 inline void SetExecutedVersion(const Aws::String& value) { m_executedVersion = value; }
95 inline void SetExecutedVersion(Aws::String&& value) { m_executedVersion = std::move(value); }
96 inline void SetExecutedVersion(const char* value) { m_executedVersion.assign(value); }
97 inline InvokeResult& WithExecutedVersion(const Aws::String& value) { SetExecutedVersion(value); return *this;}
98 inline InvokeResult& WithExecutedVersion(Aws::String&& value) { SetExecutedVersion(std::move(value)); return *this;}
99 inline InvokeResult& WithExecutedVersion(const char* value) { SetExecutedVersion(value); return *this;}
101
103
104 inline const Aws::String& GetRequestId() const{ return m_requestId; }
105 inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
106 inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
107 inline void SetRequestId(const char* value) { m_requestId.assign(value); }
108 inline InvokeResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
109 inline InvokeResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
110 inline InvokeResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
112 private:
113
114 int m_statusCode;
115
116 Aws::String m_functionError;
117
118 Aws::String m_logResult;
119
121
122 Aws::String m_executedVersion;
123
124 Aws::String m_requestId;
125 };
126
127} // namespace Model
128} // namespace Lambda
129} // namespace Aws
InvokeResult & WithFunctionError(Aws::String &&value)
void SetLogResult(const char *value)
void SetFunctionError(const Aws::String &value)
void SetRequestId(const char *value)
void SetFunctionError(Aws::String &&value)
AWS_LAMBDA_API InvokeResult & operator=(Aws::AmazonWebServiceResult< Aws::Utils::Stream::ResponseStream > &&result)
InvokeResult & WithRequestId(Aws::String &&value)
const Aws::String & GetExecutedVersion() const
void ReplaceBody(Aws::IOStream *body)
void SetExecutedVersion(Aws::String &&value)
InvokeResult & WithFunctionError(const Aws::String &value)
const Aws::String & GetRequestId() const
const Aws::String & GetLogResult() const
InvokeResult(const InvokeResult &)=delete
AWS_LAMBDA_API InvokeResult(Aws::AmazonWebServiceResult< Aws::Utils::Stream::ResponseStream > &&result)
void SetExecutedVersion(const char *value)
InvokeResult & operator=(const InvokeResult &)=delete
void SetLogResult(const Aws::String &value)
InvokeResult & WithExecutedVersion(Aws::String &&value)
void SetRequestId(Aws::String &&value)
InvokeResult & WithLogResult(const Aws::String &value)
InvokeResult & WithFunctionError(const char *value)
InvokeResult & WithExecutedVersion(const char *value)
AWS_LAMBDA_API InvokeResult & operator=(InvokeResult &&)
void SetExecutedVersion(const Aws::String &value)
InvokeResult & WithStatusCode(int value)
InvokeResult & WithLogResult(Aws::String &&value)
void SetRequestId(const Aws::String &value)
Aws::IOStream & GetPayload() const
InvokeResult & WithRequestId(const Aws::String &value)
void SetFunctionError(const char *value)
InvokeResult & WithRequestId(const char *value)
void SetLogResult(Aws::String &&value)
const Aws::String & GetFunctionError() const
InvokeResult & WithLogResult(const char *value)
InvokeResult & WithExecutedVersion(const Aws::String &value)
AWS_LAMBDA_API InvokeResult(InvokeResult &&)
Aws::IOStream & GetUnderlyingStream() const
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String