Struct aws_sdk_cloudsearch::model::date_array_options::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for DateArrayOptions.
Implementations§
source§impl Builder
impl Builder
sourcepub fn default_value(self, input: impl Into<String>) -> Self
pub fn default_value(self, input: impl Into<String>) -> Self
A value to use for the field if the field isn’t specified for a document.
sourcepub fn set_default_value(self, input: Option<String>) -> Self
pub fn set_default_value(self, input: Option<String>) -> Self
A value to use for the field if the field isn’t specified for a document.
Examples found in repository?
src/xml_deser.rs (line 3870)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn source_fields(self, input: impl Into<String>) -> Self
pub fn source_fields(self, input: impl Into<String>) -> Self
A list of source fields to map to the field.
sourcepub fn set_source_fields(self, input: Option<String>) -> Self
pub fn set_source_fields(self, input: Option<String>) -> Self
A list of source fields to map to the field.
Examples found in repository?
src/xml_deser.rs (line 3883)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn facet_enabled(self, input: bool) -> Self
pub fn facet_enabled(self, input: bool) -> Self
Whether facet information can be returned for the field.
sourcepub fn set_facet_enabled(self, input: Option<bool>) -> Self
pub fn set_facet_enabled(self, input: Option<bool>) -> Self
Whether facet information can be returned for the field.
Examples found in repository?
src/xml_deser.rs (line 3898)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn search_enabled(self, input: bool) -> Self
pub fn search_enabled(self, input: bool) -> Self
Whether the contents of the field are searchable.
sourcepub fn set_search_enabled(self, input: Option<bool>) -> Self
pub fn set_search_enabled(self, input: Option<bool>) -> Self
Whether the contents of the field are searchable.
Examples found in repository?
src/xml_deser.rs (line 3913)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn return_enabled(self, input: bool) -> Self
pub fn return_enabled(self, input: bool) -> Self
Whether the contents of the field can be returned in the search results.
sourcepub fn set_return_enabled(self, input: Option<bool>) -> Self
pub fn set_return_enabled(self, input: Option<bool>) -> Self
Whether the contents of the field can be returned in the search results.
Examples found in repository?
src/xml_deser.rs (line 3928)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> DateArrayOptions
pub fn build(self) -> DateArrayOptions
Consumes the builder and constructs a DateArrayOptions.
Examples found in repository?
src/xml_deser.rs (line 3934)
3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935
pub fn deser_structure_crate_model_date_array_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateArrayOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateArrayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateArrayOptions$DefaultValue */ => {
let var_166 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_default_value(var_166);
}
,
s if s.matches("SourceFields") /* SourceFields com.amazonaws.cloudsearch#DateArrayOptions$SourceFields */ => {
let var_167 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_fields(var_167);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateArrayOptions$FacetEnabled */ => {
let var_168 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_168);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateArrayOptions$SearchEnabled */ => {
let var_169 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_169);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateArrayOptions$ReturnEnabled */ => {
let var_170 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_170);
}
,
_ => {}
}
}
Ok(builder.build())
}