AWS SDK for C++  0.14.3
AWS SDK for C++
LiteralOptions.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:
44  LiteralOptions& 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 LiteralOptions& WithDefaultValue(const Aws::String& value) { SetDefaultValue(value); return *this;}
73 
77  inline LiteralOptions& WithDefaultValue(Aws::String&& value) { SetDefaultValue(value); return *this;}
78 
82  inline LiteralOptions& 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 LiteralOptions& WithSourceField(const Aws::String& value) { SetSourceField(value); return *this;}
98 
99 
100  inline LiteralOptions& WithSourceField(Aws::String&& value) { SetSourceField(value); return *this;}
101 
102 
103  inline LiteralOptions& WithSourceField(const char* value) { SetSourceField(value); return *this;}
104 
108  inline bool GetFacetEnabled() const{ return m_facetEnabled; }
109 
113  inline void SetFacetEnabled(bool value) { m_facetEnabledHasBeenSet = true; m_facetEnabled = value; }
114 
118  inline LiteralOptions& WithFacetEnabled(bool value) { SetFacetEnabled(value); return *this;}
119 
123  inline bool GetSearchEnabled() const{ return m_searchEnabled; }
124 
128  inline void SetSearchEnabled(bool value) { m_searchEnabledHasBeenSet = true; m_searchEnabled = value; }
129 
133  inline LiteralOptions& WithSearchEnabled(bool value) { SetSearchEnabled(value); return *this;}
134 
138  inline bool GetReturnEnabled() const{ return m_returnEnabled; }
139 
143  inline void SetReturnEnabled(bool value) { m_returnEnabledHasBeenSet = true; m_returnEnabled = value; }
144 
148  inline LiteralOptions& WithReturnEnabled(bool value) { SetReturnEnabled(value); return *this;}
149 
153  inline bool GetSortEnabled() const{ return m_sortEnabled; }
154 
158  inline void SetSortEnabled(bool value) { m_sortEnabledHasBeenSet = true; m_sortEnabled = value; }
159 
163  inline LiteralOptions& WithSortEnabled(bool value) { SetSortEnabled(value); return *this;}
164 
165  private:
166  Aws::String m_defaultValue;
167  bool m_defaultValueHasBeenSet;
168  Aws::String m_sourceField;
169  bool m_sourceFieldHasBeenSet;
170  bool m_facetEnabled;
171  bool m_facetEnabledHasBeenSet;
172  bool m_searchEnabled;
173  bool m_searchEnabledHasBeenSet;
174  bool m_returnEnabled;
175  bool m_returnEnabledHasBeenSet;
176  bool m_sortEnabled;
177  bool m_sortEnabledHasBeenSet;
178  };
179 
180 } // namespace Model
181 } // namespace CloudSearch
182 } // namespace Aws
LiteralOptions & WithDefaultValue(const Aws::String &value)
void SetSourceField(const Aws::String &value)
LiteralOptions & WithSourceField(Aws::String &&value)
LiteralOptions & WithSourceField(const char *value)
const Aws::String & GetSourceField() const
void SetSourceField(Aws::String &&value)
void SetSourceField(const char *value)
void SetDefaultValue(const char *value)
LiteralOptions & WithDefaultValue(Aws::String &&value)
LiteralOptions & WithReturnEnabled(bool value)
LiteralOptions & WithSearchEnabled(bool value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
LiteralOptions & WithFacetEnabled(bool value)
#define AWS_CLOUDSEARCH_API
void SetDefaultValue(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetDefaultValue(Aws::String &&value)
LiteralOptions & WithSourceField(const Aws::String &value)
const Aws::String & GetDefaultValue() const
LiteralOptions & WithSortEnabled(bool value)
LiteralOptions & WithDefaultValue(const char *value)
JSON (JavaScript Object Notation).