aws_sdk_iotfleethub/operation/update_application/
_update_application_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 UpdateApplicationInput {
6    /// <p>The unique Id of the web application.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the web application.</p>
9    pub application_name: ::std::option::Option<::std::string::String>,
10    /// <p>An optional description of the web application.</p>
11    pub application_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 UpdateApplicationInput {
16    /// <p>The unique Id of the web application.</p>
17    pub fn application_id(&self) -> ::std::option::Option<&str> {
18        self.application_id.as_deref()
19    }
20    /// <p>The name of the web application.</p>
21    pub fn application_name(&self) -> ::std::option::Option<&str> {
22        self.application_name.as_deref()
23    }
24    /// <p>An optional description of the web application.</p>
25    pub fn application_description(&self) -> ::std::option::Option<&str> {
26        self.application_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 UpdateApplicationInput {
34    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
35    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
36        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateApplicationInputBuilder {
44    pub(crate) application_id: ::std::option::Option<::std::string::String>,
45    pub(crate) application_name: ::std::option::Option<::std::string::String>,
46    pub(crate) application_description: ::std::option::Option<::std::string::String>,
47    pub(crate) client_token: ::std::option::Option<::std::string::String>,
48}
49impl UpdateApplicationInputBuilder {
50    /// <p>The unique Id of the web application.</p>
51    /// This field is required.
52    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.application_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique Id of the web application.</p>
57    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.application_id = input;
59        self
60    }
61    /// <p>The unique Id of the web application.</p>
62    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.application_id
64    }
65    /// <p>The name of the web application.</p>
66    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.application_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the web application.</p>
71    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.application_name = input;
73        self
74    }
75    /// <p>The name of the web application.</p>
76    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.application_name
78    }
79    /// <p>An optional description of the web application.</p>
80    pub fn application_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.application_description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>An optional description of the web application.</p>
85    pub fn set_application_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.application_description = input;
87        self
88    }
89    /// <p>An optional description of the web application.</p>
90    pub fn get_application_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.application_description
92    }
93    /// <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>
94    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.client_token = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <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>
99    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.client_token = input;
101        self
102    }
103    /// <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>
104    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
105        &self.client_token
106    }
107    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
112            application_id: self.application_id,
113            application_name: self.application_name,
114            application_description: self.application_description,
115            client_token: self.client_token,
116        })
117    }
118}