AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
CollapseConfiguration.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/kendra/Kendra_EXPORTS.h>
10#include <aws/kendra/model/ExpandConfiguration.h>
11#include <aws/kendra/model/MissingAttributeKeyStrategy.h>
12#include <aws/kendra/model/SortingConfiguration.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace kendra {
24namespace Model {
25
34 public:
35 AWS_KENDRA_API CollapseConfiguration() = default;
38 AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
47 inline const Aws::String& GetDocumentAttributeKey() const { return m_documentAttributeKey; }
48 inline bool DocumentAttributeKeyHasBeenSet() const { return m_documentAttributeKeyHasBeenSet; }
49 template <typename DocumentAttributeKeyT = Aws::String>
50 void SetDocumentAttributeKey(DocumentAttributeKeyT&& value) {
51 m_documentAttributeKeyHasBeenSet = true;
52 m_documentAttributeKey = std::forward<DocumentAttributeKeyT>(value);
53 }
54 template <typename DocumentAttributeKeyT = Aws::String>
55 CollapseConfiguration& WithDocumentAttributeKey(DocumentAttributeKeyT&& value) {
56 SetDocumentAttributeKey(std::forward<DocumentAttributeKeyT>(value));
57 return *this;
58 }
60
62
66 inline const Aws::Vector<SortingConfiguration>& GetSortingConfigurations() const { return m_sortingConfigurations; }
67 inline bool SortingConfigurationsHasBeenSet() const { return m_sortingConfigurationsHasBeenSet; }
68 template <typename SortingConfigurationsT = Aws::Vector<SortingConfiguration>>
69 void SetSortingConfigurations(SortingConfigurationsT&& value) {
70 m_sortingConfigurationsHasBeenSet = true;
71 m_sortingConfigurations = std::forward<SortingConfigurationsT>(value);
72 }
73 template <typename SortingConfigurationsT = Aws::Vector<SortingConfiguration>>
74 CollapseConfiguration& WithSortingConfigurations(SortingConfigurationsT&& value) {
75 SetSortingConfigurations(std::forward<SortingConfigurationsT>(value));
76 return *this;
77 }
78 template <typename SortingConfigurationsT = SortingConfiguration>
79 CollapseConfiguration& AddSortingConfigurations(SortingConfigurationsT&& value) {
80 m_sortingConfigurationsHasBeenSet = true;
81 m_sortingConfigurations.emplace_back(std::forward<SortingConfigurationsT>(value));
82 return *this;
83 }
85
87
97 inline MissingAttributeKeyStrategy GetMissingAttributeKeyStrategy() const { return m_missingAttributeKeyStrategy; }
98 inline bool MissingAttributeKeyStrategyHasBeenSet() const { return m_missingAttributeKeyStrategyHasBeenSet; }
100 m_missingAttributeKeyStrategyHasBeenSet = true;
101 m_missingAttributeKeyStrategy = value;
102 }
105 return *this;
106 }
108
110
113 inline bool GetExpand() const { return m_expand; }
114 inline bool ExpandHasBeenSet() const { return m_expandHasBeenSet; }
115 inline void SetExpand(bool value) {
116 m_expandHasBeenSet = true;
117 m_expand = value;
118 }
119 inline CollapseConfiguration& WithExpand(bool value) {
120 SetExpand(value);
121 return *this;
122 }
124
126
130 inline const ExpandConfiguration& GetExpandConfiguration() const { return m_expandConfiguration; }
131 inline bool ExpandConfigurationHasBeenSet() const { return m_expandConfigurationHasBeenSet; }
132 template <typename ExpandConfigurationT = ExpandConfiguration>
133 void SetExpandConfiguration(ExpandConfigurationT&& value) {
134 m_expandConfigurationHasBeenSet = true;
135 m_expandConfiguration = std::forward<ExpandConfigurationT>(value);
136 }
137 template <typename ExpandConfigurationT = ExpandConfiguration>
138 CollapseConfiguration& WithExpandConfiguration(ExpandConfigurationT&& value) {
139 SetExpandConfiguration(std::forward<ExpandConfigurationT>(value));
140 return *this;
141 }
143 private:
144 Aws::String m_documentAttributeKey;
145
146 Aws::Vector<SortingConfiguration> m_sortingConfigurations;
147
149
150 bool m_expand{false};
151
152 ExpandConfiguration m_expandConfiguration;
153 bool m_documentAttributeKeyHasBeenSet = false;
154 bool m_sortingConfigurationsHasBeenSet = false;
155 bool m_missingAttributeKeyStrategyHasBeenSet = false;
156 bool m_expandHasBeenSet = false;
157 bool m_expandConfigurationHasBeenSet = false;
158};
159
160} // namespace Model
161} // namespace kendra
162} // namespace Aws
CollapseConfiguration & WithMissingAttributeKeyStrategy(MissingAttributeKeyStrategy value)
const Aws::Vector< SortingConfiguration > & GetSortingConfigurations() const
CollapseConfiguration & WithExpandConfiguration(ExpandConfigurationT &&value)
CollapseConfiguration & WithSortingConfigurations(SortingConfigurationsT &&value)
CollapseConfiguration & AddSortingConfigurations(SortingConfigurationsT &&value)
void SetDocumentAttributeKey(DocumentAttributeKeyT &&value)
AWS_KENDRA_API CollapseConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
CollapseConfiguration & WithExpand(bool value)
AWS_KENDRA_API CollapseConfiguration()=default
AWS_KENDRA_API CollapseConfiguration(Aws::Utils::Json::JsonView jsonValue)
AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const
void SetSortingConfigurations(SortingConfigurationsT &&value)
void SetMissingAttributeKeyStrategy(MissingAttributeKeyStrategy value)
const Aws::String & GetDocumentAttributeKey() const
MissingAttributeKeyStrategy GetMissingAttributeKeyStrategy() const
CollapseConfiguration & WithDocumentAttributeKey(DocumentAttributeKeyT &&value)
void SetExpandConfiguration(ExpandConfigurationT &&value)
const ExpandConfiguration & GetExpandConfiguration() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue