Struct aws_sdk_s3::model::ObjectLockConfiguration
source · #[non_exhaustive]pub struct ObjectLockConfiguration { /* private fields */ }
Expand description
The container element for Object Lock configuration parameters.
Implementations§
source§impl ObjectLockConfiguration
impl ObjectLockConfiguration
sourcepub fn object_lock_enabled(&self) -> Option<&ObjectLockEnabled>
pub fn object_lock_enabled(&self) -> Option<&ObjectLockEnabled>
Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled
when you apply ObjectLockConfiguration
to a bucket.
sourcepub fn rule(&self) -> Option<&ObjectLockRule>
pub fn rule(&self) -> Option<&ObjectLockRule>
Specifies the Object Lock rule for the specified object. Enable the this rule when you apply ObjectLockConfiguration
to a bucket. Bucket settings require both a mode and a period. The period can be either Days
or Years
but you must select one. You cannot specify Days
and Years
at the same time.
source§impl ObjectLockConfiguration
impl ObjectLockConfiguration
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ObjectLockConfiguration
.
Examples found in repository?
src/xml_deser.rs (line 5081)
5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112
pub fn deser_structure_crate_model_object_lock_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ObjectLockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ObjectLockConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ObjectLockEnabled") /* ObjectLockEnabled com.amazonaws.s3#ObjectLockConfiguration$ObjectLockEnabled */ => {
let var_287 =
Some(
Result::<crate::model::ObjectLockEnabled, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ObjectLockEnabled::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_object_lock_enabled(var_287);
}
,
s if s.matches("Rule") /* Rule com.amazonaws.s3#ObjectLockConfiguration$Rule */ => {
let var_288 =
Some(
crate::xml_deser::deser_structure_crate_model_object_lock_rule(&mut tag)
?
)
;
builder = builder.set_rule(var_288);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ObjectLockConfiguration
impl Clone for ObjectLockConfiguration
source§fn clone(&self) -> ObjectLockConfiguration
fn clone(&self) -> ObjectLockConfiguration
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