aws_sdk_datazone/operation/update_project/
_update_project_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateProjectOutput {
pub domain_id: ::std::string::String,
pub id: ::std::string::String,
pub name: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub project_status: ::std::option::Option<crate::types::ProjectStatus>,
pub failure_reasons: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>,
pub created_by: ::std::string::String,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub domain_unit_id: ::std::option::Option<::std::string::String>,
pub project_profile_id: ::std::option::Option<::std::string::String>,
pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
pub environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
_request_id: Option<String>,
}
impl UpdateProjectOutput {
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn project_status(&self) -> ::std::option::Option<&crate::types::ProjectStatus> {
self.project_status.as_ref()
}
pub fn failure_reasons(&self) -> &[crate::types::ProjectDeletionError] {
self.failure_reasons.as_deref().unwrap_or_default()
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
pub fn glossary_terms(&self) -> &[::std::string::String] {
self.glossary_terms.as_deref().unwrap_or_default()
}
pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
self.domain_unit_id.as_deref()
}
pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
self.project_profile_id.as_deref()
}
pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
self.user_parameters.as_deref().unwrap_or_default()
}
pub fn environment_deployment_details(&self) -> ::std::option::Option<&crate::types::EnvironmentDeploymentDetails> {
self.environment_deployment_details.as_ref()
}
}
impl ::std::fmt::Debug for UpdateProjectOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateProjectOutput");
formatter.field("domain_id", &self.domain_id);
formatter.field("id", &self.id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("project_status", &self.project_status);
formatter.field("failure_reasons", &self.failure_reasons);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("domain_unit_id", &self.domain_unit_id);
formatter.field("project_profile_id", &self.project_profile_id);
formatter.field("user_parameters", &self.user_parameters);
formatter.field("environment_deployment_details", &self.environment_deployment_details);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for UpdateProjectOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateProjectOutput {
pub fn builder() -> crate::operation::update_project::builders::UpdateProjectOutputBuilder {
crate::operation::update_project::builders::UpdateProjectOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateProjectOutputBuilder {
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) project_status: ::std::option::Option<crate::types::ProjectStatus>,
pub(crate) failure_reasons: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) domain_unit_id: ::std::option::Option<::std::string::String>,
pub(crate) project_profile_id: ::std::option::Option<::std::string::String>,
pub(crate) user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
pub(crate) environment_deployment_details: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>,
_request_id: Option<String>,
}
impl UpdateProjectOutputBuilder {
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
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 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 project_status(mut self, input: crate::types::ProjectStatus) -> Self {
self.project_status = ::std::option::Option::Some(input);
self
}
pub fn set_project_status(mut self, input: ::std::option::Option<crate::types::ProjectStatus>) -> Self {
self.project_status = input;
self
}
pub fn get_project_status(&self) -> &::std::option::Option<crate::types::ProjectStatus> {
&self.project_status
}
pub fn failure_reasons(mut self, input: crate::types::ProjectDeletionError) -> Self {
let mut v = self.failure_reasons.unwrap_or_default();
v.push(input);
self.failure_reasons = ::std::option::Option::Some(v);
self
}
pub fn set_failure_reasons(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>>) -> Self {
self.failure_reasons = input;
self
}
pub fn get_failure_reasons(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectDeletionError>> {
&self.failure_reasons
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
pub fn glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.glossary_terms.unwrap_or_default();
v.push(input.into());
self.glossary_terms = ::std::option::Option::Some(v);
self
}
pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.glossary_terms = input;
self
}
pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.glossary_terms
}
pub fn domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_unit_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_unit_id = input;
self
}
pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_unit_id
}
pub fn project_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_profile_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_profile_id = input;
self
}
pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
&self.project_profile_id
}
pub fn user_parameters(mut self, input: crate::types::EnvironmentConfigurationUserParameter) -> Self {
let mut v = self.user_parameters.unwrap_or_default();
v.push(input);
self.user_parameters = ::std::option::Option::Some(v);
self
}
pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
self.user_parameters = input;
self
}
pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
&self.user_parameters
}
pub fn environment_deployment_details(mut self, input: crate::types::EnvironmentDeploymentDetails) -> Self {
self.environment_deployment_details = ::std::option::Option::Some(input);
self
}
pub fn set_environment_deployment_details(mut self, input: ::std::option::Option<crate::types::EnvironmentDeploymentDetails>) -> Self {
self.environment_deployment_details = input;
self
}
pub fn get_environment_deployment_details(&self) -> &::std::option::Option<crate::types::EnvironmentDeploymentDetails> {
&self.environment_deployment_details
}
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::update_project::UpdateProjectOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_project::UpdateProjectOutput {
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building UpdateProjectOutput",
)
})?,
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building UpdateProjectOutput",
)
})?,
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 UpdateProjectOutput",
)
})?,
description: self.description,
project_status: self.project_status,
failure_reasons: self.failure_reasons,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building UpdateProjectOutput",
)
})?,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
glossary_terms: self.glossary_terms,
domain_unit_id: self.domain_unit_id,
project_profile_id: self.project_profile_id,
user_parameters: self.user_parameters,
environment_deployment_details: self.environment_deployment_details,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for UpdateProjectOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateProjectOutputBuilder");
formatter.field("domain_id", &self.domain_id);
formatter.field("id", &self.id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("project_status", &self.project_status);
formatter.field("failure_reasons", &self.failure_reasons);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("glossary_terms", &self.glossary_terms);
formatter.field("domain_unit_id", &self.domain_unit_id);
formatter.field("project_profile_id", &self.project_profile_id);
formatter.field("user_parameters", &self.user_parameters);
formatter.field("environment_deployment_details", &self.environment_deployment_details);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}