#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ApplicationVersionSummary {
pub application_version: i32,
pub status: crate::types::ApplicationVersionLifecycle,
pub status_reason: ::std::option::Option<::std::string::String>,
pub creation_time: ::aws_smithy_types::DateTime,
}
impl ApplicationVersionSummary {
pub fn application_version(&self) -> i32 {
self.application_version
}
pub fn status(&self) -> &crate::types::ApplicationVersionLifecycle {
&self.status
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
}
impl ApplicationVersionSummary {
pub fn builder() -> crate::types::builders::ApplicationVersionSummaryBuilder {
crate::types::builders::ApplicationVersionSummaryBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ApplicationVersionSummaryBuilder {
pub(crate) application_version: ::std::option::Option<i32>,
pub(crate) status: ::std::option::Option<crate::types::ApplicationVersionLifecycle>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ApplicationVersionSummaryBuilder {
pub fn application_version(mut self, input: i32) -> Self {
self.application_version = ::std::option::Option::Some(input);
self
}
pub fn set_application_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.application_version = input;
self
}
pub fn get_application_version(&self) -> &::std::option::Option<i32> {
&self.application_version
}
pub fn status(mut self, input: crate::types::ApplicationVersionLifecycle) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ApplicationVersionLifecycle>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::ApplicationVersionLifecycle> {
&self.status
}
pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
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 build(self) -> ::std::result::Result<crate::types::ApplicationVersionSummary, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::ApplicationVersionSummary {
application_version: self.application_version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"application_version",
"application_version was not specified but it is required when building ApplicationVersionSummary",
)
})?,
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 ApplicationVersionSummary",
)
})?,
status_reason: self.status_reason,
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 ApplicationVersionSummary",
)
})?,
})
}
}