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 /// <p>An array of template provider configurations for creating infrastructure resources for the project.</p>
15 pub template_providers: ::std::option::Option<::std::vec::Vec<crate::types::CreateTemplateProvider>>,
16}
17impl CreateProjectInput {
18 /// <p>The name of the project.</p>
19 pub fn project_name(&self) -> ::std::option::Option<&str> {
20 self.project_name.as_deref()
21 }
22 /// <p>A description for the project.</p>
23 pub fn project_description(&self) -> ::std::option::Option<&str> {
24 self.project_description.as_deref()
25 }
26 /// <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>
27 pub fn service_catalog_provisioning_details(&self) -> ::std::option::Option<&crate::types::ServiceCatalogProvisioningDetails> {
28 self.service_catalog_provisioning_details.as_ref()
29 }
30 /// <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>
31 ///
32 /// 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()`.
33 pub fn tags(&self) -> &[crate::types::Tag] {
34 self.tags.as_deref().unwrap_or_default()
35 }
36 /// <p>An array of template provider configurations for creating infrastructure resources for the project.</p>
37 ///
38 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.template_providers.is_none()`.
39 pub fn template_providers(&self) -> &[crate::types::CreateTemplateProvider] {
40 self.template_providers.as_deref().unwrap_or_default()
41 }
42}
43impl CreateProjectInput {
44 /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
45 pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
46 crate::operation::create_project::builders::CreateProjectInputBuilder::default()
47 }
48}
49
50/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct CreateProjectInputBuilder {
54 pub(crate) project_name: ::std::option::Option<::std::string::String>,
55 pub(crate) project_description: ::std::option::Option<::std::string::String>,
56 pub(crate) service_catalog_provisioning_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>,
57 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
58 pub(crate) template_providers: ::std::option::Option<::std::vec::Vec<crate::types::CreateTemplateProvider>>,
59}
60impl CreateProjectInputBuilder {
61 /// <p>The name of the project.</p>
62 /// This field is required.
63 pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.project_name = ::std::option::Option::Some(input.into());
65 self
66 }
67 /// <p>The name of the project.</p>
68 pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.project_name = input;
70 self
71 }
72 /// <p>The name of the project.</p>
73 pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
74 &self.project_name
75 }
76 /// <p>A description for the project.</p>
77 pub fn project_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.project_description = ::std::option::Option::Some(input.into());
79 self
80 }
81 /// <p>A description for the project.</p>
82 pub fn set_project_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.project_description = input;
84 self
85 }
86 /// <p>A description for the project.</p>
87 pub fn get_project_description(&self) -> &::std::option::Option<::std::string::String> {
88 &self.project_description
89 }
90 /// <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>
91 pub fn service_catalog_provisioning_details(mut self, input: crate::types::ServiceCatalogProvisioningDetails) -> Self {
92 self.service_catalog_provisioning_details = ::std::option::Option::Some(input);
93 self
94 }
95 /// <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>
96 pub fn set_service_catalog_provisioning_details(mut self, input: ::std::option::Option<crate::types::ServiceCatalogProvisioningDetails>) -> Self {
97 self.service_catalog_provisioning_details = input;
98 self
99 }
100 /// <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>
101 pub fn get_service_catalog_provisioning_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningDetails> {
102 &self.service_catalog_provisioning_details
103 }
104 /// Appends an item to `tags`.
105 ///
106 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
107 ///
108 /// <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>
109 pub fn tags(mut self, input: crate::types::Tag) -> Self {
110 let mut v = self.tags.unwrap_or_default();
111 v.push(input);
112 self.tags = ::std::option::Option::Some(v);
113 self
114 }
115 /// <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>
116 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
117 self.tags = input;
118 self
119 }
120 /// <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>
121 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
122 &self.tags
123 }
124 /// Appends an item to `template_providers`.
125 ///
126 /// To override the contents of this collection use [`set_template_providers`](Self::set_template_providers).
127 ///
128 /// <p>An array of template provider configurations for creating infrastructure resources for the project.</p>
129 pub fn template_providers(mut self, input: crate::types::CreateTemplateProvider) -> Self {
130 let mut v = self.template_providers.unwrap_or_default();
131 v.push(input);
132 self.template_providers = ::std::option::Option::Some(v);
133 self
134 }
135 /// <p>An array of template provider configurations for creating infrastructure resources for the project.</p>
136 pub fn set_template_providers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CreateTemplateProvider>>) -> Self {
137 self.template_providers = input;
138 self
139 }
140 /// <p>An array of template provider configurations for creating infrastructure resources for the project.</p>
141 pub fn get_template_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CreateTemplateProvider>> {
142 &self.template_providers
143 }
144 /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
145 pub fn build(
146 self,
147 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
148 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
149 project_name: self.project_name,
150 project_description: self.project_description,
151 service_catalog_provisioning_details: self.service_catalog_provisioning_details,
152 tags: self.tags,
153 template_providers: self.template_providers,
154 })
155 }
156}