aws_sdk_redshift/operation/delete_partner/
_delete_partner_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeletePartnerInput {
6 pub account_id: ::std::option::Option<::std::string::String>,
8 pub cluster_identifier: ::std::option::Option<::std::string::String>,
10 pub database_name: ::std::option::Option<::std::string::String>,
12 pub partner_name: ::std::option::Option<::std::string::String>,
14}
15impl DeletePartnerInput {
16 pub fn account_id(&self) -> ::std::option::Option<&str> {
18 self.account_id.as_deref()
19 }
20 pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
22 self.cluster_identifier.as_deref()
23 }
24 pub fn database_name(&self) -> ::std::option::Option<&str> {
26 self.database_name.as_deref()
27 }
28 pub fn partner_name(&self) -> ::std::option::Option<&str> {
30 self.partner_name.as_deref()
31 }
32}
33impl DeletePartnerInput {
34 pub fn builder() -> crate::operation::delete_partner::builders::DeletePartnerInputBuilder {
36 crate::operation::delete_partner::builders::DeletePartnerInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeletePartnerInputBuilder {
44 pub(crate) account_id: ::std::option::Option<::std::string::String>,
45 pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
46 pub(crate) database_name: ::std::option::Option<::std::string::String>,
47 pub(crate) partner_name: ::std::option::Option<::std::string::String>,
48}
49impl DeletePartnerInputBuilder {
50 pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.account_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.account_id = input;
59 self
60 }
61 pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.account_id
64 }
65 pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.cluster_identifier = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.cluster_identifier = input;
74 self
75 }
76 pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
78 &self.cluster_identifier
79 }
80 pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.database_name = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.database_name = input;
89 self
90 }
91 pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.database_name
94 }
95 pub fn partner_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.partner_name = ::std::option::Option::Some(input.into());
99 self
100 }
101 pub fn set_partner_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.partner_name = input;
104 self
105 }
106 pub fn get_partner_name(&self) -> &::std::option::Option<::std::string::String> {
108 &self.partner_name
109 }
110 pub fn build(
112 self,
113 ) -> ::std::result::Result<crate::operation::delete_partner::DeletePartnerInput, ::aws_smithy_types::error::operation::BuildError> {
114 ::std::result::Result::Ok(crate::operation::delete_partner::DeletePartnerInput {
115 account_id: self.account_id,
116 cluster_identifier: self.cluster_identifier,
117 database_name: self.database_name,
118 partner_name: self.partner_name,
119 })
120 }
121}