AWS SDK for C++  0.12.9
AWS SDK for C++
DoubleOptions.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  DoubleOptions();
44  DoubleOptions& 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 
54  inline double GetDefaultValue() const{ return m_defaultValue; }
55 
61  inline void SetDefaultValue(double value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; }
62 
68  inline DoubleOptions& WithDefaultValue(double value) { SetDefaultValue(value); return *this;}
69 
73  inline const Aws::String& GetSourceField() const{ return m_sourceField; }
74 
78  inline void SetSourceField(const Aws::String& value) { m_sourceFieldHasBeenSet = true; m_sourceField = value; }
79 
83  inline void SetSourceField(Aws::String&& value) { m_sourceFieldHasBeenSet = true; m_sourceField = value; }
84 
88  inline void SetSourceField(const char* value) { m_sourceFieldHasBeenSet = true; m_sourceField.assign(value); }
89 
93  inline DoubleOptions& WithSourceField(const Aws::String& value) { SetSourceField(value); return *this;}
94 
98  inline DoubleOptions& WithSourceField(Aws::String&& value) { SetSourceField(value); return *this;}
99 
103  inline DoubleOptions& 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 DoubleOptions& 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 DoubleOptions& 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 DoubleOptions& 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 DoubleOptions& WithSortEnabled(bool value) { SetSortEnabled(value); return *this;}
164 
165  private:
166  double 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
void SetSourceField(const char *value)
Definition: DoubleOptions.h:88
const Aws::String & GetSourceField() const
Definition: DoubleOptions.h:73
DoubleOptions & WithSourceField(const Aws::String &value)
Definition: DoubleOptions.h:93
void SetSourceField(const Aws::String &value)
Definition: DoubleOptions.h:78
DoubleOptions & WithReturnEnabled(bool value)
DoubleOptions & WithSearchEnabled(bool value)
DoubleOptions & WithSourceField(Aws::String &&value)
Definition: DoubleOptions.h:98
DoubleOptions & WithFacetEnabled(bool value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
DoubleOptions & WithSortEnabled(bool value)
DoubleOptions & WithDefaultValue(double value)
Definition: DoubleOptions.h:68
void SetSourceField(Aws::String &&value)
Definition: DoubleOptions.h:83
#define AWS_CLOUDSEARCH_API
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DoubleOptions & WithSourceField(const char *value)
JSON (JavaScript Object Notation).