AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
StateReason.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace EC2 {
20namespace Model {
21
28 public:
29 AWS_EC2_API StateReason() = default;
30 AWS_EC2_API StateReason(const Aws::Utils::Xml::XmlNode& xmlNode);
31 AWS_EC2_API StateReason& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
32
33 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
34 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
35
37
40 inline const Aws::String& GetCode() const { return m_code; }
41 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
42 template <typename CodeT = Aws::String>
43 void SetCode(CodeT&& value) {
44 m_codeHasBeenSet = true;
45 m_code = std::forward<CodeT>(value);
46 }
47 template <typename CodeT = Aws::String>
48 StateReason& WithCode(CodeT&& value) {
49 SetCode(std::forward<CodeT>(value));
50 return *this;
51 }
53
55
82 inline const Aws::String& GetMessage() const { return m_message; }
83 inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
84 template <typename MessageT = Aws::String>
85 void SetMessage(MessageT&& value) {
86 m_messageHasBeenSet = true;
87 m_message = std::forward<MessageT>(value);
88 }
89 template <typename MessageT = Aws::String>
90 StateReason& WithMessage(MessageT&& value) {
91 SetMessage(std::forward<MessageT>(value));
92 return *this;
93 }
95 private:
96 Aws::String m_code;
97
98 Aws::String m_message;
99 bool m_codeHasBeenSet = false;
100 bool m_messageHasBeenSet = false;
101};
102
103} // namespace Model
104} // namespace EC2
105} // namespace Aws
void SetCode(CodeT &&value)
Definition StateReason.h:43
void SetMessage(MessageT &&value)
Definition StateReason.h:85
const Aws::String & GetCode() const
Definition StateReason.h:40
const Aws::String & GetMessage() const
Definition StateReason.h:82
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API StateReason(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API StateReason & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
StateReason & WithMessage(MessageT &&value)
Definition StateReason.h:90
StateReason & WithCode(CodeT &&value)
Definition StateReason.h:48
AWS_EC2_API StateReason()=default
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream