#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetReferenceMetadataOutput {
pub id: ::std::string::String,
pub arn: ::std::string::String,
pub reference_store_id: ::std::string::String,
pub md5: ::std::string::String,
pub status: ::std::option::Option<crate::types::ReferenceStatus>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub creation_time: ::aws_smithy_types::DateTime,
pub update_time: ::aws_smithy_types::DateTime,
pub files: ::std::option::Option<crate::types::ReferenceFiles>,
pub creation_type: ::std::option::Option<crate::types::ReferenceCreationType>,
pub creation_job_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetReferenceMetadataOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn reference_store_id(&self) -> &str {
use std::ops::Deref;
self.reference_store_id.deref()
}
pub fn md5(&self) -> &str {
use std::ops::Deref;
self.md5.deref()
}
pub fn status(&self) -> ::std::option::Option<&crate::types::ReferenceStatus> {
self.status.as_ref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
&self.update_time
}
pub fn files(&self) -> ::std::option::Option<&crate::types::ReferenceFiles> {
self.files.as_ref()
}
pub fn creation_type(&self) -> ::std::option::Option<&crate::types::ReferenceCreationType> {
self.creation_type.as_ref()
}
pub fn creation_job_id(&self) -> ::std::option::Option<&str> {
self.creation_job_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetReferenceMetadataOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetReferenceMetadataOutput {
pub fn builder() -> crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder {
crate::operation::get_reference_metadata::builders::GetReferenceMetadataOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetReferenceMetadataOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) reference_store_id: ::std::option::Option<::std::string::String>,
pub(crate) md5: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::ReferenceStatus>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) files: ::std::option::Option<crate::types::ReferenceFiles>,
pub(crate) creation_type: ::std::option::Option<crate::types::ReferenceCreationType>,
pub(crate) creation_job_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetReferenceMetadataOutputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn reference_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reference_store_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_reference_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reference_store_id = input;
self
}
pub fn get_reference_store_id(&self) -> &::std::option::Option<::std::string::String> {
&self.reference_store_id
}
pub fn md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.md5 = ::std::option::Option::Some(input.into());
self
}
pub fn set_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.md5 = input;
self
}
pub fn get_md5(&self) -> &::std::option::Option<::std::string::String> {
&self.md5
}
pub fn status(mut self, input: crate::types::ReferenceStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ReferenceStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::ReferenceStatus> {
&self.status
}
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 fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.update_time = ::std::option::Option::Some(input);
self
}
pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.update_time = input;
self
}
pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.update_time
}
pub fn files(mut self, input: crate::types::ReferenceFiles) -> Self {
self.files = ::std::option::Option::Some(input);
self
}
pub fn set_files(mut self, input: ::std::option::Option<crate::types::ReferenceFiles>) -> Self {
self.files = input;
self
}
pub fn get_files(&self) -> &::std::option::Option<crate::types::ReferenceFiles> {
&self.files
}
pub fn creation_type(mut self, input: crate::types::ReferenceCreationType) -> Self {
self.creation_type = ::std::option::Option::Some(input);
self
}
pub fn set_creation_type(mut self, input: ::std::option::Option<crate::types::ReferenceCreationType>) -> Self {
self.creation_type = input;
self
}
pub fn get_creation_type(&self) -> &::std::option::Option<crate::types::ReferenceCreationType> {
&self.creation_type
}
pub fn creation_job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_job_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_creation_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_job_id = input;
self
}
pub fn get_creation_job_id(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_job_id
}
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_reference_metadata::GetReferenceMetadataOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_reference_metadata::GetReferenceMetadataOutput {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
reference_store_id: self.reference_store_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"reference_store_id",
"reference_store_id was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
md5: self.md5.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"md5",
"md5 was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
status: self.status,
name: self.name,
description: self.description,
creation_time: self.creation_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_time",
"creation_time was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
update_time: self.update_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"update_time",
"update_time was not specified but it is required when building GetReferenceMetadataOutput",
)
})?,
files: self.files,
creation_type: self.creation_type,
creation_job_id: self.creation_job_id,
_request_id: self._request_id,
})
}
}