aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateProjectInput {
    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Amazon DataZone project.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the Amazon DataZone project.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The resource tags of the project.</p>
    pub resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
    pub glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
    pub domain_unit_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the project profile.</p>
    pub project_profile_id: ::std::option::Option<::std::string::String>,
    /// <p>The user parameters of the project.</p>
    pub user_parameters: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>,
    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
    pub project_category: ::std::option::Option<::std::string::String>,
    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
    pub project_execution_role: ::std::option::Option<::std::string::String>,
    /// <p>The members to be assigned to the project.</p>
    pub membership_assignments: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>,
}
impl CreateProjectInput {
    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The name of the Amazon DataZone project.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the Amazon DataZone project.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The resource tags of the project.</p>
    pub fn resource_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.resource_tags.as_ref()
    }
    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.glossary_terms.is_none()`.
    pub fn glossary_terms(&self) -> &[::std::string::String] {
        self.glossary_terms.as_deref().unwrap_or_default()
    }
    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
    pub fn domain_unit_id(&self) -> ::std::option::Option<&str> {
        self.domain_unit_id.as_deref()
    }
    /// <p>The ID of the project profile.</p>
    pub fn project_profile_id(&self) -> ::std::option::Option<&str> {
        self.project_profile_id.as_deref()
    }
    /// <p>The user parameters of the project.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_parameters.is_none()`.
    pub fn user_parameters(&self) -> &[crate::types::EnvironmentConfigurationUserParameter] {
        self.user_parameters.as_deref().unwrap_or_default()
    }
    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
    pub fn project_category(&self) -> ::std::option::Option<&str> {
        self.project_category.as_deref()
    }
    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
    pub fn project_execution_role(&self) -> ::std::option::Option<&str> {
        self.project_execution_role.as_deref()
    }
    /// <p>The members to be assigned to the project.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.membership_assignments.is_none()`.
    pub fn membership_assignments(&self) -> &[crate::types::ProjectMembershipAssignment] {
        self.membership_assignments.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("resource_tags", &self.resource_tags);
        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("project_category", &self.project_category);
        formatter.field("project_execution_role", &self.project_execution_role);
        formatter.field("membership_assignments", &self.membership_assignments);
        formatter.finish()
    }
}
impl CreateProjectInput {
    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
    }
}

/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
#[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) resource_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::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>>,
    pub(crate) project_category: ::std::option::Option<::std::string::String>,
    pub(crate) project_execution_role: ::std::option::Option<::std::string::String>,
    pub(crate) membership_assignments: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>,
}
impl CreateProjectInputBuilder {
    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
    /// This field is required.
    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
    }
    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the Amazon DataZone domain in which this project is created.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The name of the Amazon DataZone project.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon DataZone project.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the Amazon DataZone project.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the Amazon DataZone project.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the Amazon DataZone project.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the Amazon DataZone project.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Adds a key-value pair to `resource_tags`.
    ///
    /// To override the contents of this collection use [`set_resource_tags`](Self::set_resource_tags).
    ///
    /// <p>The resource tags of the project.</p>
    pub fn resource_tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.resource_tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.resource_tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The resource tags of the project.</p>
    pub fn set_resource_tags(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.resource_tags = input;
        self
    }
    /// <p>The resource tags of the project.</p>
    pub fn get_resource_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.resource_tags
    }
    /// Appends an item to `glossary_terms`.
    ///
    /// To override the contents of this collection use [`set_glossary_terms`](Self::set_glossary_terms).
    ///
    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
    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
    }
    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
    pub fn set_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.glossary_terms = input;
        self
    }
    /// <p>The glossary terms that can be used in this Amazon DataZone project.</p>
    pub fn get_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.glossary_terms
    }
    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
    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
    }
    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
    pub fn set_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_unit_id = input;
        self
    }
    /// <p>The ID of the domain unit. This parameter is not required and if it is not specified, then the project is created at the root domain unit level.</p>
    pub fn get_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_unit_id
    }
    /// <p>The ID of the project profile.</p>
    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
    }
    /// <p>The ID of the project profile.</p>
    pub fn set_project_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_profile_id = input;
        self
    }
    /// <p>The ID of the project profile.</p>
    pub fn get_project_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_profile_id
    }
    /// Appends an item to `user_parameters`.
    ///
    /// To override the contents of this collection use [`set_user_parameters`](Self::set_user_parameters).
    ///
    /// <p>The user parameters of the project.</p>
    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
    }
    /// <p>The user parameters of the project.</p>
    pub fn set_user_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>>) -> Self {
        self.user_parameters = input;
        self
    }
    /// <p>The user parameters of the project.</p>
    pub fn get_user_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentConfigurationUserParameter>> {
        &self.user_parameters
    }
    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
    pub fn project_category(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_category = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
    pub fn set_project_category(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_category = input;
        self
    }
    /// <p>The category of the project. Set to 'ADMIN' designates this as an administrative project for the Amazon DataZone domain.</p>
    pub fn get_project_category(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_category
    }
    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
    pub fn project_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_execution_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
    pub fn set_project_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_execution_role = input;
        self
    }
    /// <p>The default project IAM role that is used to access project resources and run computes such as Glue and Sagemaker.</p>
    pub fn get_project_execution_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_execution_role
    }
    /// Appends an item to `membership_assignments`.
    ///
    /// To override the contents of this collection use [`set_membership_assignments`](Self::set_membership_assignments).
    ///
    /// <p>The members to be assigned to the project.</p>
    pub fn membership_assignments(mut self, input: crate::types::ProjectMembershipAssignment) -> Self {
        let mut v = self.membership_assignments.unwrap_or_default();
        v.push(input);
        self.membership_assignments = ::std::option::Option::Some(v);
        self
    }
    /// <p>The members to be assigned to the project.</p>
    pub fn set_membership_assignments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>>) -> Self {
        self.membership_assignments = input;
        self
    }
    /// <p>The members to be assigned to the project.</p>
    pub fn get_membership_assignments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProjectMembershipAssignment>> {
        &self.membership_assignments
    }
    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
    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,
            resource_tags: self.resource_tags,
            glossary_terms: self.glossary_terms,
            domain_unit_id: self.domain_unit_id,
            project_profile_id: self.project_profile_id,
            user_parameters: self.user_parameters,
            project_category: self.project_category,
            project_execution_role: self.project_execution_role,
            membership_assignments: self.membership_assignments,
        })
    }
}
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("resource_tags", &self.resource_tags);
        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("project_category", &self.project_category);
        formatter.field("project_execution_role", &self.project_execution_role);
        formatter.field("membership_assignments", &self.membership_assignments);
        formatter.finish()
    }
}