#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateComponentVersionOutput {
pub arn: ::std::option::Option<::std::string::String>,
pub component_name: ::std::string::String,
pub component_version: ::std::string::String,
pub creation_timestamp: ::aws_smithy_types::DateTime,
pub status: ::std::option::Option<crate::types::CloudComponentStatus>,
_request_id: Option<String>,
}
impl CreateComponentVersionOutput {
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn component_name(&self) -> &str {
use std::ops::Deref;
self.component_name.deref()
}
pub fn component_version(&self) -> &str {
use std::ops::Deref;
self.component_version.deref()
}
pub fn creation_timestamp(&self) -> &::aws_smithy_types::DateTime {
&self.creation_timestamp
}
pub fn status(&self) -> ::std::option::Option<&crate::types::CloudComponentStatus> {
self.status.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateComponentVersionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateComponentVersionOutput {
pub fn builder() -> crate::operation::create_component_version::builders::CreateComponentVersionOutputBuilder {
crate::operation::create_component_version::builders::CreateComponentVersionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateComponentVersionOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) component_name: ::std::option::Option<::std::string::String>,
pub(crate) component_version: ::std::option::Option<::std::string::String>,
pub(crate) creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::CloudComponentStatus>,
_request_id: Option<String>,
}
impl CreateComponentVersionOutputBuilder {
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 component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.component_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.component_name = input;
self
}
pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
&self.component_name
}
pub fn component_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.component_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_component_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.component_version = input;
self
}
pub fn get_component_version(&self) -> &::std::option::Option<::std::string::String> {
&self.component_version
}
pub fn creation_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_timestamp = ::std::option::Option::Some(input);
self
}
pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_timestamp = input;
self
}
pub fn get_creation_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_timestamp
}
pub fn status(mut self, input: crate::types::CloudComponentStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::CloudComponentStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::CloudComponentStatus> {
&self.status
}
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::create_component_version::CreateComponentVersionOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_component_version::CreateComponentVersionOutput {
arn: self.arn,
component_name: self.component_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"component_name",
"component_name was not specified but it is required when building CreateComponentVersionOutput",
)
})?,
component_version: self.component_version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"component_version",
"component_version was not specified but it is required when building CreateComponentVersionOutput",
)
})?,
creation_timestamp: self.creation_timestamp.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_timestamp",
"creation_timestamp was not specified but it is required when building CreateComponentVersionOutput",
)
})?,
status: self.status,
_request_id: self._request_id,
})
}
}