AWS SDK for C++

AWS SDK for C++ Version 1.11.740

Loading...
Searching...
No Matches
TextSegment.h
1
6#pragma once
7#include <aws/qbusiness/QBusiness_EXPORTS.h>
8#include <aws/qbusiness/model/SnippetExcerpt.h>
9#include <aws/qbusiness/model/SourceDetails.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace QBusiness {
21namespace Model {
22
30 public:
31 AWS_QBUSINESS_API TextSegment() = default;
34 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
41 inline int GetBeginOffset() const { return m_beginOffset; }
42 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
43 inline void SetBeginOffset(int value) {
44 m_beginOffsetHasBeenSet = true;
45 m_beginOffset = value;
46 }
47 inline TextSegment& WithBeginOffset(int value) {
48 SetBeginOffset(value);
49 return *this;
50 }
52
54
58 inline int GetEndOffset() const { return m_endOffset; }
59 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
60 inline void SetEndOffset(int value) {
61 m_endOffsetHasBeenSet = true;
62 m_endOffset = value;
63 }
64 inline TextSegment& WithEndOffset(int value) {
65 SetEndOffset(value);
66 return *this;
67 }
69
71
75 inline const SnippetExcerpt& GetSnippetExcerpt() const { return m_snippetExcerpt; }
76 inline bool SnippetExcerptHasBeenSet() const { return m_snippetExcerptHasBeenSet; }
77 template <typename SnippetExcerptT = SnippetExcerpt>
79 m_snippetExcerptHasBeenSet = true;
80 m_snippetExcerpt = std::forward<SnippetExcerptT>(value);
81 }
82 template <typename SnippetExcerptT = SnippetExcerpt>
84 SetSnippetExcerpt(std::forward<SnippetExcerptT>(value));
85 return *this;
86 }
88
90
94 inline const SourceDetails& GetSourceDetails() const { return m_sourceDetails; }
95 inline bool SourceDetailsHasBeenSet() const { return m_sourceDetailsHasBeenSet; }
96 template <typename SourceDetailsT = SourceDetails>
98 m_sourceDetailsHasBeenSet = true;
99 m_sourceDetails = std::forward<SourceDetailsT>(value);
100 }
101 template <typename SourceDetailsT = SourceDetails>
103 SetSourceDetails(std::forward<SourceDetailsT>(value));
104 return *this;
105 }
107 private:
108 int m_beginOffset{0};
109
110 int m_endOffset{0};
111
112 SnippetExcerpt m_snippetExcerpt;
113
114 SourceDetails m_sourceDetails;
115 bool m_beginOffsetHasBeenSet = false;
116 bool m_endOffsetHasBeenSet = false;
117 bool m_snippetExcerptHasBeenSet = false;
118 bool m_sourceDetailsHasBeenSet = false;
119};
120
121} // namespace Model
122} // namespace QBusiness
123} // namespace Aws
AWS_QBUSINESS_API TextSegment()=default
TextSegment & WithSourceDetails(SourceDetailsT &&value)
const SourceDetails & GetSourceDetails() const
Definition TextSegment.h:94
void SetSnippetExcerpt(SnippetExcerptT &&value)
Definition TextSegment.h:78
TextSegment & WithBeginOffset(int value)
Definition TextSegment.h:47
AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_QBUSINESS_API TextSegment(Aws::Utils::Json::JsonView jsonValue)
TextSegment & WithSnippetExcerpt(SnippetExcerptT &&value)
Definition TextSegment.h:83
void SetSourceDetails(SourceDetailsT &&value)
Definition TextSegment.h:97
AWS_QBUSINESS_API TextSegment & operator=(Aws::Utils::Json::JsonView jsonValue)
TextSegment & WithEndOffset(int value)
Definition TextSegment.h:64
const SnippetExcerpt & GetSnippetExcerpt() const
Definition TextSegment.h:75
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue