aws_sdk_iotsitewise/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 ID of the project to update.</p>
7    pub project_id: ::std::option::Option<::std::string::String>,
8    /// <p>A new friendly name for the project.</p>
9    pub project_name: ::std::option::Option<::std::string::String>,
10    /// <p>A new description for the project.</p>
11    pub project_description: ::std::option::Option<::std::string::String>,
12    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
13    pub client_token: ::std::option::Option<::std::string::String>,
14}
15impl UpdateProjectInput {
16    /// <p>The ID of the project to update.</p>
17    pub fn project_id(&self) -> ::std::option::Option<&str> {
18        self.project_id.as_deref()
19    }
20    /// <p>A new friendly name for the project.</p>
21    pub fn project_name(&self) -> ::std::option::Option<&str> {
22        self.project_name.as_deref()
23    }
24    /// <p>A new description for the project.</p>
25    pub fn project_description(&self) -> ::std::option::Option<&str> {
26        self.project_description.as_deref()
27    }
28    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
29    pub fn client_token(&self) -> ::std::option::Option<&str> {
30        self.client_token.as_deref()
31    }
32}
33impl UpdateProjectInput {
34    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
35    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
36        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateProjectInputBuilder {
44    pub(crate) project_id: ::std::option::Option<::std::string::String>,
45    pub(crate) project_name: ::std::option::Option<::std::string::String>,
46    pub(crate) project_description: ::std::option::Option<::std::string::String>,
47    pub(crate) client_token: ::std::option::Option<::std::string::String>,
48}
49impl UpdateProjectInputBuilder {
50    /// <p>The ID of the project to update.</p>
51    /// This field is required.
52    pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.project_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID of the project to update.</p>
57    pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.project_id = input;
59        self
60    }
61    /// <p>The ID of the project to update.</p>
62    pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.project_id
64    }
65    /// <p>A new friendly name for the project.</p>
66    /// This field is required.
67    pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.project_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>A new friendly name for the project.</p>
72    pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.project_name = input;
74        self
75    }
76    /// <p>A new friendly name for the project.</p>
77    pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.project_name
79    }
80    /// <p>A new description for the project.</p>
81    pub fn project_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.project_description = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>A new description for the project.</p>
86    pub fn set_project_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.project_description = input;
88        self
89    }
90    /// <p>A new description for the project.</p>
91    pub fn get_project_description(&self) -> &::std::option::Option<::std::string::String> {
92        &self.project_description
93    }
94    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
95    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.client_token = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
100    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.client_token = input;
102        self
103    }
104    /// <p>A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.</p>
105    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
106        &self.client_token
107    }
108    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
113            project_id: self.project_id,
114            project_name: self.project_name,
115            project_description: self.project_description,
116            client_token: self.client_token,
117        })
118    }
119}