#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSnapshotInput {
pub directory_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
}
impl CreateSnapshotInput {
pub fn directory_id(&self) -> ::std::option::Option<&str> {
self.directory_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
}
impl CreateSnapshotInput {
pub fn builder() -> crate::operation::create_snapshot::builders::CreateSnapshotInputBuilder {
crate::operation::create_snapshot::builders::CreateSnapshotInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateSnapshotInputBuilder {
pub(crate) directory_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
}
impl CreateSnapshotInputBuilder {
pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.directory_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.directory_id = input;
self
}
pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
&self.directory_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_snapshot::CreateSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_snapshot::CreateSnapshotInput {
directory_id: self.directory_id,
name: self.name,
})
}
}