/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudSearch { namespace Model { /** *

Options for a 64-bit signed integer field. Present if * IndexFieldType specifies the field is of type int. All * options are enabled by default.

See Also:

AWS * API Reference

*/ class IntOptions { public: AWS_CLOUDSEARCH_API IntOptions(); AWS_CLOUDSEARCH_API IntOptions(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDSEARCH_API IntOptions& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDSEARCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDSEARCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** * A value to use for the field if the field isn't specified for a document. This * can be important if you are using the field in an expression and that field is * not present in every document. */ inline long long GetDefaultValue() const{ return m_defaultValue; } /** * A value to use for the field if the field isn't specified for a document. This * can be important if you are using the field in an expression and that field is * not present in every document. */ inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; } /** * A value to use for the field if the field isn't specified for a document. This * can be important if you are using the field in an expression and that field is * not present in every document. */ inline void SetDefaultValue(long long value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; } /** * A value to use for the field if the field isn't specified for a document. This * can be important if you are using the field in an expression and that field is * not present in every document. */ inline IntOptions& WithDefaultValue(long long value) { SetDefaultValue(value); return *this;} /** *

The name of the source field to map to the field.

*/ inline const Aws::String& GetSourceField() const{ return m_sourceField; } /** *

The name of the source field to map to the field.

*/ inline bool SourceFieldHasBeenSet() const { return m_sourceFieldHasBeenSet; } /** *

The name of the source field to map to the field.

*/ inline void SetSourceField(const Aws::String& value) { m_sourceFieldHasBeenSet = true; m_sourceField = value; } /** *

The name of the source field to map to the field.

*/ inline void SetSourceField(Aws::String&& value) { m_sourceFieldHasBeenSet = true; m_sourceField = std::move(value); } /** *

The name of the source field to map to the field.

*/ inline void SetSourceField(const char* value) { m_sourceFieldHasBeenSet = true; m_sourceField.assign(value); } /** *

The name of the source field to map to the field.

*/ inline IntOptions& WithSourceField(const Aws::String& value) { SetSourceField(value); return *this;} /** *

The name of the source field to map to the field.

*/ inline IntOptions& WithSourceField(Aws::String&& value) { SetSourceField(std::move(value)); return *this;} /** *

The name of the source field to map to the field.

*/ inline IntOptions& WithSourceField(const char* value) { SetSourceField(value); return *this;} /** *

Whether facet information can be returned for the field.

*/ inline bool GetFacetEnabled() const{ return m_facetEnabled; } /** *

Whether facet information can be returned for the field.

*/ inline bool FacetEnabledHasBeenSet() const { return m_facetEnabledHasBeenSet; } /** *

Whether facet information can be returned for the field.

*/ inline void SetFacetEnabled(bool value) { m_facetEnabledHasBeenSet = true; m_facetEnabled = value; } /** *

Whether facet information can be returned for the field.

*/ inline IntOptions& WithFacetEnabled(bool value) { SetFacetEnabled(value); return *this;} /** *

Whether the contents of the field are searchable.

*/ inline bool GetSearchEnabled() const{ return m_searchEnabled; } /** *

Whether the contents of the field are searchable.

*/ inline bool SearchEnabledHasBeenSet() const { return m_searchEnabledHasBeenSet; } /** *

Whether the contents of the field are searchable.

*/ inline void SetSearchEnabled(bool value) { m_searchEnabledHasBeenSet = true; m_searchEnabled = value; } /** *

Whether the contents of the field are searchable.

*/ inline IntOptions& WithSearchEnabled(bool value) { SetSearchEnabled(value); return *this;} /** *

Whether the contents of the field can be returned in the search results.

*/ inline bool GetReturnEnabled() const{ return m_returnEnabled; } /** *

Whether the contents of the field can be returned in the search results.

*/ inline bool ReturnEnabledHasBeenSet() const { return m_returnEnabledHasBeenSet; } /** *

Whether the contents of the field can be returned in the search results.

*/ inline void SetReturnEnabled(bool value) { m_returnEnabledHasBeenSet = true; m_returnEnabled = value; } /** *

Whether the contents of the field can be returned in the search results.

*/ inline IntOptions& WithReturnEnabled(bool value) { SetReturnEnabled(value); return *this;} /** *

Whether the field can be used to sort the search results.

*/ inline bool GetSortEnabled() const{ return m_sortEnabled; } /** *

Whether the field can be used to sort the search results.

*/ inline bool SortEnabledHasBeenSet() const { return m_sortEnabledHasBeenSet; } /** *

Whether the field can be used to sort the search results.

*/ inline void SetSortEnabled(bool value) { m_sortEnabledHasBeenSet = true; m_sortEnabled = value; } /** *

Whether the field can be used to sort the search results.

*/ inline IntOptions& WithSortEnabled(bool value) { SetSortEnabled(value); return *this;} private: long long m_defaultValue; bool m_defaultValueHasBeenSet = false; Aws::String m_sourceField; bool m_sourceFieldHasBeenSet = false; bool m_facetEnabled; bool m_facetEnabledHasBeenSet = false; bool m_searchEnabled; bool m_searchEnabledHasBeenSet = false; bool m_returnEnabled; bool m_returnEnabledHasBeenSet = false; bool m_sortEnabled; bool m_sortEnabledHasBeenSet = false; }; } // namespace Model } // namespace CloudSearch } // namespace Aws