AWS SDK for C++  1.9.19
AWS SDK for C++
InvokeResult.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <aws/core/utils/Array.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 template<typename RESULT_TYPE>
16 class AmazonWebServiceResult;
17 
18 namespace Lambda
19 {
20 namespace Model
21 {
23  {
24  public:
26  //We have to define these because Microsoft doesn't auto generate them
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;
32  InvokeResult& operator=(const InvokeResult&) = delete;
33 
34 
37 
38 
39 
46  inline int GetStatusCode() const{ return m_statusCode; }
47 
54  inline void SetStatusCode(int value) { m_statusCode = value; }
55 
62  inline InvokeResult& WithStatusCode(int value) { SetStatusCode(value); return *this;}
63 
64 
69  inline const Aws::String& GetFunctionError() const{ return m_functionError; }
70 
75  inline void SetFunctionError(const Aws::String& value) { m_functionError = value; }
76 
81  inline void SetFunctionError(Aws::String&& value) { m_functionError = std::move(value); }
82 
87  inline void SetFunctionError(const char* value) { m_functionError.assign(value); }
88 
93  inline InvokeResult& WithFunctionError(const Aws::String& value) { SetFunctionError(value); return *this;}
94 
99  inline InvokeResult& WithFunctionError(Aws::String&& value) { SetFunctionError(std::move(value)); return *this;}
100 
105  inline InvokeResult& WithFunctionError(const char* value) { SetFunctionError(value); return *this;}
106 
107 
111  inline const Aws::String& GetLogResult() const{ return m_logResult; }
112 
116  inline void SetLogResult(const Aws::String& value) { m_logResult = value; }
117 
121  inline void SetLogResult(Aws::String&& value) { m_logResult = std::move(value); }
122 
126  inline void SetLogResult(const char* value) { m_logResult.assign(value); }
127 
131  inline InvokeResult& WithLogResult(const Aws::String& value) { SetLogResult(value); return *this;}
132 
136  inline InvokeResult& WithLogResult(Aws::String&& value) { SetLogResult(std::move(value)); return *this;}
137 
141  inline InvokeResult& WithLogResult(const char* value) { SetLogResult(value); return *this;}
142 
143 
147  inline Aws::IOStream& GetPayload() { return m_payload.GetUnderlyingStream(); }
148 
152  inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
153 
154 
159  inline const Aws::String& GetExecutedVersion() const{ return m_executedVersion; }
160 
165  inline void SetExecutedVersion(const Aws::String& value) { m_executedVersion = value; }
166 
171  inline void SetExecutedVersion(Aws::String&& value) { m_executedVersion = std::move(value); }
172 
177  inline void SetExecutedVersion(const char* value) { m_executedVersion.assign(value); }
178 
183  inline InvokeResult& WithExecutedVersion(const Aws::String& value) { SetExecutedVersion(value); return *this;}
184 
189  inline InvokeResult& WithExecutedVersion(Aws::String&& value) { SetExecutedVersion(std::move(value)); return *this;}
190 
195  inline InvokeResult& WithExecutedVersion(const char* value) { SetExecutedVersion(value); return *this;}
196 
197  private:
198 
199  int m_statusCode;
200 
201  Aws::String m_functionError;
202 
203  Aws::String m_logResult;
204 
206 
207  Aws::String m_executedVersion;
208  };
209 
210 } // namespace Model
211 } // namespace Lambda
212 } // namespace Aws
Aws::IOStream
std::basic_iostream< char, std::char_traits< char > > IOStream
Definition: AWSStreamFwd.h:22
Aws::AmazonWebServiceResult
Definition: AmazonWebServiceResult.h:19
Aws::Utils::Stream::ResponseStream
Definition: ResponseStream.h:22
Aws::Lambda::Model::InvokeResult::GetStatusCode
int GetStatusCode() const
Definition: InvokeResult.h:46
Aws::Lambda::Model::InvokeResult::WithExecutedVersion
InvokeResult & WithExecutedVersion(const Aws::String &value)
Definition: InvokeResult.h:183
Aws::Lambda::Model::InvokeResult::SetLogResult
void SetLogResult(const Aws::String &value)
Definition: InvokeResult.h:116
Aws::Lambda::Model::InvokeResult::GetExecutedVersion
const Aws::String & GetExecutedVersion() const
Definition: InvokeResult.h:159
Aws::Lambda::Model::InvokeResult::SetFunctionError
void SetFunctionError(Aws::String &&value)
Definition: InvokeResult.h:81
Aws::Lambda::Model::InvokeResult::WithFunctionError
InvokeResult & WithFunctionError(const Aws::String &value)
Definition: InvokeResult.h:93
Aws::Lambda::Model::InvokeResult::WithLogResult
InvokeResult & WithLogResult(const Aws::String &value)
Definition: InvokeResult.h:131
Aws::Lambda::Model::InvokeResult::GetLogResult
const Aws::String & GetLogResult() const
Definition: InvokeResult.h:111
Aws::Lambda::Model::InvokeResult::operator=
InvokeResult & operator=(InvokeResult &&)
Aws::Lambda::Model::InvokeResult::InvokeResult
InvokeResult(InvokeResult &&)
Aws::Lambda::Model::InvokeResult::operator=
InvokeResult & operator=(Aws::AmazonWebServiceResult< Aws::Utils::Stream::ResponseStream > &&result)
Aws::Lambda::Model::InvokeResult::operator=
InvokeResult & operator=(const InvokeResult &)=delete
Aws::Lambda::Model::InvokeResult::WithExecutedVersion
InvokeResult & WithExecutedVersion(Aws::String &&value)
Definition: InvokeResult.h:189
Aws::Lambda::Model::InvokeResult::GetFunctionError
const Aws::String & GetFunctionError() const
Definition: InvokeResult.h:69
AWS_LAMBDA_API
#define AWS_LAMBDA_API
Definition: Lambda_EXPORTS.h:28
Aws::Lambda::Model::InvokeResult::WithExecutedVersion
InvokeResult & WithExecutedVersion(const char *value)
Definition: InvokeResult.h:195
Aws::Lambda::Model::InvokeResult::SetExecutedVersion
void SetExecutedVersion(const char *value)
Definition: InvokeResult.h:177
Aws::Lambda::Model::InvokeResult::InvokeResult
InvokeResult(Aws::AmazonWebServiceResult< Aws::Utils::Stream::ResponseStream > &&result)
Aws::Lambda::Model::InvokeResult::WithLogResult
InvokeResult & WithLogResult(const char *value)
Definition: InvokeResult.h:141
Aws::Lambda::Model::InvokeResult::ReplaceBody
void ReplaceBody(Aws::IOStream *body)
Definition: InvokeResult.h:152
Aws::Lambda::Model::InvokeResult::WithLogResult
InvokeResult & WithLogResult(Aws::String &&value)
Definition: InvokeResult.h:136
Aws::Lambda::Model::InvokeResult::WithFunctionError
InvokeResult & WithFunctionError(Aws::String &&value)
Definition: InvokeResult.h:99
Aws::Lambda::Model::InvokeResult::SetStatusCode
void SetStatusCode(int value)
Definition: InvokeResult.h:54
AWSString.h
Aws::Lambda::Model::InvokeResult::InvokeResult
InvokeResult()
Aws::Lambda::Model::InvokeResult::GetPayload
Aws::IOStream & GetPayload()
Definition: InvokeResult.h:147
Aws::Lambda::Model::InvokeResult::SetExecutedVersion
void SetExecutedVersion(const Aws::String &value)
Definition: InvokeResult.h:165
Aws::Lambda::Model::InvokeResult
Definition: InvokeResult.h:23
Aws::Lambda::Model::InvokeResult::SetExecutedVersion
void SetExecutedVersion(Aws::String &&value)
Definition: InvokeResult.h:171
Aws::CodePipeline::Model::ExecutorType::NOT_SET
@ NOT_SET
Aws
Definition: AccessManagementClient.h:15
Array.h
Aws::Lambda::Model::InvokeResult::SetFunctionError
void SetFunctionError(const Aws::String &value)
Definition: InvokeResult.h:75
Aws::Lambda::Model::InvokeResult::InvokeResult
InvokeResult(const InvokeResult &)=delete
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lambda::Model::InvokeResult::SetFunctionError
void SetFunctionError(const char *value)
Definition: InvokeResult.h:87
Aws::Lambda::Model::InvokeResult::WithFunctionError
InvokeResult & WithFunctionError(const char *value)
Definition: InvokeResult.h:105
ResponseStream.h
Aws::Lambda::Model::InvokeResult::SetLogResult
void SetLogResult(Aws::String &&value)
Definition: InvokeResult.h:121
Aws::Lambda::Model::InvokeResult::SetLogResult
void SetLogResult(const char *value)
Definition: InvokeResult.h:126
Aws::Lambda::Model::InvokeResult::WithStatusCode
InvokeResult & WithStatusCode(int value)
Definition: InvokeResult.h:62
Lambda_EXPORTS.h