#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetVolumeOutput {
pub volume_id: ::std::string::String,
pub farm_id: ::std::string::String,
pub fleet_id: ::std::string::String,
pub state: crate::types::VolumeState,
pub size_gib: i32,
pub availability_zone_id: ::std::string::String,
pub attached_worker_id: ::std::option::Option<::std::string::String>,
pub volume_type: crate::types::EbsVolumeType,
pub iops: ::std::option::Option<i32>,
pub throughput_mib: ::std::option::Option<i32>,
pub created_at: ::aws_smithy_types::DateTime,
pub last_assigned_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetVolumeOutput {
pub fn volume_id(&self) -> &str {
use std::ops::Deref;
self.volume_id.deref()
}
pub fn farm_id(&self) -> &str {
use std::ops::Deref;
self.farm_id.deref()
}
pub fn fleet_id(&self) -> &str {
use std::ops::Deref;
self.fleet_id.deref()
}
pub fn state(&self) -> &crate::types::VolumeState {
&self.state
}
pub fn size_gib(&self) -> i32 {
self.size_gib
}
pub fn availability_zone_id(&self) -> &str {
use std::ops::Deref;
self.availability_zone_id.deref()
}
pub fn attached_worker_id(&self) -> ::std::option::Option<&str> {
self.attached_worker_id.as_deref()
}
pub fn volume_type(&self) -> &crate::types::EbsVolumeType {
&self.volume_type
}
pub fn iops(&self) -> ::std::option::Option<i32> {
self.iops
}
pub fn throughput_mib(&self) -> ::std::option::Option<i32> {
self.throughput_mib
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn last_assigned_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_assigned_at.as_ref()
}
pub fn last_released_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_released_at.as_ref()
}
pub fn expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expires_at.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetVolumeOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetVolumeOutput {
pub fn builder() -> crate::operation::get_volume::builders::GetVolumeOutputBuilder {
crate::operation::get_volume::builders::GetVolumeOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetVolumeOutputBuilder {
pub(crate) volume_id: ::std::option::Option<::std::string::String>,
pub(crate) farm_id: ::std::option::Option<::std::string::String>,
pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::VolumeState>,
pub(crate) size_gib: ::std::option::Option<i32>,
pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
pub(crate) attached_worker_id: ::std::option::Option<::std::string::String>,
pub(crate) volume_type: ::std::option::Option<crate::types::EbsVolumeType>,
pub(crate) iops: ::std::option::Option<i32>,
pub(crate) throughput_mib: ::std::option::Option<i32>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_assigned_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetVolumeOutputBuilder {
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 farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.farm_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.farm_id = input;
self
}
pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
&self.farm_id
}
pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fleet_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fleet_id = input;
self
}
pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
&self.fleet_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 size_gib(mut self, input: i32) -> Self {
self.size_gib = ::std::option::Option::Some(input);
self
}
pub fn set_size_gib(mut self, input: ::std::option::Option<i32>) -> Self {
self.size_gib = input;
self
}
pub fn get_size_gib(&self) -> &::std::option::Option<i32> {
&self.size_gib
}
pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.availability_zone_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.availability_zone_id = input;
self
}
pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
&self.availability_zone_id
}
pub fn attached_worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.attached_worker_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_attached_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.attached_worker_id = input;
self
}
pub fn get_attached_worker_id(&self) -> &::std::option::Option<::std::string::String> {
&self.attached_worker_id
}
pub fn volume_type(mut self, input: crate::types::EbsVolumeType) -> Self {
self.volume_type = ::std::option::Option::Some(input);
self
}
pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::EbsVolumeType>) -> Self {
self.volume_type = input;
self
}
pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::EbsVolumeType> {
&self.volume_type
}
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 throughput_mib(mut self, input: i32) -> Self {
self.throughput_mib = ::std::option::Option::Some(input);
self
}
pub fn set_throughput_mib(mut self, input: ::std::option::Option<i32>) -> Self {
self.throughput_mib = input;
self
}
pub fn get_throughput_mib(&self) -> &::std::option::Option<i32> {
&self.throughput_mib
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn last_assigned_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_assigned_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_assigned_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_assigned_at = input;
self
}
pub fn get_last_assigned_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_assigned_at
}
pub fn last_released_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_released_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_released_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_released_at = input;
self
}
pub fn get_last_released_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_released_at
}
pub fn expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expires_at = ::std::option::Option::Some(input);
self
}
pub fn set_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expires_at = input;
self
}
pub fn get_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expires_at
}
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) -> ::std::result::Result<crate::operation::get_volume::GetVolumeOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_volume::GetVolumeOutput {
volume_id: self.volume_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"volume_id",
"volume_id was not specified but it is required when building GetVolumeOutput",
)
})?,
farm_id: self.farm_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"farm_id",
"farm_id was not specified but it is required when building GetVolumeOutput",
)
})?,
fleet_id: self.fleet_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"fleet_id",
"fleet_id was not specified but it is required when building GetVolumeOutput",
)
})?,
state: self.state.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"state",
"state was not specified but it is required when building GetVolumeOutput",
)
})?,
size_gib: self.size_gib.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"size_gib",
"size_gib was not specified but it is required when building GetVolumeOutput",
)
})?,
availability_zone_id: self.availability_zone_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"availability_zone_id",
"availability_zone_id was not specified but it is required when building GetVolumeOutput",
)
})?,
attached_worker_id: self.attached_worker_id,
volume_type: self.volume_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"volume_type",
"volume_type was not specified but it is required when building GetVolumeOutput",
)
})?,
iops: self.iops,
throughput_mib: self.throughput_mib,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building GetVolumeOutput",
)
})?,
last_assigned_at: self.last_assigned_at,
last_released_at: self.last_released_at,
expires_at: self.expires_at,
_request_id: self._request_id,
})
}
}