1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/kendra/Kendra_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/kendra/model/ConfluenceSpaceToIndexFieldMapping.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace kendra 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Specifies the configuration for indexing Confluence spaces.</p><p><h3>See 30 * Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/ConfluenceSpaceConfiguration">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_KENDRA_API ConfluenceSpaceConfiguration 35 { 36 public: 37 ConfluenceSpaceConfiguration(); 38 ConfluenceSpaceConfiguration(Aws::Utils::Json::JsonView jsonValue); 39 ConfluenceSpaceConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>Specifies whether Amazon Kendra should index personal spaces. Users can add 45 * restrictions to items in personal spaces. If personal spaces are indexed, 46 * queries without user context information may return restricted items from a 47 * personal space in their results. For more information, see <a 48 * href="https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html">Filtering 49 * on user context</a>.</p> 50 */ GetCrawlPersonalSpaces()51 inline bool GetCrawlPersonalSpaces() const{ return m_crawlPersonalSpaces; } 52 53 /** 54 * <p>Specifies whether Amazon Kendra should index personal spaces. Users can add 55 * restrictions to items in personal spaces. If personal spaces are indexed, 56 * queries without user context information may return restricted items from a 57 * personal space in their results. For more information, see <a 58 * href="https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html">Filtering 59 * on user context</a>.</p> 60 */ CrawlPersonalSpacesHasBeenSet()61 inline bool CrawlPersonalSpacesHasBeenSet() const { return m_crawlPersonalSpacesHasBeenSet; } 62 63 /** 64 * <p>Specifies whether Amazon Kendra should index personal spaces. Users can add 65 * restrictions to items in personal spaces. If personal spaces are indexed, 66 * queries without user context information may return restricted items from a 67 * personal space in their results. For more information, see <a 68 * href="https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html">Filtering 69 * on user context</a>.</p> 70 */ SetCrawlPersonalSpaces(bool value)71 inline void SetCrawlPersonalSpaces(bool value) { m_crawlPersonalSpacesHasBeenSet = true; m_crawlPersonalSpaces = value; } 72 73 /** 74 * <p>Specifies whether Amazon Kendra should index personal spaces. Users can add 75 * restrictions to items in personal spaces. If personal spaces are indexed, 76 * queries without user context information may return restricted items from a 77 * personal space in their results. For more information, see <a 78 * href="https://docs.aws.amazon.com/kendra/latest/dg/user-context-filter.html">Filtering 79 * on user context</a>.</p> 80 */ WithCrawlPersonalSpaces(bool value)81 inline ConfluenceSpaceConfiguration& WithCrawlPersonalSpaces(bool value) { SetCrawlPersonalSpaces(value); return *this;} 82 83 84 /** 85 * <p>Specifies whether Amazon Kendra should index archived spaces.</p> 86 */ GetCrawlArchivedSpaces()87 inline bool GetCrawlArchivedSpaces() const{ return m_crawlArchivedSpaces; } 88 89 /** 90 * <p>Specifies whether Amazon Kendra should index archived spaces.</p> 91 */ CrawlArchivedSpacesHasBeenSet()92 inline bool CrawlArchivedSpacesHasBeenSet() const { return m_crawlArchivedSpacesHasBeenSet; } 93 94 /** 95 * <p>Specifies whether Amazon Kendra should index archived spaces.</p> 96 */ SetCrawlArchivedSpaces(bool value)97 inline void SetCrawlArchivedSpaces(bool value) { m_crawlArchivedSpacesHasBeenSet = true; m_crawlArchivedSpaces = value; } 98 99 /** 100 * <p>Specifies whether Amazon Kendra should index archived spaces.</p> 101 */ WithCrawlArchivedSpaces(bool value)102 inline ConfluenceSpaceConfiguration& WithCrawlArchivedSpaces(bool value) { SetCrawlArchivedSpaces(value); return *this;} 103 104 105 /** 106 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 107 * documents, and attachments in the space are indexed. Spaces that aren't in the 108 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 109 * logs an error when the data source is synchronized. If a space is in both the 110 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 111 * excluded.</p> 112 */ GetIncludeSpaces()113 inline const Aws::Vector<Aws::String>& GetIncludeSpaces() const{ return m_includeSpaces; } 114 115 /** 116 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 117 * documents, and attachments in the space are indexed. Spaces that aren't in the 118 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 119 * logs an error when the data source is synchronized. If a space is in both the 120 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 121 * excluded.</p> 122 */ IncludeSpacesHasBeenSet()123 inline bool IncludeSpacesHasBeenSet() const { return m_includeSpacesHasBeenSet; } 124 125 /** 126 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 127 * documents, and attachments in the space are indexed. Spaces that aren't in the 128 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 129 * logs an error when the data source is synchronized. If a space is in both the 130 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 131 * excluded.</p> 132 */ SetIncludeSpaces(const Aws::Vector<Aws::String> & value)133 inline void SetIncludeSpaces(const Aws::Vector<Aws::String>& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces = value; } 134 135 /** 136 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 137 * documents, and attachments in the space are indexed. Spaces that aren't in the 138 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 139 * logs an error when the data source is synchronized. If a space is in both the 140 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 141 * excluded.</p> 142 */ SetIncludeSpaces(Aws::Vector<Aws::String> && value)143 inline void SetIncludeSpaces(Aws::Vector<Aws::String>&& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces = std::move(value); } 144 145 /** 146 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 147 * documents, and attachments in the space are indexed. Spaces that aren't in the 148 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 149 * logs an error when the data source is synchronized. If a space is in both the 150 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 151 * excluded.</p> 152 */ WithIncludeSpaces(const Aws::Vector<Aws::String> & value)153 inline ConfluenceSpaceConfiguration& WithIncludeSpaces(const Aws::Vector<Aws::String>& value) { SetIncludeSpaces(value); return *this;} 154 155 /** 156 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 157 * documents, and attachments in the space are indexed. Spaces that aren't in the 158 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 159 * logs an error when the data source is synchronized. If a space is in both the 160 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 161 * excluded.</p> 162 */ WithIncludeSpaces(Aws::Vector<Aws::String> && value)163 inline ConfluenceSpaceConfiguration& WithIncludeSpaces(Aws::Vector<Aws::String>&& value) { SetIncludeSpaces(std::move(value)); return *this;} 164 165 /** 166 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 167 * documents, and attachments in the space are indexed. Spaces that aren't in the 168 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 169 * logs an error when the data source is synchronized. If a space is in both the 170 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 171 * excluded.</p> 172 */ AddIncludeSpaces(const Aws::String & value)173 inline ConfluenceSpaceConfiguration& AddIncludeSpaces(const Aws::String& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(value); return *this; } 174 175 /** 176 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 177 * documents, and attachments in the space are indexed. Spaces that aren't in the 178 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 179 * logs an error when the data source is synchronized. If a space is in both the 180 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 181 * excluded.</p> 182 */ AddIncludeSpaces(Aws::String && value)183 inline ConfluenceSpaceConfiguration& AddIncludeSpaces(Aws::String&& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(std::move(value)); return *this; } 184 185 /** 186 * <p>A list of space keys for Confluence spaces. If you include a key, the blogs, 187 * documents, and attachments in the space are indexed. Spaces that aren't in the 188 * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra 189 * logs an error when the data source is synchronized. If a space is in both the 190 * <code>IncludeSpaces</code> and the <code>ExcludeSpaces</code> list, the space is 191 * excluded.</p> 192 */ AddIncludeSpaces(const char * value)193 inline ConfluenceSpaceConfiguration& AddIncludeSpaces(const char* value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(value); return *this; } 194 195 196 /** 197 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 198 * documents, and attachments in the space are not indexed. If a space is in both 199 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 200 * space is excluded.</p> 201 */ GetExcludeSpaces()202 inline const Aws::Vector<Aws::String>& GetExcludeSpaces() const{ return m_excludeSpaces; } 203 204 /** 205 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 206 * documents, and attachments in the space are not indexed. If a space is in both 207 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 208 * space is excluded.</p> 209 */ ExcludeSpacesHasBeenSet()210 inline bool ExcludeSpacesHasBeenSet() const { return m_excludeSpacesHasBeenSet; } 211 212 /** 213 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 214 * documents, and attachments in the space are not indexed. If a space is in both 215 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 216 * space is excluded.</p> 217 */ SetExcludeSpaces(const Aws::Vector<Aws::String> & value)218 inline void SetExcludeSpaces(const Aws::Vector<Aws::String>& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces = value; } 219 220 /** 221 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 222 * documents, and attachments in the space are not indexed. If a space is in both 223 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 224 * space is excluded.</p> 225 */ SetExcludeSpaces(Aws::Vector<Aws::String> && value)226 inline void SetExcludeSpaces(Aws::Vector<Aws::String>&& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces = std::move(value); } 227 228 /** 229 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 230 * documents, and attachments in the space are not indexed. If a space is in both 231 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 232 * space is excluded.</p> 233 */ WithExcludeSpaces(const Aws::Vector<Aws::String> & value)234 inline ConfluenceSpaceConfiguration& WithExcludeSpaces(const Aws::Vector<Aws::String>& value) { SetExcludeSpaces(value); return *this;} 235 236 /** 237 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 238 * documents, and attachments in the space are not indexed. If a space is in both 239 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 240 * space is excluded.</p> 241 */ WithExcludeSpaces(Aws::Vector<Aws::String> && value)242 inline ConfluenceSpaceConfiguration& WithExcludeSpaces(Aws::Vector<Aws::String>&& value) { SetExcludeSpaces(std::move(value)); return *this;} 243 244 /** 245 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 246 * documents, and attachments in the space are not indexed. If a space is in both 247 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 248 * space is excluded.</p> 249 */ AddExcludeSpaces(const Aws::String & value)250 inline ConfluenceSpaceConfiguration& AddExcludeSpaces(const Aws::String& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(value); return *this; } 251 252 /** 253 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 254 * documents, and attachments in the space are not indexed. If a space is in both 255 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 256 * space is excluded.</p> 257 */ AddExcludeSpaces(Aws::String && value)258 inline ConfluenceSpaceConfiguration& AddExcludeSpaces(Aws::String&& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(std::move(value)); return *this; } 259 260 /** 261 * <p>A list of space keys of Confluence spaces. If you include a key, the blogs, 262 * documents, and attachments in the space are not indexed. If a space is in both 263 * the <code>ExcludeSpaces</code> and the <code>IncludeSpaces</code> list, the 264 * space is excluded.</p> 265 */ AddExcludeSpaces(const char * value)266 inline ConfluenceSpaceConfiguration& AddExcludeSpaces(const char* value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(value); return *this; } 267 268 269 /** 270 * <p>Defines how space metadata fields should be mapped to index fields. Before 271 * you can map a field, you must first create an index field with a matching type 272 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 273 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 274 * one field mapping.</p> 275 */ GetSpaceFieldMappings()276 inline const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& GetSpaceFieldMappings() const{ return m_spaceFieldMappings; } 277 278 /** 279 * <p>Defines how space metadata fields should be mapped to index fields. Before 280 * you can map a field, you must first create an index field with a matching type 281 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 282 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 283 * one field mapping.</p> 284 */ SpaceFieldMappingsHasBeenSet()285 inline bool SpaceFieldMappingsHasBeenSet() const { return m_spaceFieldMappingsHasBeenSet; } 286 287 /** 288 * <p>Defines how space metadata fields should be mapped to index fields. Before 289 * you can map a field, you must first create an index field with a matching type 290 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 291 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 292 * one field mapping.</p> 293 */ SetSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping> & value)294 inline void SetSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings = value; } 295 296 /** 297 * <p>Defines how space metadata fields should be mapped to index fields. Before 298 * you can map a field, you must first create an index field with a matching type 299 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 300 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 301 * one field mapping.</p> 302 */ SetSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping> && value)303 inline void SetSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping>&& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings = std::move(value); } 304 305 /** 306 * <p>Defines how space metadata fields should be mapped to index fields. Before 307 * you can map a field, you must first create an index field with a matching type 308 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 309 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 310 * one field mapping.</p> 311 */ WithSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping> & value)312 inline ConfluenceSpaceConfiguration& WithSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& value) { SetSpaceFieldMappings(value); return *this;} 313 314 /** 315 * <p>Defines how space metadata fields should be mapped to index fields. Before 316 * you can map a field, you must first create an index field with a matching type 317 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 318 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 319 * one field mapping.</p> 320 */ WithSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping> && value)321 inline ConfluenceSpaceConfiguration& WithSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping>&& value) { SetSpaceFieldMappings(std::move(value)); return *this;} 322 323 /** 324 * <p>Defines how space metadata fields should be mapped to index fields. Before 325 * you can map a field, you must first create an index field with a matching type 326 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 327 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 328 * one field mapping.</p> 329 */ AddSpaceFieldMappings(const ConfluenceSpaceToIndexFieldMapping & value)330 inline ConfluenceSpaceConfiguration& AddSpaceFieldMappings(const ConfluenceSpaceToIndexFieldMapping& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings.push_back(value); return *this; } 331 332 /** 333 * <p>Defines how space metadata fields should be mapped to index fields. Before 334 * you can map a field, you must first create an index field with a matching type 335 * using the console or the <code>UpdateIndex</code> operation.</p> <p>If you 336 * specify the <code>SpaceFieldMappings</code> parameter, you must specify at least 337 * one field mapping.</p> 338 */ AddSpaceFieldMappings(ConfluenceSpaceToIndexFieldMapping && value)339 inline ConfluenceSpaceConfiguration& AddSpaceFieldMappings(ConfluenceSpaceToIndexFieldMapping&& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings.push_back(std::move(value)); return *this; } 340 341 private: 342 343 bool m_crawlPersonalSpaces; 344 bool m_crawlPersonalSpacesHasBeenSet; 345 346 bool m_crawlArchivedSpaces; 347 bool m_crawlArchivedSpacesHasBeenSet; 348 349 Aws::Vector<Aws::String> m_includeSpaces; 350 bool m_includeSpacesHasBeenSet; 351 352 Aws::Vector<Aws::String> m_excludeSpaces; 353 bool m_excludeSpacesHasBeenSet; 354 355 Aws::Vector<ConfluenceSpaceToIndexFieldMapping> m_spaceFieldMappings; 356 bool m_spaceFieldMappingsHasBeenSet; 357 }; 358 359 } // namespace Model 360 } // namespace kendra 361 } // namespace Aws 362