#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSnapshotOutput {
pub snapshot: ::std::option::Option<crate::types::Snapshot>,
_request_id: Option<String>,
}
impl CreateSnapshotOutput {
pub fn snapshot(&self) -> ::std::option::Option<&crate::types::Snapshot> {
self.snapshot.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateSnapshotOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSnapshotOutput {
pub fn builder() -> crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder {
crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateSnapshotOutputBuilder {
pub(crate) snapshot: ::std::option::Option<crate::types::Snapshot>,
_request_id: Option<String>,
}
impl CreateSnapshotOutputBuilder {
pub fn snapshot(mut self, input: crate::types::Snapshot) -> Self {
self.snapshot = ::std::option::Option::Some(input);
self
}
pub fn set_snapshot(mut self, input: ::std::option::Option<crate::types::Snapshot>) -> Self {
self.snapshot = input;
self
}
pub fn get_snapshot(&self) -> &::std::option::Option<crate::types::Snapshot> {
&self.snapshot
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::create_snapshot::CreateSnapshotOutput {
crate::operation::create_snapshot::CreateSnapshotOutput {
snapshot: self.snapshot,
_request_id: self._request_id,
}
}
}