#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAttachedFileOutput {
pub file_arn: ::std::option::Option<::std::string::String>,
pub file_id: ::std::option::Option<::std::string::String>,
pub creation_time: ::std::option::Option<::std::string::String>,
pub file_status: ::std::option::Option<crate::types::FileStatusType>,
pub file_name: ::std::option::Option<::std::string::String>,
pub file_size_in_bytes: i64,
pub associated_resource_arn: ::std::option::Option<::std::string::String>,
pub file_use_case_type: ::std::option::Option<crate::types::FileUseCaseType>,
pub created_by: ::std::option::Option<crate::types::CreatedByInfo>,
pub download_url_metadata: ::std::option::Option<crate::types::DownloadUrlMetadata>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetAttachedFileOutput {
pub fn file_arn(&self) -> ::std::option::Option<&str> {
self.file_arn.as_deref()
}
pub fn file_id(&self) -> ::std::option::Option<&str> {
self.file_id.as_deref()
}
pub fn creation_time(&self) -> ::std::option::Option<&str> {
self.creation_time.as_deref()
}
pub fn file_status(&self) -> ::std::option::Option<&crate::types::FileStatusType> {
self.file_status.as_ref()
}
pub fn file_name(&self) -> ::std::option::Option<&str> {
self.file_name.as_deref()
}
pub fn file_size_in_bytes(&self) -> i64 {
self.file_size_in_bytes
}
pub fn associated_resource_arn(&self) -> ::std::option::Option<&str> {
self.associated_resource_arn.as_deref()
}
pub fn file_use_case_type(&self) -> ::std::option::Option<&crate::types::FileUseCaseType> {
self.file_use_case_type.as_ref()
}
pub fn created_by(&self) -> ::std::option::Option<&crate::types::CreatedByInfo> {
self.created_by.as_ref()
}
pub fn download_url_metadata(&self) -> ::std::option::Option<&crate::types::DownloadUrlMetadata> {
self.download_url_metadata.as_ref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetAttachedFileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAttachedFileOutput {
pub fn builder() -> crate::operation::get_attached_file::builders::GetAttachedFileOutputBuilder {
crate::operation::get_attached_file::builders::GetAttachedFileOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAttachedFileOutputBuilder {
pub(crate) file_arn: ::std::option::Option<::std::string::String>,
pub(crate) file_id: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::std::string::String>,
pub(crate) file_status: ::std::option::Option<crate::types::FileStatusType>,
pub(crate) file_name: ::std::option::Option<::std::string::String>,
pub(crate) file_size_in_bytes: ::std::option::Option<i64>,
pub(crate) associated_resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) file_use_case_type: ::std::option::Option<crate::types::FileUseCaseType>,
pub(crate) created_by: ::std::option::Option<crate::types::CreatedByInfo>,
pub(crate) download_url_metadata: ::std::option::Option<crate::types::DownloadUrlMetadata>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetAttachedFileOutputBuilder {
pub fn file_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_arn = input;
self
}
pub fn get_file_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.file_arn
}
pub fn file_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_id = input;
self
}
pub fn get_file_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_id
}
pub fn creation_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_time = ::std::option::Option::Some(input.into());
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_time
}
pub fn file_status(mut self, input: crate::types::FileStatusType) -> Self {
self.file_status = ::std::option::Option::Some(input);
self
}
pub fn set_file_status(mut self, input: ::std::option::Option<crate::types::FileStatusType>) -> Self {
self.file_status = input;
self
}
pub fn get_file_status(&self) -> &::std::option::Option<crate::types::FileStatusType> {
&self.file_status
}
pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_name = input;
self
}
pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
&self.file_name
}
pub fn file_size_in_bytes(mut self, input: i64) -> Self {
self.file_size_in_bytes = ::std::option::Option::Some(input);
self
}
pub fn set_file_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
self.file_size_in_bytes = input;
self
}
pub fn get_file_size_in_bytes(&self) -> &::std::option::Option<i64> {
&self.file_size_in_bytes
}
pub fn associated_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.associated_resource_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_associated_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.associated_resource_arn = input;
self
}
pub fn get_associated_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.associated_resource_arn
}
pub fn file_use_case_type(mut self, input: crate::types::FileUseCaseType) -> Self {
self.file_use_case_type = ::std::option::Option::Some(input);
self
}
pub fn set_file_use_case_type(mut self, input: ::std::option::Option<crate::types::FileUseCaseType>) -> Self {
self.file_use_case_type = input;
self
}
pub fn get_file_use_case_type(&self) -> &::std::option::Option<crate::types::FileUseCaseType> {
&self.file_use_case_type
}
pub fn created_by(mut self, input: crate::types::CreatedByInfo) -> Self {
self.created_by = ::std::option::Option::Some(input);
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<crate::types::CreatedByInfo>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<crate::types::CreatedByInfo> {
&self.created_by
}
pub fn download_url_metadata(mut self, input: crate::types::DownloadUrlMetadata) -> Self {
self.download_url_metadata = ::std::option::Option::Some(input);
self
}
pub fn set_download_url_metadata(mut self, input: ::std::option::Option<crate::types::DownloadUrlMetadata>) -> Self {
self.download_url_metadata = input;
self
}
pub fn get_download_url_metadata(&self) -> &::std::option::Option<crate::types::DownloadUrlMetadata> {
&self.download_url_metadata
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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_attached_file::GetAttachedFileOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_attached_file::GetAttachedFileOutput {
file_arn: self.file_arn,
file_id: self.file_id,
creation_time: self.creation_time,
file_status: self.file_status,
file_name: self.file_name,
file_size_in_bytes: self.file_size_in_bytes.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_size_in_bytes",
"file_size_in_bytes was not specified but it is required when building GetAttachedFileOutput",
)
})?,
associated_resource_arn: self.associated_resource_arn,
file_use_case_type: self.file_use_case_type,
created_by: self.created_by,
download_url_metadata: self.download_url_metadata,
tags: self.tags,
_request_id: self._request_id,
})
}
}