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/kendra/model/ConfluencePageToIndexFieldMapping.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace kendra
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Specifies the page settings for the Confluence data source.</p><p><h3>See
29    * Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/kendra-2019-02-03/ConfluencePageConfiguration">AWS
31    * API Reference</a></p>
32    */
33   class AWS_KENDRA_API ConfluencePageConfiguration
34   {
35   public:
36     ConfluencePageConfiguration();
37     ConfluencePageConfiguration(Aws::Utils::Json::JsonView jsonValue);
38     ConfluencePageConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>Defines how page metadata fields should be mapped to index fields. Before you
44      * can map a field, you must first create an index field with a matching type using
45      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
46      * <code>PageFieldMappings</code> parameter, you must specify at least one field
47      * mapping.</p>
48      */
GetPageFieldMappings()49     inline const Aws::Vector<ConfluencePageToIndexFieldMapping>& GetPageFieldMappings() const{ return m_pageFieldMappings; }
50 
51     /**
52      * <p>Defines how page metadata fields should be mapped to index fields. Before you
53      * can map a field, you must first create an index field with a matching type using
54      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
55      * <code>PageFieldMappings</code> parameter, you must specify at least one field
56      * mapping.</p>
57      */
PageFieldMappingsHasBeenSet()58     inline bool PageFieldMappingsHasBeenSet() const { return m_pageFieldMappingsHasBeenSet; }
59 
60     /**
61      * <p>Defines how page metadata fields should be mapped to index fields. Before you
62      * can map a field, you must first create an index field with a matching type using
63      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
64      * <code>PageFieldMappings</code> parameter, you must specify at least one field
65      * mapping.</p>
66      */
SetPageFieldMappings(const Aws::Vector<ConfluencePageToIndexFieldMapping> & value)67     inline void SetPageFieldMappings(const Aws::Vector<ConfluencePageToIndexFieldMapping>& value) { m_pageFieldMappingsHasBeenSet = true; m_pageFieldMappings = value; }
68 
69     /**
70      * <p>Defines how page metadata fields should be mapped to index fields. Before you
71      * can map a field, you must first create an index field with a matching type using
72      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
73      * <code>PageFieldMappings</code> parameter, you must specify at least one field
74      * mapping.</p>
75      */
SetPageFieldMappings(Aws::Vector<ConfluencePageToIndexFieldMapping> && value)76     inline void SetPageFieldMappings(Aws::Vector<ConfluencePageToIndexFieldMapping>&& value) { m_pageFieldMappingsHasBeenSet = true; m_pageFieldMappings = std::move(value); }
77 
78     /**
79      * <p>Defines how page metadata fields should be mapped to index fields. Before you
80      * can map a field, you must first create an index field with a matching type using
81      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
82      * <code>PageFieldMappings</code> parameter, you must specify at least one field
83      * mapping.</p>
84      */
WithPageFieldMappings(const Aws::Vector<ConfluencePageToIndexFieldMapping> & value)85     inline ConfluencePageConfiguration& WithPageFieldMappings(const Aws::Vector<ConfluencePageToIndexFieldMapping>& value) { SetPageFieldMappings(value); return *this;}
86 
87     /**
88      * <p>Defines how page metadata fields should be mapped to index fields. Before you
89      * can map a field, you must first create an index field with a matching type using
90      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
91      * <code>PageFieldMappings</code> parameter, you must specify at least one field
92      * mapping.</p>
93      */
WithPageFieldMappings(Aws::Vector<ConfluencePageToIndexFieldMapping> && value)94     inline ConfluencePageConfiguration& WithPageFieldMappings(Aws::Vector<ConfluencePageToIndexFieldMapping>&& value) { SetPageFieldMappings(std::move(value)); return *this;}
95 
96     /**
97      * <p>Defines how page metadata fields should be mapped to index fields. Before you
98      * can map a field, you must first create an index field with a matching type using
99      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
100      * <code>PageFieldMappings</code> parameter, you must specify at least one field
101      * mapping.</p>
102      */
AddPageFieldMappings(const ConfluencePageToIndexFieldMapping & value)103     inline ConfluencePageConfiguration& AddPageFieldMappings(const ConfluencePageToIndexFieldMapping& value) { m_pageFieldMappingsHasBeenSet = true; m_pageFieldMappings.push_back(value); return *this; }
104 
105     /**
106      * <p>Defines how page metadata fields should be mapped to index fields. Before you
107      * can map a field, you must first create an index field with a matching type using
108      * the console or the <code>UpdateIndex</code> operation.</p> <p>If you specify the
109      * <code>PageFieldMappings</code> parameter, you must specify at least one field
110      * mapping.</p>
111      */
AddPageFieldMappings(ConfluencePageToIndexFieldMapping && value)112     inline ConfluencePageConfiguration& AddPageFieldMappings(ConfluencePageToIndexFieldMapping&& value) { m_pageFieldMappingsHasBeenSet = true; m_pageFieldMappings.push_back(std::move(value)); return *this; }
113 
114   private:
115 
116     Aws::Vector<ConfluencePageToIndexFieldMapping> m_pageFieldMappings;
117     bool m_pageFieldMappingsHasBeenSet;
118   };
119 
120 } // namespace Model
121 } // namespace kendra
122 } // namespace Aws
123