Struct aws_sdk_cloudsearch::model::IntOptions
source · #[non_exhaustive]pub struct IntOptions { /* private fields */ }Expand description
Options for a 64-bit signed integer field. Present if IndexFieldType specifies the field is of type int. All options are enabled by default.
Implementations§
source§impl IntOptions
impl IntOptions
sourcepub fn default_value(&self) -> Option<i64>
pub fn default_value(&self) -> Option<i64>
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.
sourcepub fn source_field(&self) -> Option<&str>
pub fn source_field(&self) -> Option<&str>
The name of the source field to map to the field.
sourcepub fn facet_enabled(&self) -> Option<bool>
pub fn facet_enabled(&self) -> Option<bool>
Whether facet information can be returned for the field.
sourcepub fn search_enabled(&self) -> Option<bool>
pub fn search_enabled(&self) -> Option<bool>
Whether the contents of the field are searchable.
sourcepub fn return_enabled(&self) -> Option<bool>
pub fn return_enabled(&self) -> Option<bool>
Whether the contents of the field can be returned in the search results.
sourcepub fn sort_enabled(&self) -> Option<bool>
pub fn sort_enabled(&self) -> Option<bool>
Whether the field can be used to sort the search results.
source§impl IntOptions
impl IntOptions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture IntOptions.
Examples found in repository?
src/xml_deser.rs (line 2923)
2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018
pub fn deser_structure_crate_model_int_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IntOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::IntOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#IntOptions$DefaultValue */ => {
let var_110 =
Some(
{
<i64 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 (long: `com.amazonaws.cloudsearch#Long`)"))
}
?
)
;
builder = builder.set_default_value(var_110);
}
,
s if s.matches("SourceField") /* SourceField com.amazonaws.cloudsearch#IntOptions$SourceField */ => {
let var_111 =
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_field(var_111);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#IntOptions$FacetEnabled */ => {
let var_112 =
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_112);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#IntOptions$SearchEnabled */ => {
let var_113 =
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_113);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#IntOptions$ReturnEnabled */ => {
let var_114 =
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_114);
}
,
s if s.matches("SortEnabled") /* SortEnabled com.amazonaws.cloudsearch#IntOptions$SortEnabled */ => {
let var_115 =
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_sort_enabled(var_115);
}
,
_ => {}
}
}
Ok(builder.build())
}Trait Implementations§
source§impl Clone for IntOptions
impl Clone for IntOptions
source§fn clone(&self) -> IntOptions
fn clone(&self) -> IntOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more