AWS SDK for C++  0.14.3
AWS SDK for C++
Attachment.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
18 #include <aws/core/utils/Array.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace Support
30 {
31 namespace Model
32 {
33 
39  {
40  public:
41  Attachment();
42  Attachment(const Aws::Utils::Json::JsonValue& jsonValue);
43  Attachment& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetFileName() const{ return m_fileName; }
50 
54  inline void SetFileName(const Aws::String& value) { m_fileNameHasBeenSet = true; m_fileName = value; }
55 
59  inline void SetFileName(Aws::String&& value) { m_fileNameHasBeenSet = true; m_fileName = value; }
60 
64  inline void SetFileName(const char* value) { m_fileNameHasBeenSet = true; m_fileName.assign(value); }
65 
69  inline Attachment& WithFileName(const Aws::String& value) { SetFileName(value); return *this;}
70 
74  inline Attachment& WithFileName(Aws::String&& value) { SetFileName(value); return *this;}
75 
79  inline Attachment& WithFileName(const char* value) { SetFileName(value); return *this;}
80 
84  inline const Aws::Utils::ByteBuffer& GetData() const{ return m_data; }
85 
89  inline void SetData(const Aws::Utils::ByteBuffer& value) { m_dataHasBeenSet = true; m_data = value; }
90 
94  inline void SetData(Aws::Utils::ByteBuffer&& value) { m_dataHasBeenSet = true; m_data = value; }
95 
99  inline Attachment& WithData(const Aws::Utils::ByteBuffer& value) { SetData(value); return *this;}
100 
104  inline Attachment& WithData(Aws::Utils::ByteBuffer&& value) { SetData(value); return *this;}
105 
106  private:
107  Aws::String m_fileName;
108  bool m_fileNameHasBeenSet;
109  Aws::Utils::ByteBuffer m_data;
110  bool m_dataHasBeenSet;
111  };
112 
113 } // namespace Model
114 } // namespace Support
115 } // namespace Aws
const Aws::String & GetFileName() const
Definition: Attachment.h:49
Attachment & WithFileName(const char *value)
Definition: Attachment.h:79
Attachment & WithData(Aws::Utils::ByteBuffer &&value)
Definition: Attachment.h:104
void SetData(const Aws::Utils::ByteBuffer &value)
Definition: Attachment.h:89
void SetFileName(const Aws::String &value)
Definition: Attachment.h:54
#define AWS_SUPPORT_API
void SetFileName(Aws::String &&value)
Definition: Attachment.h:59
Attachment & WithFileName(Aws::String &&value)
Definition: Attachment.h:74
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Attachment & WithData(const Aws::Utils::ByteBuffer &value)
Definition: Attachment.h:99
const Aws::Utils::ByteBuffer & GetData() const
Definition: Attachment.h:84
void SetFileName(const char *value)
Definition: Attachment.h:64
Attachment & WithFileName(const Aws::String &value)
Definition: Attachment.h:69
void SetData(Aws::Utils::ByteBuffer &&value)
Definition: Attachment.h:94
JSON (JavaScript Object Notation).