#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetResourceTargetOutput {
pub arn: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub external_identifier: ::std::option::Option<::std::string::String>,
pub external_name: ::std::option::Option<::std::string::String>,
pub last_synced_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub name: ::std::option::Option<::std::string::String>,
pub provider_arn: ::std::string::String,
pub provider_type: crate::types::ResourceProviderType,
pub status: crate::types::ResourceTargetStatus,
pub status_message: ::std::option::Option<::std::string::String>,
pub target_configuration: ::std::option::Option<crate::types::ResourceTargetConfiguration>,
pub target_configuration_source: crate::types::ResourceTargetConfigurationSource,
pub target_metadata: ::std::option::Option<crate::types::ResourceTargetMetadata>,
pub target_type: crate::types::ResourceTargetType,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetResourceTargetOutput {
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn external_identifier(&self) -> ::std::option::Option<&str> {
self.external_identifier.as_deref()
}
pub fn external_name(&self) -> ::std::option::Option<&str> {
self.external_name.as_deref()
}
pub fn last_synced_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_synced_at.as_ref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn provider_arn(&self) -> &str {
use std::ops::Deref;
self.provider_arn.deref()
}
pub fn provider_type(&self) -> &crate::types::ResourceProviderType {
&self.provider_type
}
pub fn status(&self) -> &crate::types::ResourceTargetStatus {
&self.status
}
pub fn status_message(&self) -> ::std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn target_configuration(&self) -> ::std::option::Option<&crate::types::ResourceTargetConfiguration> {
self.target_configuration.as_ref()
}
pub fn target_configuration_source(&self) -> &crate::types::ResourceTargetConfigurationSource {
&self.target_configuration_source
}
pub fn target_metadata(&self) -> ::std::option::Option<&crate::types::ResourceTargetMetadata> {
self.target_metadata.as_ref()
}
pub fn target_type(&self) -> &crate::types::ResourceTargetType {
&self.target_type
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetResourceTargetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetResourceTargetOutput {
pub fn builder() -> crate::operation::get_resource_target::builders::GetResourceTargetOutputBuilder {
crate::operation::get_resource_target::builders::GetResourceTargetOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetResourceTargetOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) external_identifier: ::std::option::Option<::std::string::String>,
pub(crate) external_name: ::std::option::Option<::std::string::String>,
pub(crate) last_synced_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) provider_arn: ::std::option::Option<::std::string::String>,
pub(crate) provider_type: ::std::option::Option<crate::types::ResourceProviderType>,
pub(crate) status: ::std::option::Option<crate::types::ResourceTargetStatus>,
pub(crate) status_message: ::std::option::Option<::std::string::String>,
pub(crate) target_configuration: ::std::option::Option<crate::types::ResourceTargetConfiguration>,
pub(crate) target_configuration_source: ::std::option::Option<crate::types::ResourceTargetConfigurationSource>,
pub(crate) target_metadata: ::std::option::Option<crate::types::ResourceTargetMetadata>,
pub(crate) target_type: ::std::option::Option<crate::types::ResourceTargetType>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetResourceTargetOutputBuilder {
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 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 external_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.external_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_external_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.external_identifier = input;
self
}
pub fn get_external_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.external_identifier
}
pub fn external_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.external_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_external_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.external_name = input;
self
}
pub fn get_external_name(&self) -> &::std::option::Option<::std::string::String> {
&self.external_name
}
pub fn last_synced_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_synced_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_synced_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_synced_at = input;
self
}
pub fn get_last_synced_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_synced_at
}
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 provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.provider_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.provider_arn = input;
self
}
pub fn get_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.provider_arn
}
pub fn provider_type(mut self, input: crate::types::ResourceProviderType) -> Self {
self.provider_type = ::std::option::Option::Some(input);
self
}
pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ResourceProviderType>) -> Self {
self.provider_type = input;
self
}
pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ResourceProviderType> {
&self.provider_type
}
pub fn status(mut self, input: crate::types::ResourceTargetStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ResourceTargetStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::ResourceTargetStatus> {
&self.status
}
pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_message = input;
self
}
pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.status_message
}
pub fn target_configuration(mut self, input: crate::types::ResourceTargetConfiguration) -> Self {
self.target_configuration = ::std::option::Option::Some(input);
self
}
pub fn set_target_configuration(mut self, input: ::std::option::Option<crate::types::ResourceTargetConfiguration>) -> Self {
self.target_configuration = input;
self
}
pub fn get_target_configuration(&self) -> &::std::option::Option<crate::types::ResourceTargetConfiguration> {
&self.target_configuration
}
pub fn target_configuration_source(mut self, input: crate::types::ResourceTargetConfigurationSource) -> Self {
self.target_configuration_source = ::std::option::Option::Some(input);
self
}
pub fn set_target_configuration_source(mut self, input: ::std::option::Option<crate::types::ResourceTargetConfigurationSource>) -> Self {
self.target_configuration_source = input;
self
}
pub fn get_target_configuration_source(&self) -> &::std::option::Option<crate::types::ResourceTargetConfigurationSource> {
&self.target_configuration_source
}
pub fn target_metadata(mut self, input: crate::types::ResourceTargetMetadata) -> Self {
self.target_metadata = ::std::option::Option::Some(input);
self
}
pub fn set_target_metadata(mut self, input: ::std::option::Option<crate::types::ResourceTargetMetadata>) -> Self {
self.target_metadata = input;
self
}
pub fn get_target_metadata(&self) -> &::std::option::Option<crate::types::ResourceTargetMetadata> {
&self.target_metadata
}
pub fn target_type(mut self, input: crate::types::ResourceTargetType) -> Self {
self.target_type = ::std::option::Option::Some(input);
self
}
pub fn set_target_type(mut self, input: ::std::option::Option<crate::types::ResourceTargetType>) -> Self {
self.target_type = input;
self
}
pub fn get_target_type(&self) -> &::std::option::Option<crate::types::ResourceTargetType> {
&self.target_type
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_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_resource_target::GetResourceTargetOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_resource_target::GetResourceTargetOutput {
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 GetResourceTargetOutput",
)
})?,
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 GetResourceTargetOutput",
)
})?,
external_identifier: self.external_identifier,
external_name: self.external_name,
last_synced_at: self.last_synced_at,
name: self.name,
provider_arn: self.provider_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"provider_arn",
"provider_arn was not specified but it is required when building GetResourceTargetOutput",
)
})?,
provider_type: self.provider_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"provider_type",
"provider_type was not specified but it is required when building GetResourceTargetOutput",
)
})?,
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 GetResourceTargetOutput",
)
})?,
status_message: self.status_message,
target_configuration: self.target_configuration,
target_configuration_source: self.target_configuration_source.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"target_configuration_source",
"target_configuration_source was not specified but it is required when building GetResourceTargetOutput",
)
})?,
target_metadata: self.target_metadata,
target_type: self.target_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"target_type",
"target_type was not specified but it is required when building GetResourceTargetOutput",
)
})?,
updated_at: self.updated_at,
_request_id: self._request_id,
})
}
}