#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateSnapshotInput {
pub snapshot_name: ::std::option::Option<::std::string::String>,
pub retention_period: ::std::option::Option<i32>,
}
impl UpdateSnapshotInput {
pub fn snapshot_name(&self) -> ::std::option::Option<&str> {
self.snapshot_name.as_deref()
}
pub fn retention_period(&self) -> ::std::option::Option<i32> {
self.retention_period
}
}
impl UpdateSnapshotInput {
pub fn builder() -> crate::operation::update_snapshot::builders::UpdateSnapshotInputBuilder {
crate::operation::update_snapshot::builders::UpdateSnapshotInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSnapshotInputBuilder {
pub(crate) snapshot_name: ::std::option::Option<::std::string::String>,
pub(crate) retention_period: ::std::option::Option<i32>,
}
impl UpdateSnapshotInputBuilder {
pub fn snapshot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_snapshot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_name = input;
self
}
pub fn get_snapshot_name(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_name
}
pub fn retention_period(mut self, input: i32) -> Self {
self.retention_period = ::std::option::Option::Some(input);
self
}
pub fn set_retention_period(mut self, input: ::std::option::Option<i32>) -> Self {
self.retention_period = input;
self
}
pub fn get_retention_period(&self) -> &::std::option::Option<i32> {
&self.retention_period
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_snapshot::UpdateSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_snapshot::UpdateSnapshotInput {
snapshot_name: self.snapshot_name,
retention_period: self.retention_period,
})
}
}