#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetApplicationVersionOutput {
pub name: ::std::string::String,
pub application_version: i32,
pub description: ::std::option::Option<::std::string::String>,
pub definition_content: ::std::string::String,
pub status: crate::types::ApplicationVersionLifecycle,
pub creation_time: ::aws_smithy_types::DateTime,
pub status_reason: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetApplicationVersionOutput {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn application_version(&self) -> i32 {
self.application_version
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn definition_content(&self) -> &str {
use std::ops::Deref;
self.definition_content.deref()
}
pub fn status(&self) -> &crate::types::ApplicationVersionLifecycle {
&self.status
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
}
impl ::aws_types::request_id::RequestId for GetApplicationVersionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetApplicationVersionOutput {
pub fn builder() -> crate::operation::get_application_version::builders::GetApplicationVersionOutputBuilder {
crate::operation::get_application_version::builders::GetApplicationVersionOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetApplicationVersionOutputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) application_version: ::std::option::Option<i32>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) definition_content: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::ApplicationVersionLifecycle>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl GetApplicationVersionOutputBuilder {
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 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 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 definition_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.definition_content = ::std::option::Option::Some(input.into());
self
}
pub fn set_definition_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.definition_content = input;
self
}
pub fn get_definition_content(&self) -> &::std::option::Option<::std::string::String> {
&self.definition_content
}
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 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 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(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_application_version::GetApplicationVersionOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_application_version::GetApplicationVersionOutput {
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 GetApplicationVersionOutput",
)
})?,
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 GetApplicationVersionOutput",
)
})?,
description: self.description,
definition_content: self.definition_content.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"definition_content",
"definition_content was not specified but it is required when building GetApplicationVersionOutput",
)
})?,
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 GetApplicationVersionOutput",
)
})?,
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 GetApplicationVersionOutput",
)
})?,
status_reason: self.status_reason,
_request_id: self._request_id,
})
}
}