aws_sdk_kafka/operation/update_connectivity/
_update_connectivity_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Request body for UpdateConnectivity.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateConnectivityInput {
7    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
8    pub cluster_arn: ::std::option::Option<::std::string::String>,
9    /// <p>Information about the broker access configuration.</p>
10    pub connectivity_info: ::std::option::Option<crate::types::ConnectivityInfo>,
11    /// <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>
12    pub current_version: ::std::option::Option<::std::string::String>,
13}
14impl UpdateConnectivityInput {
15    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
16    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
17        self.cluster_arn.as_deref()
18    }
19    /// <p>Information about the broker access configuration.</p>
20    pub fn connectivity_info(&self) -> ::std::option::Option<&crate::types::ConnectivityInfo> {
21        self.connectivity_info.as_ref()
22    }
23    /// <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>
24    pub fn current_version(&self) -> ::std::option::Option<&str> {
25        self.current_version.as_deref()
26    }
27}
28impl UpdateConnectivityInput {
29    /// Creates a new builder-style object to manufacture [`UpdateConnectivityInput`](crate::operation::update_connectivity::UpdateConnectivityInput).
30    pub fn builder() -> crate::operation::update_connectivity::builders::UpdateConnectivityInputBuilder {
31        crate::operation::update_connectivity::builders::UpdateConnectivityInputBuilder::default()
32    }
33}
34
35/// A builder for [`UpdateConnectivityInput`](crate::operation::update_connectivity::UpdateConnectivityInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct UpdateConnectivityInputBuilder {
39    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) connectivity_info: ::std::option::Option<crate::types::ConnectivityInfo>,
41    pub(crate) current_version: ::std::option::Option<::std::string::String>,
42}
43impl UpdateConnectivityInputBuilder {
44    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
45    /// This field is required.
46    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.cluster_arn = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
51    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.cluster_arn = input;
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) of the configuration.</p>
56    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
57        &self.cluster_arn
58    }
59    /// <p>Information about the broker access configuration.</p>
60    /// This field is required.
61    pub fn connectivity_info(mut self, input: crate::types::ConnectivityInfo) -> Self {
62        self.connectivity_info = ::std::option::Option::Some(input);
63        self
64    }
65    /// <p>Information about the broker access configuration.</p>
66    pub fn set_connectivity_info(mut self, input: ::std::option::Option<crate::types::ConnectivityInfo>) -> Self {
67        self.connectivity_info = input;
68        self
69    }
70    /// <p>Information about the broker access configuration.</p>
71    pub fn get_connectivity_info(&self) -> &::std::option::Option<crate::types::ConnectivityInfo> {
72        &self.connectivity_info
73    }
74    /// <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>
75    /// This field is required.
76    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77        self.current_version = ::std::option::Option::Some(input.into());
78        self
79    }
80    /// <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>
81    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.current_version = input;
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 get_current_version(&self) -> &::std::option::Option<::std::string::String> {
87        &self.current_version
88    }
89    /// Consumes the builder and constructs a [`UpdateConnectivityInput`](crate::operation::update_connectivity::UpdateConnectivityInput).
90    pub fn build(
91        self,
92    ) -> ::std::result::Result<crate::operation::update_connectivity::UpdateConnectivityInput, ::aws_smithy_types::error::operation::BuildError> {
93        ::std::result::Result::Ok(crate::operation::update_connectivity::UpdateConnectivityInput {
94            cluster_arn: self.cluster_arn,
95            connectivity_info: self.connectivity_info,
96            current_version: self.current_version,
97        })
98    }
99}