Struct aws_sdk_cloudsearch::model::DateOptions
source · #[non_exhaustive]pub struct DateOptions { /* private fields */ }Expand description
Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if IndexFieldType specifies the field is of type date. All options are enabled by default.
Implementations§
source§impl DateOptions
impl DateOptions
sourcepub fn default_value(&self) -> Option<&str>
pub fn default_value(&self) -> Option<&str>
A value to use for the field if the field isn’t specified for a document.
sourcepub fn source_field(&self) -> Option<&str>
pub fn source_field(&self) -> Option<&str>
A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score is reserved and cannot be used as a field name. To reference a document's ID, you can use the name _id.
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 DateOptions
impl DateOptions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DateOptions.
Examples found in repository?
3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414
pub fn deser_structure_crate_model_date_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DateOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DateOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DateOptions$DefaultValue */ => {
let var_134 =
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_134);
}
,
s if s.matches("SourceField") /* SourceField com.amazonaws.cloudsearch#DateOptions$SourceField */ => {
let var_135 =
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_135);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DateOptions$FacetEnabled */ => {
let var_136 =
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_136);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DateOptions$SearchEnabled */ => {
let var_137 =
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_137);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DateOptions$ReturnEnabled */ => {
let var_138 =
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_138);
}
,
s if s.matches("SortEnabled") /* SortEnabled com.amazonaws.cloudsearch#DateOptions$SortEnabled */ => {
let var_139 =
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_139);
}
,
_ => {}
}
}
Ok(builder.build())
}Trait Implementations§
source§impl Clone for DateOptions
impl Clone for DateOptions
source§fn clone(&self) -> DateOptions
fn clone(&self) -> DateOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more