aws_sdk_dsql/operation/update_cluster/_update_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 UpdateClusterInput {
6 /// <p>The ID of the cluster you want to update.</p>
7 pub identifier: ::std::option::Option<::std::string::String>,
8 /// <p>Specifies whether to enable deletion protection in your cluster.</p>
9 pub deletion_protection_enabled: ::std::option::Option<bool>,
10 /// <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>
11 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
12 pub client_token: ::std::option::Option<::std::string::String>,
13}
14impl UpdateClusterInput {
15 /// <p>The ID of the cluster you want to update.</p>
16 pub fn identifier(&self) -> ::std::option::Option<&str> {
17 self.identifier.as_deref()
18 }
19 /// <p>Specifies whether to enable deletion protection in your cluster.</p>
20 pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
21 self.deletion_protection_enabled
22 }
23 /// <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>
24 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
25 pub fn client_token(&self) -> ::std::option::Option<&str> {
26 self.client_token.as_deref()
27 }
28}
29impl UpdateClusterInput {
30 /// Creates a new builder-style object to manufacture [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
31 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
32 crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
33 }
34}
35
36/// A builder for [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct UpdateClusterInputBuilder {
40 pub(crate) identifier: ::std::option::Option<::std::string::String>,
41 pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
42 pub(crate) client_token: ::std::option::Option<::std::string::String>,
43}
44impl UpdateClusterInputBuilder {
45 /// <p>The ID of the cluster you want to update.</p>
46 /// This field is required.
47 pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.identifier = ::std::option::Option::Some(input.into());
49 self
50 }
51 /// <p>The ID of the cluster you want to update.</p>
52 pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.identifier = input;
54 self
55 }
56 /// <p>The ID of the cluster you want to update.</p>
57 pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
58 &self.identifier
59 }
60 /// <p>Specifies whether to enable deletion protection in your cluster.</p>
61 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
62 self.deletion_protection_enabled = ::std::option::Option::Some(input);
63 self
64 }
65 /// <p>Specifies whether to enable deletion protection in your cluster.</p>
66 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
67 self.deletion_protection_enabled = input;
68 self
69 }
70 /// <p>Specifies whether to enable deletion protection in your cluster.</p>
71 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
72 &self.deletion_protection_enabled
73 }
74 /// <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>
75 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
76 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.client_token = ::std::option::Option::Some(input.into());
78 self
79 }
80 /// <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>
81 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
82 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.client_token = input;
84 self
85 }
86 /// <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>
87 /// <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>
88 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
89 &self.client_token
90 }
91 /// Consumes the builder and constructs a [`UpdateClusterInput`](crate::operation::update_cluster::UpdateClusterInput).
92 pub fn build(
93 self,
94 ) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
95 ::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
96 identifier: self.identifier,
97 deletion_protection_enabled: self.deletion_protection_enabled,
98 client_token: self.client_token,
99 })
100 }
101}