aws_sdk_dsql/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 ID of the cluster to delete.</p>
7 pub identifier: ::std::option::Option<::std::string::String>,
8 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
9 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
10 pub client_token: ::std::option::Option<::std::string::String>,
11}
12impl DeleteClusterInput {
13 /// <p>The ID of the cluster to delete.</p>
14 pub fn identifier(&self) -> ::std::option::Option<&str> {
15 self.identifier.as_deref()
16 }
17 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
18 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
19 pub fn client_token(&self) -> ::std::option::Option<&str> {
20 self.client_token.as_deref()
21 }
22}
23impl DeleteClusterInput {
24 /// Creates a new builder-style object to manufacture [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
25 pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterInputBuilder {
26 crate::operation::delete_cluster::builders::DeleteClusterInputBuilder::default()
27 }
28}
29
30/// A builder for [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteClusterInputBuilder {
34 pub(crate) identifier: ::std::option::Option<::std::string::String>,
35 pub(crate) client_token: ::std::option::Option<::std::string::String>,
36}
37impl DeleteClusterInputBuilder {
38 /// <p>The ID of the cluster to delete.</p>
39 /// This field is required.
40 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.identifier = ::std::option::Option::Some(input.into());
42 self
43 }
44 /// <p>The ID of the cluster to delete.</p>
45 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.identifier = input;
47 self
48 }
49 /// <p>The ID of the cluster to delete.</p>
50 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
51 &self.identifier
52 }
53 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
54 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
55 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.client_token = ::std::option::Option::Some(input.into());
57 self
58 }
59 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
60 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
61 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.client_token = input;
63 self
64 }
65 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
66 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
67 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
68 &self.client_token
69 }
70 /// Consumes the builder and constructs a [`DeleteClusterInput`](crate::operation::delete_cluster::DeleteClusterInput).
71 pub fn build(
72 self,
73 ) -> ::std::result::Result<crate::operation::delete_cluster::DeleteClusterInput, ::aws_smithy_types::error::operation::BuildError> {
74 ::std::result::Result::Ok(crate::operation::delete_cluster::DeleteClusterInput {
75 identifier: self.identifier,
76 client_token: self.client_token,
77 })
78 }
79}