Skip to main content

aws_sdk_securityagent/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    /// Application ID
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
9    pub role_arn: ::std::option::Option<::std::string::String>,
10    /// Default KMS key identifier. Use an empty string to remove the default KMS key.
11    pub default_kms_key_id: ::std::option::Option<::std::string::String>,
12}
13impl UpdateApplicationInput {
14    /// Application ID
15    pub fn application_id(&self) -> ::std::option::Option<&str> {
16        self.application_id.as_deref()
17    }
18    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
19    pub fn role_arn(&self) -> ::std::option::Option<&str> {
20        self.role_arn.as_deref()
21    }
22    /// Default KMS key identifier. Use an empty string to remove the default KMS key.
23    pub fn default_kms_key_id(&self) -> ::std::option::Option<&str> {
24        self.default_kms_key_id.as_deref()
25    }
26}
27impl UpdateApplicationInput {
28    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
29    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
30        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateApplicationInputBuilder {
38    pub(crate) application_id: ::std::option::Option<::std::string::String>,
39    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) default_kms_key_id: ::std::option::Option<::std::string::String>,
41}
42impl UpdateApplicationInputBuilder {
43    /// Application ID
44    /// This field is required.
45    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.application_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// Application ID
50    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.application_id = input;
52        self
53    }
54    /// Application ID
55    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.application_id
57    }
58    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
59    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.role_arn = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
64    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.role_arn = input;
66        self
67    }
68    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
69    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
70        &self.role_arn
71    }
72    /// Default KMS key identifier. Use an empty string to remove the default KMS key.
73    pub fn default_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.default_kms_key_id = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// Default KMS key identifier. Use an empty string to remove the default KMS key.
78    pub fn set_default_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.default_kms_key_id = input;
80        self
81    }
82    /// Default KMS key identifier. Use an empty string to remove the default KMS key.
83    pub fn get_default_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.default_kms_key_id
85    }
86    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
91            application_id: self.application_id,
92            role_arn: self.role_arn,
93            default_kms_key_id: self.default_kms_key_id,
94        })
95    }
96}