aws_sdk_sagemaker/operation/create_project/
_create_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProjectInput {
6    /// <p>The name of the project.</p>
7    pub project_name: ::std::option::Option<::std::string::String>,
8    /// <p>A description for the project.</p>
9    pub project_description: ::std::option::Option<::std::string::String>,
10    /// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
11    pub service_catalog_provisioning_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>,
12    /// <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
13    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
14}
15impl CreateProjectInput {
16    /// <p>The name of the project.</p>
17    pub fn project_name(&self) -> ::std::option::Option<&str> {
18        self.project_name.as_deref()
19    }
20    /// <p>A description for the project.</p>
21    pub fn project_description(&self) -> ::std::option::Option<&str> {
22        self.project_description.as_deref()
23    }
24    /// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
25    pub fn service_catalog_provisioning_details(&self) -> ::std::option::Option<&crate::types::ServiceCatalogProvisioningDetails> {
26        self.service_catalog_provisioning_details.as_ref()
27    }
28    /// <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
29    ///
30    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
31    pub fn tags(&self) -> &[crate::types::Tag] {
32        self.tags.as_deref().unwrap_or_default()
33    }
34}
35impl CreateProjectInput {
36    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
37    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
38        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
39    }
40}
41
42/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateProjectInputBuilder {
46    pub(crate) project_name: ::std::option::Option<::std::string::String>,
47    pub(crate) project_description: ::std::option::Option<::std::string::String>,
48    pub(crate) service_catalog_provisioning_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>,
49    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
50}
51impl CreateProjectInputBuilder {
52    /// <p>The name of the project.</p>
53    /// This field is required.
54    pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.project_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The name of the project.</p>
59    pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.project_name = input;
61        self
62    }
63    /// <p>The name of the project.</p>
64    pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.project_name
66    }
67    /// <p>A description for the project.</p>
68    pub fn project_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.project_description = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>A description for the project.</p>
73    pub fn set_project_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.project_description = input;
75        self
76    }
77    /// <p>A description for the project.</p>
78    pub fn get_project_description(&self) -> &::std::option::Option<::std::string::String> {
79        &self.project_description
80    }
81    /// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
82    /// This field is required.
83    pub fn service_catalog_provisioning_details(mut self, input: crate::types::ServiceCatalogProvisioningDetails) -> Self {
84        self.service_catalog_provisioning_details = ::std::option::Option::Some(input);
85        self
86    }
87    /// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
88    pub fn set_service_catalog_provisioning_details(mut self, input: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>) -> Self {
89        self.service_catalog_provisioning_details = input;
90        self
91    }
92    /// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
93    pub fn get_service_catalog_provisioning_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningDetails> {
94        &self.service_catalog_provisioning_details
95    }
96    /// Appends an item to `tags`.
97    ///
98    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
99    ///
100    /// <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
101    pub fn tags(mut self, input: crate::types::Tag) -> Self {
102        let mut v = self.tags.unwrap_or_default();
103        v.push(input);
104        self.tags = ::std::option::Option::Some(v);
105        self
106    }
107    /// <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
108    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
109        self.tags = input;
110        self
111    }
112    /// <p>An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
113    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
114        &self.tags
115    }
116    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
117    pub fn build(
118        self,
119    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
120        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
121            project_name: self.project_name,
122            project_description: self.project_description,
123            service_catalog_provisioning_details: self.service_catalog_provisioning_details,
124            tags: self.tags,
125        })
126    }
127}