aws_sdk_kafka/operation/delete_cluster/
_delete_cluster_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 DeleteClusterInput {
6    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
7    pub cluster_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The current version of the MSK cluster.</p>
9    pub current_version: ::std::option::Option<::std::string::String>,
10}
11impl DeleteClusterInput {
12    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
13    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
14        self.cluster_arn.as_deref()
15    }
16    /// <p>The current version of the MSK cluster.</p>
17    pub fn current_version(&self) -> ::std::option::Option<&str> {
18        self.current_version.as_deref()
19    }
20}
21impl DeleteClusterInput {
22    /// Creates a new builder-style object to manufacture [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
23    pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterInputBuilder {
24        crate::operation::delete_cluster::builders::DeleteClusterInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteClusterInputBuilder {
32    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) current_version: ::std::option::Option<::std::string::String>,
34}
35impl DeleteClusterInputBuilder {
36    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
37    /// This field is required.
38    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.cluster_arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
43    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.cluster_arn = input;
45        self
46    }
47    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
48    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.cluster_arn
50    }
51    /// <p>The current version of the MSK cluster.</p>
52    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.current_version = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The current version of the MSK cluster.</p>
57    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.current_version = input;
59        self
60    }
61    /// <p>The current version of the MSK cluster.</p>
62    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
63        &self.current_version
64    }
65    /// Consumes the builder and constructs a [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::delete_cluster::DeleteClusterInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::delete_cluster::DeleteClusterInput {
70            cluster_arn: self.cluster_arn,
71            current_version: self.current_version,
72        })
73    }
74}