aws_sdk_cloudhsmv2/operation/delete_hsm/
_delete_hsm_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteHsmInput {
6 pub cluster_id: ::std::option::Option<::std::string::String>,
8 pub hsm_id: ::std::option::Option<::std::string::String>,
10 pub eni_id: ::std::option::Option<::std::string::String>,
12 pub eni_ip: ::std::option::Option<::std::string::String>,
14}
15impl DeleteHsmInput {
16 pub fn cluster_id(&self) -> ::std::option::Option<&str> {
18 self.cluster_id.as_deref()
19 }
20 pub fn hsm_id(&self) -> ::std::option::Option<&str> {
22 self.hsm_id.as_deref()
23 }
24 pub fn eni_id(&self) -> ::std::option::Option<&str> {
26 self.eni_id.as_deref()
27 }
28 pub fn eni_ip(&self) -> ::std::option::Option<&str> {
30 self.eni_ip.as_deref()
31 }
32}
33impl DeleteHsmInput {
34 pub fn builder() -> crate::operation::delete_hsm::builders::DeleteHsmInputBuilder {
36 crate::operation::delete_hsm::builders::DeleteHsmInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteHsmInputBuilder {
44 pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
45 pub(crate) hsm_id: ::std::option::Option<::std::string::String>,
46 pub(crate) eni_id: ::std::option::Option<::std::string::String>,
47 pub(crate) eni_ip: ::std::option::Option<::std::string::String>,
48}
49impl DeleteHsmInputBuilder {
50 pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.cluster_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.cluster_id = input;
59 self
60 }
61 pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.cluster_id
64 }
65 pub fn hsm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.hsm_id = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_hsm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.hsm_id = input;
73 self
74 }
75 pub fn get_hsm_id(&self) -> &::std::option::Option<::std::string::String> {
77 &self.hsm_id
78 }
79 pub fn eni_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.eni_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_eni_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.eni_id = input;
87 self
88 }
89 pub fn get_eni_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.eni_id
92 }
93 pub fn eni_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.eni_ip = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_eni_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.eni_ip = input;
101 self
102 }
103 pub fn get_eni_ip(&self) -> &::std::option::Option<::std::string::String> {
105 &self.eni_ip
106 }
107 pub fn build(self) -> ::std::result::Result<crate::operation::delete_hsm::DeleteHsmInput, ::aws_smithy_types::error::operation::BuildError> {
109 ::std::result::Result::Ok(crate::operation::delete_hsm::DeleteHsmInput {
110 cluster_id: self.cluster_id,
111 hsm_id: self.hsm_id,
112 eni_id: self.eni_id,
113 eni_ip: self.eni_ip,
114 })
115 }
116}