#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RefResource {
pub name: ::std::string::String,
pub r#type: ::std::string::String,
pub arn: ::std::option::Option<::std::string::String>,
pub status: ::std::option::Option<::std::string::String>,
pub start_time: ::std::option::Option<::std::string::String>,
pub end_time: ::std::option::Option<::std::string::String>,
pub last_updated_on: ::std::option::Option<::std::string::String>,
}
impl RefResource {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn r#type(&self) -> &str {
use std::ops::Deref;
self.r#type.deref()
}
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn status(&self) -> ::std::option::Option<&str> {
self.status.as_deref()
}
pub fn start_time(&self) -> ::std::option::Option<&str> {
self.start_time.as_deref()
}
pub fn end_time(&self) -> ::std::option::Option<&str> {
self.end_time.as_deref()
}
pub fn last_updated_on(&self) -> ::std::option::Option<&str> {
self.last_updated_on.as_deref()
}
}
impl RefResource {
pub fn builder() -> crate::types::builders::RefResourceBuilder {
crate::types::builders::RefResourceBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RefResourceBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<::std::string::String>,
pub(crate) start_time: ::std::option::Option<::std::string::String>,
pub(crate) end_time: ::std::option::Option<::std::string::String>,
pub(crate) last_updated_on: ::std::option::Option<::std::string::String>,
}
impl RefResourceBuilder {
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 r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
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 status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status = ::std::option::Option::Some(input.into());
self
}
pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
&self.status
}
pub fn start_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.start_time = ::std::option::Option::Some(input.into());
self
}
pub fn set_start_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.start_time = input;
self
}
pub fn get_start_time(&self) -> &::std::option::Option<::std::string::String> {
&self.start_time
}
pub fn end_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.end_time = ::std::option::Option::Some(input.into());
self
}
pub fn set_end_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.end_time = input;
self
}
pub fn get_end_time(&self) -> &::std::option::Option<::std::string::String> {
&self.end_time
}
pub fn last_updated_on(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_updated_on = ::std::option::Option::Some(input.into());
self
}
pub fn set_last_updated_on(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_updated_on = input;
self
}
pub fn get_last_updated_on(&self) -> &::std::option::Option<::std::string::String> {
&self.last_updated_on
}
pub fn build(self) -> ::std::result::Result<crate::types::RefResource, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::RefResource {
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building RefResource",
)
})?,
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building RefResource",
)
})?,
arn: self.arn,
status: self.status,
start_time: self.start_time,
end_time: self.end_time,
last_updated_on: self.last_updated_on,
})
}
}