#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAccessPointOutput {
pub access_point_arn: ::std::string::String,
pub access_point_id: ::std::string::String,
pub client_token: ::std::string::String,
pub file_system_id: ::std::string::String,
pub status: crate::types::LifeCycleState,
pub owner_id: ::std::string::String,
pub posix_user: ::std::option::Option<crate::types::PosixUser>,
pub root_directory: ::std::option::Option<crate::types::RootDirectory>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub name: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetAccessPointOutput {
pub fn access_point_arn(&self) -> &str {
use std::ops::Deref;
self.access_point_arn.deref()
}
pub fn access_point_id(&self) -> &str {
use std::ops::Deref;
self.access_point_id.deref()
}
pub fn client_token(&self) -> &str {
use std::ops::Deref;
self.client_token.deref()
}
pub fn file_system_id(&self) -> &str {
use std::ops::Deref;
self.file_system_id.deref()
}
pub fn status(&self) -> &crate::types::LifeCycleState {
&self.status
}
pub fn owner_id(&self) -> &str {
use std::ops::Deref;
self.owner_id.deref()
}
pub fn posix_user(&self) -> ::std::option::Option<&crate::types::PosixUser> {
self.posix_user.as_ref()
}
pub fn root_directory(&self) -> ::std::option::Option<&crate::types::RootDirectory> {
self.root_directory.as_ref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetAccessPointOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAccessPointOutput {
pub fn builder() -> crate::operation::get_access_point::builders::GetAccessPointOutputBuilder {
crate::operation::get_access_point::builders::GetAccessPointOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccessPointOutputBuilder {
pub(crate) access_point_arn: ::std::option::Option<::std::string::String>,
pub(crate) access_point_id: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::LifeCycleState>,
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) posix_user: ::std::option::Option<crate::types::PosixUser>,
pub(crate) root_directory: ::std::option::Option<crate::types::RootDirectory>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) name: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetAccessPointOutputBuilder {
pub fn access_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_point_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_access_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.access_point_arn = input;
self
}
pub fn get_access_point_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.access_point_arn
}
pub fn access_point_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.access_point_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_access_point_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.access_point_id = input;
self
}
pub fn get_access_point_id(&self) -> &::std::option::Option<::std::string::String> {
&self.access_point_id
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_system_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_system_id = input;
self
}
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
pub fn status(mut self, input: crate::types::LifeCycleState) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::LifeCycleState>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::LifeCycleState> {
&self.status
}
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
pub fn posix_user(mut self, input: crate::types::PosixUser) -> Self {
self.posix_user = ::std::option::Option::Some(input);
self
}
pub fn set_posix_user(mut self, input: ::std::option::Option<crate::types::PosixUser>) -> Self {
self.posix_user = input;
self
}
pub fn get_posix_user(&self) -> &::std::option::Option<crate::types::PosixUser> {
&self.posix_user
}
pub fn root_directory(mut self, input: crate::types::RootDirectory) -> Self {
self.root_directory = ::std::option::Option::Some(input);
self
}
pub fn set_root_directory(mut self, input: ::std::option::Option<crate::types::RootDirectory>) -> Self {
self.root_directory = input;
self
}
pub fn get_root_directory(&self) -> &::std::option::Option<crate::types::RootDirectory> {
&self.root_directory
}
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 name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
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_access_point::GetAccessPointOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_access_point::GetAccessPointOutput {
access_point_arn: self.access_point_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"access_point_arn",
"access_point_arn was not specified but it is required when building GetAccessPointOutput",
)
})?,
access_point_id: self.access_point_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"access_point_id",
"access_point_id was not specified but it is required when building GetAccessPointOutput",
)
})?,
client_token: self.client_token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"client_token",
"client_token was not specified but it is required when building GetAccessPointOutput",
)
})?,
file_system_id: self.file_system_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_system_id",
"file_system_id was not specified but it is required when building GetAccessPointOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building GetAccessPointOutput",
)
})?,
owner_id: self.owner_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"owner_id",
"owner_id was not specified but it is required when building GetAccessPointOutput",
)
})?,
posix_user: self.posix_user,
root_directory: self.root_directory,
tags: self.tags,
name: self.name,
_request_id: self._request_id,
})
}
}