#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CopySnapshotOutput {
#[doc(hidden)]
pub snapshot_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
_request_id: Option<String>,
}
impl CopySnapshotOutput {
pub fn snapshot_id(&self) -> std::option::Option<&str> {
self.snapshot_id.as_deref()
}
pub fn tags(&self) -> std::option::Option<&[crate::types::Tag]> {
self.tags.as_deref()
}
}
impl aws_http::request_id::RequestId for CopySnapshotOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CopySnapshotOutput {
pub fn builder() -> crate::operation::copy_snapshot::builders::CopySnapshotOutputBuilder {
crate::operation::copy_snapshot::builders::CopySnapshotOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CopySnapshotOutputBuilder {
pub(crate) snapshot_id: std::option::Option<std::string::String>,
pub(crate) tags: std::option::Option<std::vec::Vec<crate::types::Tag>>,
_request_id: Option<String>,
}
impl CopySnapshotOutputBuilder {
pub fn snapshot_id(mut self, input: impl Into<std::string::String>) -> Self {
self.snapshot_id = Some(input.into());
self
}
pub fn set_snapshot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.snapshot_id = input;
self
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = Some(v);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Tag>>,
) -> Self {
self.tags = input;
self
}
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::copy_snapshot::CopySnapshotOutput {
crate::operation::copy_snapshot::CopySnapshotOutput {
snapshot_id: self.snapshot_id,
tags: self.tags,
_request_id: self._request_id,
}
}
}