#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeProjectOutput {
pub project_id: ::std::string::String,
pub project_arn: ::std::string::String,
pub project_name: ::std::string::String,
pub portal_id: ::std::string::String,
pub project_description: ::std::option::Option<::std::string::String>,
pub project_creation_date: ::aws_smithy_types::DateTime,
pub project_last_update_date: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl DescribeProjectOutput {
pub fn project_id(&self) -> &str {
use std::ops::Deref;
self.project_id.deref()
}
pub fn project_arn(&self) -> &str {
use std::ops::Deref;
self.project_arn.deref()
}
pub fn project_name(&self) -> &str {
use std::ops::Deref;
self.project_name.deref()
}
pub fn portal_id(&self) -> &str {
use std::ops::Deref;
self.portal_id.deref()
}
pub fn project_description(&self) -> ::std::option::Option<&str> {
self.project_description.as_deref()
}
pub fn project_creation_date(&self) -> &::aws_smithy_types::DateTime {
&self.project_creation_date
}
pub fn project_last_update_date(&self) -> &::aws_smithy_types::DateTime {
&self.project_last_update_date
}
}
impl ::aws_types::request_id::RequestId for DescribeProjectOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeProjectOutput {
pub fn builder() -> crate::operation::describe_project::builders::DescribeProjectOutputBuilder {
crate::operation::describe_project::builders::DescribeProjectOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeProjectOutputBuilder {
pub(crate) project_id: ::std::option::Option<::std::string::String>,
pub(crate) project_arn: ::std::option::Option<::std::string::String>,
pub(crate) project_name: ::std::option::Option<::std::string::String>,
pub(crate) portal_id: ::std::option::Option<::std::string::String>,
pub(crate) project_description: ::std::option::Option<::std::string::String>,
pub(crate) project_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) project_last_update_date: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl DescribeProjectOutputBuilder {
pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_id = input;
self
}
pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.project_id
}
pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_arn = input;
self
}
pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.project_arn
}
pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_name = input;
self
}
pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
&self.project_name
}
pub fn portal_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.portal_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_portal_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.portal_id = input;
self
}
pub fn get_portal_id(&self) -> &::std::option::Option<::std::string::String> {
&self.portal_id
}
pub fn project_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_description = input;
self
}
pub fn get_project_description(&self) -> &::std::option::Option<::std::string::String> {
&self.project_description
}
pub fn project_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.project_creation_date = ::std::option::Option::Some(input);
self
}
pub fn set_project_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.project_creation_date = input;
self
}
pub fn get_project_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.project_creation_date
}
pub fn project_last_update_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.project_last_update_date = ::std::option::Option::Some(input);
self
}
pub fn set_project_last_update_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.project_last_update_date = input;
self
}
pub fn get_project_last_update_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.project_last_update_date
}
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::describe_project::DescribeProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_project::DescribeProjectOutput {
project_id: self.project_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_id",
"project_id was not specified but it is required when building DescribeProjectOutput",
)
})?,
project_arn: self.project_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_arn",
"project_arn was not specified but it is required when building DescribeProjectOutput",
)
})?,
project_name: self.project_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_name",
"project_name was not specified but it is required when building DescribeProjectOutput",
)
})?,
portal_id: self.portal_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"portal_id",
"portal_id was not specified but it is required when building DescribeProjectOutput",
)
})?,
project_description: self.project_description,
project_creation_date: self.project_creation_date.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_creation_date",
"project_creation_date was not specified but it is required when building DescribeProjectOutput",
)
})?,
project_last_update_date: self.project_last_update_date.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_last_update_date",
"project_last_update_date was not specified but it is required when building DescribeProjectOutput",
)
})?,
_request_id: self._request_id,
})
}
}