aws_sdk_kafka/operation/update_security/
_update_security_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 UpdateSecurityInput {
6    /// <p>Includes all client authentication related information.</p>
7    pub client_authentication: ::std::option::Option<crate::types::ClientAuthentication>,
8    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
9    pub cluster_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
11    pub current_version: ::std::option::Option<::std::string::String>,
12    /// <p>Includes all encryption-related information.</p>
13    pub encryption_info: ::std::option::Option<crate::types::EncryptionInfo>,
14}
15impl UpdateSecurityInput {
16    /// <p>Includes all client authentication related information.</p>
17    pub fn client_authentication(&self) -> ::std::option::Option<&crate::types::ClientAuthentication> {
18        self.client_authentication.as_ref()
19    }
20    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
21    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
22        self.cluster_arn.as_deref()
23    }
24    /// <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
25    pub fn current_version(&self) -> ::std::option::Option<&str> {
26        self.current_version.as_deref()
27    }
28    /// <p>Includes all encryption-related information.</p>
29    pub fn encryption_info(&self) -> ::std::option::Option<&crate::types::EncryptionInfo> {
30        self.encryption_info.as_ref()
31    }
32}
33impl UpdateSecurityInput {
34    /// Creates a new builder-style object to manufacture [`UpdateSecurityInput`](crate::operation::update_security::UpdateSecurityInput).
35    pub fn builder() -> crate::operation::update_security::builders::UpdateSecurityInputBuilder {
36        crate::operation::update_security::builders::UpdateSecurityInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateSecurityInput`](crate::operation::update_security::UpdateSecurityInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateSecurityInputBuilder {
44    pub(crate) client_authentication: ::std::option::Option<crate::types::ClientAuthentication>,
45    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) current_version: ::std::option::Option<::std::string::String>,
47    pub(crate) encryption_info: ::std::option::Option<crate::types::EncryptionInfo>,
48}
49impl UpdateSecurityInputBuilder {
50    /// <p>Includes all client authentication related information.</p>
51    pub fn client_authentication(mut self, input: crate::types::ClientAuthentication) -> Self {
52        self.client_authentication = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>Includes all client authentication related information.</p>
56    pub fn set_client_authentication(mut self, input: ::std::option::Option<crate::types::ClientAuthentication>) -> Self {
57        self.client_authentication = input;
58        self
59    }
60    /// <p>Includes all client authentication related information.</p>
61    pub fn get_client_authentication(&self) -> &::std::option::Option<crate::types::ClientAuthentication> {
62        &self.client_authentication
63    }
64    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
65    /// This field is required.
66    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.cluster_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
71    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.cluster_arn = input;
73        self
74    }
75    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
76    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.cluster_arn
78    }
79    /// <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
80    /// This field is required.
81    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.current_version = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
86    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.current_version = input;
88        self
89    }
90    /// <p>The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.</p>
91    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
92        &self.current_version
93    }
94    /// <p>Includes all encryption-related information.</p>
95    pub fn encryption_info(mut self, input: crate::types::EncryptionInfo) -> Self {
96        self.encryption_info = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>Includes all encryption-related information.</p>
100    pub fn set_encryption_info(mut self, input: ::std::option::Option<crate::types::EncryptionInfo>) -> Self {
101        self.encryption_info = input;
102        self
103    }
104    /// <p>Includes all encryption-related information.</p>
105    pub fn get_encryption_info(&self) -> &::std::option::Option<crate::types::EncryptionInfo> {
106        &self.encryption_info
107    }
108    /// Consumes the builder and constructs a [`UpdateSecurityInput`](crate::operation::update_security::UpdateSecurityInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::update_security::UpdateSecurityInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::update_security::UpdateSecurityInput {
113            client_authentication: self.client_authentication,
114            cluster_arn: self.cluster_arn,
115            current_version: self.current_version,
116            encryption_info: self.encryption_info,
117        })
118    }
119}