#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateVolumeOutput {
pub attachments: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>,
pub availability_zone: ::std::option::Option<::std::string::String>,
pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub encrypted: ::std::option::Option<bool>,
pub kms_key_id: ::std::option::Option<::std::string::String>,
pub outpost_arn: ::std::option::Option<::std::string::String>,
pub size: ::std::option::Option<i32>,
pub snapshot_id: ::std::option::Option<::std::string::String>,
pub state: ::std::option::Option<crate::types::VolumeState>,
pub volume_id: ::std::option::Option<::std::string::String>,
pub iops: ::std::option::Option<i32>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub volume_type: ::std::option::Option<crate::types::VolumeType>,
pub fast_restored: ::std::option::Option<bool>,
pub multi_attach_enabled: ::std::option::Option<bool>,
pub throughput: ::std::option::Option<i32>,
pub sse_type: ::std::option::Option<crate::types::SseType>,
_request_id: Option<String>,
}
impl CreateVolumeOutput {
pub fn attachments(&self) -> &[crate::types::VolumeAttachment] {
self.attachments.as_deref().unwrap_or_default()
}
pub fn availability_zone(&self) -> ::std::option::Option<&str> {
self.availability_zone.as_deref()
}
pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.create_time.as_ref()
}
pub fn encrypted(&self) -> ::std::option::Option<bool> {
self.encrypted
}
pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
self.outpost_arn.as_deref()
}
pub fn size(&self) -> ::std::option::Option<i32> {
self.size
}
pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
self.snapshot_id.as_deref()
}
pub fn state(&self) -> ::std::option::Option<&crate::types::VolumeState> {
self.state.as_ref()
}
pub fn volume_id(&self) -> ::std::option::Option<&str> {
self.volume_id.as_deref()
}
pub fn iops(&self) -> ::std::option::Option<i32> {
self.iops
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn volume_type(&self) -> ::std::option::Option<&crate::types::VolumeType> {
self.volume_type.as_ref()
}
pub fn fast_restored(&self) -> ::std::option::Option<bool> {
self.fast_restored
}
pub fn multi_attach_enabled(&self) -> ::std::option::Option<bool> {
self.multi_attach_enabled
}
pub fn throughput(&self) -> ::std::option::Option<i32> {
self.throughput
}
pub fn sse_type(&self) -> ::std::option::Option<&crate::types::SseType> {
self.sse_type.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateVolumeOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateVolumeOutput {
pub fn builder() -> crate::operation::create_volume::builders::CreateVolumeOutputBuilder {
crate::operation::create_volume::builders::CreateVolumeOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateVolumeOutputBuilder {
pub(crate) attachments: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>,
pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) encrypted: ::std::option::Option<bool>,
pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
pub(crate) size: ::std::option::Option<i32>,
pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::VolumeState>,
pub(crate) volume_id: ::std::option::Option<::std::string::String>,
pub(crate) iops: ::std::option::Option<i32>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) volume_type: ::std::option::Option<crate::types::VolumeType>,
pub(crate) fast_restored: ::std::option::Option<bool>,
pub(crate) multi_attach_enabled: ::std::option::Option<bool>,
pub(crate) throughput: ::std::option::Option<i32>,
pub(crate) sse_type: ::std::option::Option<crate::types::SseType>,
_request_id: Option<String>,
}
impl CreateVolumeOutputBuilder {
pub fn attachments(mut self, input: crate::types::VolumeAttachment) -> Self {
let mut v = self.attachments.unwrap_or_default();
v.push(input);
self.attachments = ::std::option::Option::Some(v);
self
}
pub fn set_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>) -> Self {
self.attachments = input;
self
}
pub fn get_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>> {
&self.attachments
}
pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone = ::std::option::Option::Some(input.into());
self
}
pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.availability_zone = input;
self
}
pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone
}
pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.create_time = ::std::option::Option::Some(input);
self
}
pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.create_time = input;
self
}
pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.create_time
}
pub fn encrypted(mut self, input: bool) -> Self {
self.encrypted = ::std::option::Option::Some(input);
self
}
pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
self.encrypted = input;
self
}
pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
&self.encrypted
}
pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_id
}
pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.outpost_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.outpost_arn = input;
self
}
pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.outpost_arn
}
pub fn size(mut self, input: i32) -> Self {
self.size = ::std::option::Option::Some(input);
self
}
pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.size = input;
self
}
pub fn get_size(&self) -> &::std::option::Option<i32> {
&self.size
}
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 state(mut self, input: crate::types::VolumeState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::VolumeState>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::VolumeState> {
&self.state
}
pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.volume_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.volume_id = input;
self
}
pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
&self.volume_id
}
pub fn iops(mut self, input: i32) -> Self {
self.iops = ::std::option::Option::Some(input);
self
}
pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
self.iops = input;
self
}
pub fn get_iops(&self) -> &::std::option::Option<i32> {
&self.iops
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::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 fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
self.volume_type = ::std::option::Option::Some(input);
self
}
pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
self.volume_type = input;
self
}
pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
&self.volume_type
}
pub fn fast_restored(mut self, input: bool) -> Self {
self.fast_restored = ::std::option::Option::Some(input);
self
}
pub fn set_fast_restored(mut self, input: ::std::option::Option<bool>) -> Self {
self.fast_restored = input;
self
}
pub fn get_fast_restored(&self) -> &::std::option::Option<bool> {
&self.fast_restored
}
pub fn multi_attach_enabled(mut self, input: bool) -> Self {
self.multi_attach_enabled = ::std::option::Option::Some(input);
self
}
pub fn set_multi_attach_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.multi_attach_enabled = input;
self
}
pub fn get_multi_attach_enabled(&self) -> &::std::option::Option<bool> {
&self.multi_attach_enabled
}
pub fn throughput(mut self, input: i32) -> Self {
self.throughput = ::std::option::Option::Some(input);
self
}
pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
self.throughput = input;
self
}
pub fn get_throughput(&self) -> &::std::option::Option<i32> {
&self.throughput
}
pub fn sse_type(mut self, input: crate::types::SseType) -> Self {
self.sse_type = ::std::option::Option::Some(input);
self
}
pub fn set_sse_type(mut self, input: ::std::option::Option<crate::types::SseType>) -> Self {
self.sse_type = input;
self
}
pub fn get_sse_type(&self) -> &::std::option::Option<crate::types::SseType> {
&self.sse_type
}
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_volume::CreateVolumeOutput {
crate::operation::create_volume::CreateVolumeOutput {
attachments: self.attachments,
availability_zone: self.availability_zone,
create_time: self.create_time,
encrypted: self.encrypted,
kms_key_id: self.kms_key_id,
outpost_arn: self.outpost_arn,
size: self.size,
snapshot_id: self.snapshot_id,
state: self.state,
volume_id: self.volume_id,
iops: self.iops,
tags: self.tags,
volume_type: self.volume_type,
fast_restored: self.fast_restored,
multi_attach_enabled: self.multi_attach_enabled,
throughput: self.throughput,
sse_type: self.sse_type,
_request_id: self._request_id,
}
}
}