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 pub fn service_catalog_provisioning_details(mut self, input: crate::types::ServiceCatalogProvisioningDetails) -> Self {
83 self.service_catalog_provisioning_details = ::std::option::Option::Some(input);
84 self
85 }
86 /// <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>
87 pub fn set_service_catalog_provisioning_details(mut self, input: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>) -> Self {
88 self.service_catalog_provisioning_details = input;
89 self
90 }
91 /// <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>
92 pub fn get_service_catalog_provisioning_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningDetails> {
93 &self.service_catalog_provisioning_details
94 }
95 /// Appends an item to `tags`.
96 ///
97 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
98 ///
99 /// <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>
100 pub fn tags(mut self, input: crate::types::Tag) -> Self {
101 let mut v = self.tags.unwrap_or_default();
102 v.push(input);
103 self.tags = ::std::option::Option::Some(v);
104 self
105 }
106 /// <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>
107 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
108 self.tags = input;
109 self
110 }
111 /// <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>
112 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
113 &self.tags
114 }
115 /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
116 pub fn build(
117 self,
118 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
119 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
120 project_name: self.project_name,
121 project_description: self.project_description,
122 service_catalog_provisioning_details: self.service_catalog_provisioning_details,
123 tags: self.tags,
124 })
125 }
126}