AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace QBusiness
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_QBUSINESS_API TextSegment() = default;
39 AWS_QBUSINESS_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
47 inline int GetBeginOffset() const { return m_beginOffset; }
48 inline bool BeginOffsetHasBeenSet() const { return m_beginOffsetHasBeenSet; }
49 inline void SetBeginOffset(int value) { m_beginOffsetHasBeenSet = true; m_beginOffset = value; }
50 inline TextSegment& WithBeginOffset(int value) { SetBeginOffset(value); return *this;}
52
54
58 inline int GetEndOffset() const { return m_endOffset; }
59 inline bool EndOffsetHasBeenSet() const { return m_endOffsetHasBeenSet; }
60 inline void SetEndOffset(int value) { m_endOffsetHasBeenSet = true; m_endOffset = value; }
61 inline TextSegment& WithEndOffset(int value) { SetEndOffset(value); return *this;}
63
65
69 inline const SnippetExcerpt& GetSnippetExcerpt() const { return m_snippetExcerpt; }
70 inline bool SnippetExcerptHasBeenSet() const { return m_snippetExcerptHasBeenSet; }
71 template<typename SnippetExcerptT = SnippetExcerpt>
72 void SetSnippetExcerpt(SnippetExcerptT&& value) { m_snippetExcerptHasBeenSet = true; m_snippetExcerpt = std::forward<SnippetExcerptT>(value); }
73 template<typename SnippetExcerptT = SnippetExcerpt>
74 TextSegment& WithSnippetExcerpt(SnippetExcerptT&& value) { SetSnippetExcerpt(std::forward<SnippetExcerptT>(value)); return *this;}
76
78
82 inline const SourceDetails& GetSourceDetails() const { return m_sourceDetails; }
83 inline bool SourceDetailsHasBeenSet() const { return m_sourceDetailsHasBeenSet; }
84 template<typename SourceDetailsT = SourceDetails>
85 void SetSourceDetails(SourceDetailsT&& value) { m_sourceDetailsHasBeenSet = true; m_sourceDetails = std::forward<SourceDetailsT>(value); }
86 template<typename SourceDetailsT = SourceDetails>
87 TextSegment& WithSourceDetails(SourceDetailsT&& value) { SetSourceDetails(std::forward<SourceDetailsT>(value)); return *this;}
89 private:
90
91 int m_beginOffset{0};
92 bool m_beginOffsetHasBeenSet = false;
93
94 int m_endOffset{0};
95 bool m_endOffsetHasBeenSet = false;
96
97 SnippetExcerpt m_snippetExcerpt;
98 bool m_snippetExcerptHasBeenSet = false;
99
100 SourceDetails m_sourceDetails;
101 bool m_sourceDetailsHasBeenSet = false;
102 };
103
104} // namespace Model
105} // namespace QBusiness
106} // namespace Aws
AWS_QBUSINESS_API TextSegment()=default
TextSegment & WithSourceDetails(SourceDetailsT &&value)
Definition TextSegment.h:87
const SourceDetails & GetSourceDetails() const
Definition TextSegment.h:82
void SetSnippetExcerpt(SnippetExcerptT &&value)
Definition TextSegment.h:72
TextSegment & WithBeginOffset(int value)
Definition TextSegment.h:50
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:74
void SetSourceDetails(SourceDetailsT &&value)
Definition TextSegment.h:85
AWS_QBUSINESS_API TextSegment & operator=(Aws::Utils::Json::JsonView jsonValue)
TextSegment & WithEndOffset(int value)
Definition TextSegment.h:61
const SnippetExcerpt & GetSnippetExcerpt() const
Definition TextSegment.h:69
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
Aws::Utils::Json::JsonValue JsonValue