AWS SDK for C++  0.14.3
AWS SDK for C++
TextOptions.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace CloudSearch
30 {
31 namespace Model
32 {
33 
40  {
41  public:
42  TextOptions();
43  TextOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
44  TextOptions& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const Aws::String& GetDefaultValue() const{ return m_defaultValue; }
53 
57  inline void SetDefaultValue(const Aws::String& value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; }
58 
62  inline void SetDefaultValue(Aws::String&& value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; }
63 
67  inline void SetDefaultValue(const char* value) { m_defaultValueHasBeenSet = true; m_defaultValue.assign(value); }
68 
72  inline TextOptions& WithDefaultValue(const Aws::String& value) { SetDefaultValue(value); return *this;}
73 
77  inline TextOptions& WithDefaultValue(Aws::String&& value) { SetDefaultValue(value); return *this;}
78 
82  inline TextOptions& WithDefaultValue(const char* value) { SetDefaultValue(value); return *this;}
83 
84 
85  inline const Aws::String& GetSourceField() const{ return m_sourceField; }
86 
87 
88  inline void SetSourceField(const Aws::String& value) { m_sourceFieldHasBeenSet = true; m_sourceField = value; }
89 
90 
91  inline void SetSourceField(Aws::String&& value) { m_sourceFieldHasBeenSet = true; m_sourceField = value; }
92 
93 
94  inline void SetSourceField(const char* value) { m_sourceFieldHasBeenSet = true; m_sourceField.assign(value); }
95 
96 
97  inline TextOptions& WithSourceField(const Aws::String& value) { SetSourceField(value); return *this;}
98 
99 
100  inline TextOptions& WithSourceField(Aws::String&& value) { SetSourceField(value); return *this;}
101 
102 
103  inline TextOptions& WithSourceField(const char* value) { SetSourceField(value); return *this;}
104 
108  inline bool GetReturnEnabled() const{ return m_returnEnabled; }
109 
113  inline void SetReturnEnabled(bool value) { m_returnEnabledHasBeenSet = true; m_returnEnabled = value; }
114 
118  inline TextOptions& WithReturnEnabled(bool value) { SetReturnEnabled(value); return *this;}
119 
123  inline bool GetSortEnabled() const{ return m_sortEnabled; }
124 
128  inline void SetSortEnabled(bool value) { m_sortEnabledHasBeenSet = true; m_sortEnabled = value; }
129 
133  inline TextOptions& WithSortEnabled(bool value) { SetSortEnabled(value); return *this;}
134 
138  inline bool GetHighlightEnabled() const{ return m_highlightEnabled; }
139 
143  inline void SetHighlightEnabled(bool value) { m_highlightEnabledHasBeenSet = true; m_highlightEnabled = value; }
144 
148  inline TextOptions& WithHighlightEnabled(bool value) { SetHighlightEnabled(value); return *this;}
149 
153  inline const Aws::String& GetAnalysisScheme() const{ return m_analysisScheme; }
154 
158  inline void SetAnalysisScheme(const Aws::String& value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme = value; }
159 
163  inline void SetAnalysisScheme(Aws::String&& value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme = value; }
164 
168  inline void SetAnalysisScheme(const char* value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme.assign(value); }
169 
173  inline TextOptions& WithAnalysisScheme(const Aws::String& value) { SetAnalysisScheme(value); return *this;}
174 
178  inline TextOptions& WithAnalysisScheme(Aws::String&& value) { SetAnalysisScheme(value); return *this;}
179 
183  inline TextOptions& WithAnalysisScheme(const char* value) { SetAnalysisScheme(value); return *this;}
184 
185  private:
186  Aws::String m_defaultValue;
187  bool m_defaultValueHasBeenSet;
188  Aws::String m_sourceField;
189  bool m_sourceFieldHasBeenSet;
190  bool m_returnEnabled;
191  bool m_returnEnabledHasBeenSet;
192  bool m_sortEnabled;
193  bool m_sortEnabledHasBeenSet;
194  bool m_highlightEnabled;
195  bool m_highlightEnabledHasBeenSet;
196  Aws::String m_analysisScheme;
197  bool m_analysisSchemeHasBeenSet;
198  };
199 
200 } // namespace Model
201 } // namespace CloudSearch
202 } // namespace Aws
TextOptions & WithDefaultValue(Aws::String &&value)
Definition: TextOptions.h:77
TextOptions & WithSortEnabled(bool value)
Definition: TextOptions.h:133
TextOptions & WithDefaultValue(const char *value)
Definition: TextOptions.h:82
void SetSourceField(const Aws::String &value)
Definition: TextOptions.h:88
void SetSourceField(const char *value)
Definition: TextOptions.h:94
TextOptions & WithSourceField(const char *value)
Definition: TextOptions.h:103
TextOptions & WithAnalysisScheme(Aws::String &&value)
Definition: TextOptions.h:178
TextOptions & WithHighlightEnabled(bool value)
Definition: TextOptions.h:148
void SetAnalysisScheme(const Aws::String &value)
Definition: TextOptions.h:158
TextOptions & WithAnalysisScheme(const char *value)
Definition: TextOptions.h:183
TextOptions & WithReturnEnabled(bool value)
Definition: TextOptions.h:118
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
TextOptions & WithDefaultValue(const Aws::String &value)
Definition: TextOptions.h:72
TextOptions & WithAnalysisScheme(const Aws::String &value)
Definition: TextOptions.h:173
void SetAnalysisScheme(Aws::String &&value)
Definition: TextOptions.h:163
void SetDefaultValue(const char *value)
Definition: TextOptions.h:67
const Aws::String & GetAnalysisScheme() const
Definition: TextOptions.h:153
TextOptions & WithSourceField(Aws::String &&value)
Definition: TextOptions.h:100
const Aws::String & GetSourceField() const
Definition: TextOptions.h:85
#define AWS_CLOUDSEARCH_API
void SetSourceField(Aws::String &&value)
Definition: TextOptions.h:91
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetDefaultValue(Aws::String &&value)
Definition: TextOptions.h:62
void SetAnalysisScheme(const char *value)
Definition: TextOptions.h:168
TextOptions & WithSourceField(const Aws::String &value)
Definition: TextOptions.h:97
const Aws::String & GetDefaultValue() const
Definition: TextOptions.h:52
void SetDefaultValue(const Aws::String &value)
Definition: TextOptions.h:57
JSON (JavaScript Object Notation).