AWS SDK for C++  0.14.3
AWS SDK for C++
Message.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/email/SES_EXPORTS.h>
19 #include <aws/email/model/Body.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace SES
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  Message();
42  Message(const Aws::Utils::Xml::XmlNode& xmlNode);
43  Message& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
52  inline const Content& GetSubject() const{ return m_subject; }
53 
58  inline void SetSubject(const Content& value) { m_subjectHasBeenSet = true; m_subject = value; }
59 
64  inline void SetSubject(Content&& value) { m_subjectHasBeenSet = true; m_subject = value; }
65 
70  inline Message& WithSubject(const Content& value) { SetSubject(value); return *this;}
71 
76  inline Message& WithSubject(Content&& value) { SetSubject(value); return *this;}
77 
81  inline const Body& GetBody() const{ return m_body; }
82 
86  inline void SetBody(const Body& value) { m_bodyHasBeenSet = true; m_body = value; }
87 
91  inline void SetBody(Body&& value) { m_bodyHasBeenSet = true; m_body = value; }
92 
96  inline Message& WithBody(const Body& value) { SetBody(value); return *this;}
97 
101  inline Message& WithBody(Body&& value) { SetBody(value); return *this;}
102 
103  private:
104  Content m_subject;
105  bool m_subjectHasBeenSet;
106  Body m_body;
107  bool m_bodyHasBeenSet;
108  };
109 
110 } // namespace Model
111 } // namespace SES
112 } // namespace Aws
Message & WithBody(const Body &value)
Definition: Message.h:96
void SetSubject(Content &&value)
Definition: Message.h:64
Message & WithBody(Body &&value)
Definition: Message.h:101
Message & WithSubject(const Content &value)
Definition: Message.h:70
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Content & GetSubject() const
Definition: Message.h:52
void SetBody(const Body &value)
Definition: Message.h:86
void SetSubject(const Content &value)
Definition: Message.h:58
Message & WithSubject(Content &&value)
Definition: Message.h:76
const Body & GetBody() const
Definition: Message.h:81
void SetBody(Body &&value)
Definition: Message.h:91
#define AWS_SES_API
Definition: SES_EXPORTS.h:37
JSON (JavaScript Object Notation).