aws_sdk_datazone/operation/create_project/
_create_project_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateProjectInput {
pub domain_identifier: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
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>>,
}
impl CreateProjectInput {
pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
self.domain_identifier.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
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()
}
}
impl ::std::fmt::Debug for CreateProjectInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateProjectInput");
formatter.field("domain_identifier", &self.domain_identifier);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
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.finish()
}
}
impl CreateProjectInput {
pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
crate::operation::create_project::builders::CreateProjectInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateProjectInputBuilder {
pub(crate) domain_identifier: ::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) 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>>,
}
impl CreateProjectInputBuilder {
pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_identifier = input;
self
}
pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_identifier
}
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 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 build(
self,
) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
domain_identifier: self.domain_identifier,
name: self.name,
description: self.description,
glossary_terms: self.glossary_terms,
domain_unit_id: self.domain_unit_id,
project_profile_id: self.project_profile_id,
user_parameters: self.user_parameters,
})
}
}
impl ::std::fmt::Debug for CreateProjectInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateProjectInputBuilder");
formatter.field("domain_identifier", &self.domain_identifier);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
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.finish()
}
}