#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeSnapshotAttributeOutput {
pub product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
pub snapshot_id: ::std::option::Option<::std::string::String>,
pub create_volume_permissions: ::std::option::Option<::std::vec::Vec<crate::types::CreateVolumePermission>>,
_request_id: Option<String>,
}
impl DescribeSnapshotAttributeOutput {
pub fn product_codes(&self) -> &[crate::types::ProductCode] {
self.product_codes.as_deref().unwrap_or_default()
}
pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
self.snapshot_id.as_deref()
}
pub fn create_volume_permissions(&self) -> &[crate::types::CreateVolumePermission] {
self.create_volume_permissions.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for DescribeSnapshotAttributeOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeSnapshotAttributeOutput {
pub fn builder() -> crate::operation::describe_snapshot_attribute::builders::DescribeSnapshotAttributeOutputBuilder {
crate::operation::describe_snapshot_attribute::builders::DescribeSnapshotAttributeOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeSnapshotAttributeOutputBuilder {
pub(crate) product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) create_volume_permissions: ::std::option::Option<::std::vec::Vec<crate::types::CreateVolumePermission>>,
_request_id: Option<String>,
}
impl DescribeSnapshotAttributeOutputBuilder {
pub fn product_codes(mut self, input: crate::types::ProductCode) -> Self {
let mut v = self.product_codes.unwrap_or_default();
v.push(input);
self.product_codes = ::std::option::Option::Some(v);
self
}
pub fn set_product_codes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>) -> Self {
self.product_codes = input;
self
}
pub fn get_product_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductCode>> {
&self.product_codes
}
pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_id = ::std::option::Option::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 get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_id
}
pub fn create_volume_permissions(mut self, input: crate::types::CreateVolumePermission) -> Self {
let mut v = self.create_volume_permissions.unwrap_or_default();
v.push(input);
self.create_volume_permissions = ::std::option::Option::Some(v);
self
}
pub fn set_create_volume_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateVolumePermission>>) -> Self {
self.create_volume_permissions = input;
self
}
pub fn get_create_volume_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateVolumePermission>> {
&self.create_volume_permissions
}
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::describe_snapshot_attribute::DescribeSnapshotAttributeOutput {
crate::operation::describe_snapshot_attribute::DescribeSnapshotAttributeOutput {
product_codes: self.product_codes,
snapshot_id: self.snapshot_id,
create_volume_permissions: self.create_volume_permissions,
_request_id: self._request_id,
}
}
}