AWS SDK for C++

AWS SDK for C++ Version 1.11.912

Loading...
Searching...
No Matches
Document.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/crt/cbor/Cbor.h>
10#include <aws/translate/Translate_EXPORTS.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace Translate {
21namespace Model {
22
28class Document {
29 public:
30 AWS_TRANSLATE_API Document() = default;
31 AWS_TRANSLATE_API Document(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
32 AWS_TRANSLATE_API Document& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_TRANSLATE_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
34
36
42 inline const Aws::Utils::CryptoBuffer& GetContent() const { return m_content; }
43 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
44 template <typename ContentT = Aws::Utils::CryptoBuffer>
45 void SetContent(ContentT&& value) {
46 m_contentHasBeenSet = true;
47 m_content = std::forward<ContentT>(value);
48 }
49 template <typename ContentT = Aws::Utils::CryptoBuffer>
50 Document& WithContent(ContentT&& value) {
51 SetContent(std::forward<ContentT>(value));
52 return *this;
53 }
55
57
67 inline const Aws::String& GetContentType() const { return m_contentType; }
68 inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; }
69 template <typename ContentTypeT = Aws::String>
70 void SetContentType(ContentTypeT&& value) {
71 m_contentTypeHasBeenSet = true;
72 m_contentType = std::forward<ContentTypeT>(value);
73 }
74 template <typename ContentTypeT = Aws::String>
75 Document& WithContentType(ContentTypeT&& value) {
76 SetContentType(std::forward<ContentTypeT>(value));
77 return *this;
78 }
80 private:
81 Aws::Utils::CryptoBuffer m_content{};
82
83 Aws::String m_contentType;
84 bool m_contentHasBeenSet = false;
85 bool m_contentTypeHasBeenSet = false;
86};
87
88} // namespace Model
89} // namespace Translate
90} // namespace Aws
Document & WithContentType(ContentTypeT &&value)
Definition Document.h:75
AWS_TRANSLATE_API Document(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
Document & WithContent(ContentT &&value)
Definition Document.h:50
AWS_TRANSLATE_API Document & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetContentType(ContentTypeT &&value)
Definition Document.h:70
AWS_TRANSLATE_API Document()=default
bool ContentTypeHasBeenSet() const
Definition Document.h:68
const Aws::Utils::CryptoBuffer & GetContent() const
Definition Document.h:42
const Aws::String & GetContentType() const
Definition Document.h:67
AWS_TRANSLATE_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
void SetContent(ContentT &&value)
Definition Document.h:45
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String