/**
* 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 field that contains an array of text strings. Present if
* IndexFieldType
specifies the field is of type
* text-array
. A text-array
field is always searchable.
* All options are enabled by default.
See Also:
AWS
* API Reference
*/
class TextArrayOptions
{
public:
AWS_CLOUDSEARCH_API TextArrayOptions();
AWS_CLOUDSEARCH_API TextArrayOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
AWS_CLOUDSEARCH_API TextArrayOptions& 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.
*/
inline const Aws::String& GetDefaultValue() const{ return m_defaultValue; }
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; }
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline void SetDefaultValue(const Aws::String& value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; }
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline void SetDefaultValue(Aws::String&& value) { m_defaultValueHasBeenSet = true; m_defaultValue = std::move(value); }
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline void SetDefaultValue(const char* value) { m_defaultValueHasBeenSet = true; m_defaultValue.assign(value); }
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline TextArrayOptions& WithDefaultValue(const Aws::String& value) { SetDefaultValue(value); return *this;}
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline TextArrayOptions& WithDefaultValue(Aws::String&& value) { SetDefaultValue(std::move(value)); return *this;}
/**
* A value to use for the field if the field isn't specified for a document.
*/
inline TextArrayOptions& WithDefaultValue(const char* value) { SetDefaultValue(value); return *this;}
/**
* A list of source fields to map to the field.
*/
inline const Aws::String& GetSourceFields() const{ return m_sourceFields; }
/**
* A list of source fields to map to the field.
*/
inline bool SourceFieldsHasBeenSet() const { return m_sourceFieldsHasBeenSet; }
/**
* A list of source fields to map to the field.
*/
inline void SetSourceFields(const Aws::String& value) { m_sourceFieldsHasBeenSet = true; m_sourceFields = value; }
/**
* A list of source fields to map to the field.
*/
inline void SetSourceFields(Aws::String&& value) { m_sourceFieldsHasBeenSet = true; m_sourceFields = std::move(value); }
/**
* A list of source fields to map to the field.
*/
inline void SetSourceFields(const char* value) { m_sourceFieldsHasBeenSet = true; m_sourceFields.assign(value); }
/**
* A list of source fields to map to the field.
*/
inline TextArrayOptions& WithSourceFields(const Aws::String& value) { SetSourceFields(value); return *this;}
/**
* A list of source fields to map to the field.
*/
inline TextArrayOptions& WithSourceFields(Aws::String&& value) { SetSourceFields(std::move(value)); return *this;}
/**
* A list of source fields to map to the field.
*/
inline TextArrayOptions& WithSourceFields(const char* value) { SetSourceFields(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 TextArrayOptions& WithReturnEnabled(bool value) { SetReturnEnabled(value); return *this;}
/**
* Whether highlights can be returned for the field.
*/
inline bool GetHighlightEnabled() const{ return m_highlightEnabled; }
/**
* Whether highlights can be returned for the field.
*/
inline bool HighlightEnabledHasBeenSet() const { return m_highlightEnabledHasBeenSet; }
/**
* Whether highlights can be returned for the field.
*/
inline void SetHighlightEnabled(bool value) { m_highlightEnabledHasBeenSet = true; m_highlightEnabled = value; }
/**
* Whether highlights can be returned for the field.
*/
inline TextArrayOptions& WithHighlightEnabled(bool value) { SetHighlightEnabled(value); return *this;}
/**
* The name of an analysis scheme for a text-array
field.
*/
inline const Aws::String& GetAnalysisScheme() const{ return m_analysisScheme; }
/**
* The name of an analysis scheme for a text-array
field.
*/
inline bool AnalysisSchemeHasBeenSet() const { return m_analysisSchemeHasBeenSet; }
/**
* The name of an analysis scheme for a text-array
field.
*/
inline void SetAnalysisScheme(const Aws::String& value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme = value; }
/**
* The name of an analysis scheme for a text-array
field.
*/
inline void SetAnalysisScheme(Aws::String&& value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme = std::move(value); }
/**
* The name of an analysis scheme for a text-array
field.
*/
inline void SetAnalysisScheme(const char* value) { m_analysisSchemeHasBeenSet = true; m_analysisScheme.assign(value); }
/**
* The name of an analysis scheme for a text-array
field.
*/
inline TextArrayOptions& WithAnalysisScheme(const Aws::String& value) { SetAnalysisScheme(value); return *this;}
/**
* The name of an analysis scheme for a text-array
field.
*/
inline TextArrayOptions& WithAnalysisScheme(Aws::String&& value) { SetAnalysisScheme(std::move(value)); return *this;}
/**
* The name of an analysis scheme for a text-array
field.
*/
inline TextArrayOptions& WithAnalysisScheme(const char* value) { SetAnalysisScheme(value); return *this;}
private:
Aws::String m_defaultValue;
bool m_defaultValueHasBeenSet = false;
Aws::String m_sourceFields;
bool m_sourceFieldsHasBeenSet = false;
bool m_returnEnabled;
bool m_returnEnabledHasBeenSet = false;
bool m_highlightEnabled;
bool m_highlightEnabledHasBeenSet = false;
Aws::String m_analysisScheme;
bool m_analysisSchemeHasBeenSet = false;
};
} // namespace Model
} // namespace CloudSearch
} // namespace Aws