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}
15impl UpdateProjectInput {
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>The 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_update_details(&self) -> ::std::option::Option<&crate::types::ServiceCatalogProvisioningUpdateDetails> {
26        self.service_catalog_provisioning_update_details.as_ref()
27    }
28    /// <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>
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 UpdateProjectInput {
36    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
37    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
38        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
39    }
40}
41
42/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateProjectInputBuilder {
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_update_details: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
49    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
50}
51impl UpdateProjectInputBuilder {
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>The 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>The 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>The 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_update_details(mut self, input: crate::types::ServiceCatalogProvisioningUpdateDetails) -> Self {
83        self.service_catalog_provisioning_update_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_update_details(
88        mut self,
89        input: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
90    ) -> Self {
91        self.service_catalog_provisioning_update_details = input;
92        self
93    }
94    /// <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>
95    pub fn get_service_catalog_provisioning_update_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails> {
96        &self.service_catalog_provisioning_update_details
97    }
98    /// Appends an item to `tags`.
99    ///
100    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
101    ///
102    /// <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>
103    pub fn tags(mut self, input: crate::types::Tag) -> Self {
104        let mut v = self.tags.unwrap_or_default();
105        v.push(input);
106        self.tags = ::std::option::Option::Some(v);
107        self
108    }
109    /// <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>
110    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
111        self.tags = input;
112        self
113    }
114    /// <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>
115    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
116        &self.tags
117    }
118    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
119    pub fn build(
120        self,
121    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
122        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
123            project_name: self.project_name,
124            project_description: self.project_description,
125            service_catalog_provisioning_update_details: self.service_catalog_provisioning_update_details,
126            tags: self.tags,
127        })
128    }
129}