Struct aws_sdk_cloudfront::model::function_metadata::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for FunctionMetadata
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn function_arn(self, input: impl Into<String>) -> Self
pub fn function_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
sourcepub fn set_function_arn(self, input: Option<String>) -> Self
pub fn set_function_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the function.
Examples found in repository?
9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478
pub fn deser_structure_crate_model_function_metadata(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FunctionMetadata, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FunctionMetadata::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FunctionARN") /* FunctionARN com.amazonaws.cloudfront#FunctionMetadata$FunctionARN */ => {
let var_354 =
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_function_arn(var_354);
}
,
s if s.matches("Stage") /* Stage com.amazonaws.cloudfront#FunctionMetadata$Stage */ => {
let var_355 =
Some(
Result::<crate::model::FunctionStage, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FunctionStage::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_stage(var_355);
}
,
s if s.matches("CreatedTime") /* CreatedTime com.amazonaws.cloudfront#FunctionMetadata$CreatedTime */ => {
let var_356 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_created_time(var_356);
}
,
s if s.matches("LastModifiedTime") /* LastModifiedTime com.amazonaws.cloudfront#FunctionMetadata$LastModifiedTime */ => {
let var_357 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_last_modified_time(var_357);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn stage(self, input: FunctionStage) -> Self
pub fn stage(self, input: FunctionStage) -> Self
The stage that the function is in, either DEVELOPMENT
or LIVE
.
When a function is in the DEVELOPMENT
stage, you can test the function with TestFunction
, and update it with UpdateFunction
.
When a function is in the LIVE
stage, you can attach the function to a distribution’s cache behavior, using the function’s ARN.
sourcepub fn set_stage(self, input: Option<FunctionStage>) -> Self
pub fn set_stage(self, input: Option<FunctionStage>) -> Self
The stage that the function is in, either DEVELOPMENT
or LIVE
.
When a function is in the DEVELOPMENT
stage, you can test the function with TestFunction
, and update it with UpdateFunction
.
When a function is in the LIVE
stage, you can attach the function to a distribution’s cache behavior, using the function’s ARN.
Examples found in repository?
9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478
pub fn deser_structure_crate_model_function_metadata(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FunctionMetadata, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FunctionMetadata::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FunctionARN") /* FunctionARN com.amazonaws.cloudfront#FunctionMetadata$FunctionARN */ => {
let var_354 =
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_function_arn(var_354);
}
,
s if s.matches("Stage") /* Stage com.amazonaws.cloudfront#FunctionMetadata$Stage */ => {
let var_355 =
Some(
Result::<crate::model::FunctionStage, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FunctionStage::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_stage(var_355);
}
,
s if s.matches("CreatedTime") /* CreatedTime com.amazonaws.cloudfront#FunctionMetadata$CreatedTime */ => {
let var_356 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_created_time(var_356);
}
,
s if s.matches("LastModifiedTime") /* LastModifiedTime com.amazonaws.cloudfront#FunctionMetadata$LastModifiedTime */ => {
let var_357 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_last_modified_time(var_357);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn created_time(self, input: DateTime) -> Self
pub fn created_time(self, input: DateTime) -> Self
The date and time when the function was created.
sourcepub fn set_created_time(self, input: Option<DateTime>) -> Self
pub fn set_created_time(self, input: Option<DateTime>) -> Self
The date and time when the function was created.
Examples found in repository?
9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478
pub fn deser_structure_crate_model_function_metadata(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FunctionMetadata, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FunctionMetadata::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FunctionARN") /* FunctionARN com.amazonaws.cloudfront#FunctionMetadata$FunctionARN */ => {
let var_354 =
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_function_arn(var_354);
}
,
s if s.matches("Stage") /* Stage com.amazonaws.cloudfront#FunctionMetadata$Stage */ => {
let var_355 =
Some(
Result::<crate::model::FunctionStage, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FunctionStage::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_stage(var_355);
}
,
s if s.matches("CreatedTime") /* CreatedTime com.amazonaws.cloudfront#FunctionMetadata$CreatedTime */ => {
let var_356 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_created_time(var_356);
}
,
s if s.matches("LastModifiedTime") /* LastModifiedTime com.amazonaws.cloudfront#FunctionMetadata$LastModifiedTime */ => {
let var_357 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_last_modified_time(var_357);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn last_modified_time(self, input: DateTime) -> Self
pub fn last_modified_time(self, input: DateTime) -> Self
The date and time when the function was most recently updated.
sourcepub fn set_last_modified_time(self, input: Option<DateTime>) -> Self
pub fn set_last_modified_time(self, input: Option<DateTime>) -> Self
The date and time when the function was most recently updated.
Examples found in repository?
9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478
pub fn deser_structure_crate_model_function_metadata(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FunctionMetadata, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FunctionMetadata::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FunctionARN") /* FunctionARN com.amazonaws.cloudfront#FunctionMetadata$FunctionARN */ => {
let var_354 =
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_function_arn(var_354);
}
,
s if s.matches("Stage") /* Stage com.amazonaws.cloudfront#FunctionMetadata$Stage */ => {
let var_355 =
Some(
Result::<crate::model::FunctionStage, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FunctionStage::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_stage(var_355);
}
,
s if s.matches("CreatedTime") /* CreatedTime com.amazonaws.cloudfront#FunctionMetadata$CreatedTime */ => {
let var_356 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_created_time(var_356);
}
,
s if s.matches("LastModifiedTime") /* LastModifiedTime com.amazonaws.cloudfront#FunctionMetadata$LastModifiedTime */ => {
let var_357 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_last_modified_time(var_357);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> FunctionMetadata
pub fn build(self) -> FunctionMetadata
Consumes the builder and constructs a FunctionMetadata
.
Examples found in repository?
9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478
pub fn deser_structure_crate_model_function_metadata(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FunctionMetadata, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FunctionMetadata::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("FunctionARN") /* FunctionARN com.amazonaws.cloudfront#FunctionMetadata$FunctionARN */ => {
let var_354 =
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_function_arn(var_354);
}
,
s if s.matches("Stage") /* Stage com.amazonaws.cloudfront#FunctionMetadata$Stage */ => {
let var_355 =
Some(
Result::<crate::model::FunctionStage, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::FunctionStage::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_stage(var_355);
}
,
s if s.matches("CreatedTime") /* CreatedTime com.amazonaws.cloudfront#FunctionMetadata$CreatedTime */ => {
let var_356 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_created_time(var_356);
}
,
s if s.matches("LastModifiedTime") /* LastModifiedTime com.amazonaws.cloudfront#FunctionMetadata$LastModifiedTime */ => {
let var_357 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.cloudfront#timestamp`)"))
?
)
;
builder = builder.set_last_modified_time(var_357);
}
,
_ => {}
}
}
Ok(builder.build())
}