Struct aws_sdk_iotanalytics::model::datastore_partition::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for DatastorePartition.
Implementations§
source§impl Builder
impl Builder
sourcepub fn attribute_partition(self, input: Partition) -> Self
pub fn attribute_partition(self, input: Partition) -> Self
A partition dimension defined by an attributeName.
sourcepub fn set_attribute_partition(self, input: Option<Partition>) -> Self
pub fn set_attribute_partition(self, input: Option<Partition>) -> Self
A partition dimension defined by an attributeName.
Examples found in repository?
src/json_deser.rs (lines 5424-5428)
5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456
pub(crate) fn deser_structure_crate_model_datastore_partition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DatastorePartition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::datastore_partition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"attributePartition" => {
builder = builder.set_attribute_partition(
crate::json_deser::deser_structure_crate_model_partition(
tokens,
)?,
);
}
"timestampPartition" => {
builder = builder.set_timestamp_partition(
crate::json_deser::deser_structure_crate_model_timestamp_partition(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn timestamp_partition(self, input: TimestampPartition) -> Self
pub fn timestamp_partition(self, input: TimestampPartition) -> Self
A partition dimension defined by a timestamp attribute.
sourcepub fn set_timestamp_partition(self, input: Option<TimestampPartition>) -> Self
pub fn set_timestamp_partition(self, input: Option<TimestampPartition>) -> Self
A partition dimension defined by a timestamp attribute.
Examples found in repository?
src/json_deser.rs (lines 5431-5433)
5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456
pub(crate) fn deser_structure_crate_model_datastore_partition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DatastorePartition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::datastore_partition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"attributePartition" => {
builder = builder.set_attribute_partition(
crate::json_deser::deser_structure_crate_model_partition(
tokens,
)?,
);
}
"timestampPartition" => {
builder = builder.set_timestamp_partition(
crate::json_deser::deser_structure_crate_model_timestamp_partition(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> DatastorePartition
pub fn build(self) -> DatastorePartition
Consumes the builder and constructs a DatastorePartition.
Examples found in repository?
src/json_deser.rs (line 5448)
5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456
pub(crate) fn deser_structure_crate_model_datastore_partition<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DatastorePartition>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::datastore_partition::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"attributePartition" => {
builder = builder.set_attribute_partition(
crate::json_deser::deser_structure_crate_model_partition(
tokens,
)?,
);
}
"timestampPartition" => {
builder = builder.set_timestamp_partition(
crate::json_deser::deser_structure_crate_model_timestamp_partition(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}