Struct aws_sdk_s3::model::object_lock_legal_hold::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ObjectLockLegalHold
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn status(self, input: ObjectLockLegalHoldStatus) -> Self
pub fn status(self, input: ObjectLockLegalHoldStatus) -> Self
Indicates whether the specified object has a legal hold in place.
sourcepub fn set_status(self, input: Option<ObjectLockLegalHoldStatus>) -> Self
pub fn set_status(self, input: Option<ObjectLockLegalHoldStatus>) -> Self
Indicates whether the specified object has a legal hold in place.
Examples found in repository?
src/xml_deser.rs (line 5068)
5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075
pub fn deser_structure_crate_model_object_lock_legal_hold(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockLegalHold, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockLegalHold::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") /* Status com.amazonaws.s3#ObjectLockLegalHold$Status */ => {
let var_286 =
Some(
Result::<crate::model::ObjectLockLegalHoldStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockLegalHoldStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_286);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> ObjectLockLegalHold
pub fn build(self) -> ObjectLockLegalHold
Consumes the builder and constructs a ObjectLockLegalHold
.
Examples found in repository?
src/xml_deser.rs (line 5074)
5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075
pub fn deser_structure_crate_model_object_lock_legal_hold(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockLegalHold, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockLegalHold::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Status") /* Status com.amazonaws.s3#ObjectLockLegalHold$Status */ => {
let var_286 =
Some(
Result::<crate::model::ObjectLockLegalHoldStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockLegalHoldStatus::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_286);
}
,
_ => {}
}
}
Ok(builder.build())
}