aws_sdk_sagemaker/operation/update_project/_update_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 UpdateProjectInput {
6 /// <p>The name of the project.</p>
7 pub project_name: ::std::option::Option<::std::string::String>,
8 /// <p>The 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_update_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
12 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
13 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
14 /// <p>The template providers to update in the project.</p>
15 pub template_providers_to_update: ::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>>,
16}
17impl UpdateProjectInput {
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>The 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_update_details(&self) -> ::std::option::Option<&crate::types::ServiceCatalogProvisioningUpdateDetails> {
28 self.service_catalog_provisioning_update_details.as_ref()
29 }
30 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</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>The template providers to update in 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_to_update.is_none()`.
39 pub fn template_providers_to_update(&self) -> &[crate::types::UpdateTemplateProvider] {
40 self.template_providers_to_update.as_deref().unwrap_or_default()
41 }
42}
43impl UpdateProjectInput {
44 /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
45 pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
46 crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
47 }
48}
49
50/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct UpdateProjectInputBuilder {
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_update_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
57 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
58 pub(crate) template_providers_to_update: ::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>>,
59}
60impl UpdateProjectInputBuilder {
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>The 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>The 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>The 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_update_details(mut self, input: crate::types::ServiceCatalogProvisioningUpdateDetails) -> Self {
92 self.service_catalog_provisioning_update_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_update_details(
97 mut self,
98 input: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
99 ) -> Self {
100 self.service_catalog_provisioning_update_details = input;
101 self
102 }
103 /// <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>
104 pub fn get_service_catalog_provisioning_update_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails> {
105 &self.service_catalog_provisioning_update_details
106 }
107 /// Appends an item to `tags`.
108 ///
109 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
110 ///
111 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
112 pub fn tags(mut self, input: crate::types::Tag) -> Self {
113 let mut v = self.tags.unwrap_or_default();
114 v.push(input);
115 self.tags = ::std::option::Option::Some(v);
116 self
117 }
118 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
119 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
120 self.tags = input;
121 self
122 }
123 /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
124 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
125 &self.tags
126 }
127 /// Appends an item to `template_providers_to_update`.
128 ///
129 /// To override the contents of this collection use [`set_template_providers_to_update`](Self::set_template_providers_to_update).
130 ///
131 /// <p>The template providers to update in the project.</p>
132 pub fn template_providers_to_update(mut self, input: crate::types::UpdateTemplateProvider) -> Self {
133 let mut v = self.template_providers_to_update.unwrap_or_default();
134 v.push(input);
135 self.template_providers_to_update = ::std::option::Option::Some(v);
136 self
137 }
138 /// <p>The template providers to update in the project.</p>
139 pub fn set_template_providers_to_update(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>>) -> Self {
140 self.template_providers_to_update = input;
141 self
142 }
143 /// <p>The template providers to update in the project.</p>
144 pub fn get_template_providers_to_update(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>> {
145 &self.template_providers_to_update
146 }
147 /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
148 pub fn build(
149 self,
150 ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
151 ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
152 project_name: self.project_name,
153 project_description: self.project_description,
154 service_catalog_provisioning_update_details: self.service_catalog_provisioning_update_details,
155 tags: self.tags,
156 template_providers_to_update: self.template_providers_to_update,
157 })
158 }
159}