aws_sdk_cloudhsm/operation/describe_hapg/
_describe_hapg_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeHapgOutput {
7 pub hapg_arn: ::std::option::Option<::std::string::String>,
9 pub hapg_serial: ::std::option::Option<::std::string::String>,
11 pub hsms_last_action_failed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
13 pub hsms_pending_deletion: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
15 pub hsms_pending_registration: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
17 pub label: ::std::option::Option<::std::string::String>,
19 pub last_modified_timestamp: ::std::option::Option<::std::string::String>,
21 pub partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
23 pub state: ::std::option::Option<crate::types::CloudHsmObjectState>,
25 _request_id: Option<String>,
26}
27impl DescribeHapgOutput {
28 pub fn hapg_arn(&self) -> ::std::option::Option<&str> {
30 self.hapg_arn.as_deref()
31 }
32 pub fn hapg_serial(&self) -> ::std::option::Option<&str> {
34 self.hapg_serial.as_deref()
35 }
36 pub fn hsms_last_action_failed(&self) -> &[::std::string::String] {
40 self.hsms_last_action_failed.as_deref().unwrap_or_default()
41 }
42 pub fn hsms_pending_deletion(&self) -> &[::std::string::String] {
46 self.hsms_pending_deletion.as_deref().unwrap_or_default()
47 }
48 pub fn hsms_pending_registration(&self) -> &[::std::string::String] {
52 self.hsms_pending_registration.as_deref().unwrap_or_default()
53 }
54 pub fn label(&self) -> ::std::option::Option<&str> {
56 self.label.as_deref()
57 }
58 pub fn last_modified_timestamp(&self) -> ::std::option::Option<&str> {
60 self.last_modified_timestamp.as_deref()
61 }
62 pub fn partition_serial_list(&self) -> &[::std::string::String] {
66 self.partition_serial_list.as_deref().unwrap_or_default()
67 }
68 pub fn state(&self) -> ::std::option::Option<&crate::types::CloudHsmObjectState> {
70 self.state.as_ref()
71 }
72}
73impl ::aws_types::request_id::RequestId for DescribeHapgOutput {
74 fn request_id(&self) -> Option<&str> {
75 self._request_id.as_deref()
76 }
77}
78impl DescribeHapgOutput {
79 pub fn builder() -> crate::operation::describe_hapg::builders::DescribeHapgOutputBuilder {
81 crate::operation::describe_hapg::builders::DescribeHapgOutputBuilder::default()
82 }
83}
84
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
87#[non_exhaustive]
88pub struct DescribeHapgOutputBuilder {
89 pub(crate) hapg_arn: ::std::option::Option<::std::string::String>,
90 pub(crate) hapg_serial: ::std::option::Option<::std::string::String>,
91 pub(crate) hsms_last_action_failed: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
92 pub(crate) hsms_pending_deletion: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
93 pub(crate) hsms_pending_registration: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
94 pub(crate) label: ::std::option::Option<::std::string::String>,
95 pub(crate) last_modified_timestamp: ::std::option::Option<::std::string::String>,
96 pub(crate) partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
97 pub(crate) state: ::std::option::Option<crate::types::CloudHsmObjectState>,
98 _request_id: Option<String>,
99}
100impl DescribeHapgOutputBuilder {
101 pub fn hapg_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.hapg_arn = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_hapg_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.hapg_arn = input;
109 self
110 }
111 pub fn get_hapg_arn(&self) -> &::std::option::Option<::std::string::String> {
113 &self.hapg_arn
114 }
115 pub fn hapg_serial(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.hapg_serial = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_hapg_serial(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.hapg_serial = input;
123 self
124 }
125 pub fn get_hapg_serial(&self) -> &::std::option::Option<::std::string::String> {
127 &self.hapg_serial
128 }
129 pub fn hsms_last_action_failed(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 let mut v = self.hsms_last_action_failed.unwrap_or_default();
136 v.push(input.into());
137 self.hsms_last_action_failed = ::std::option::Option::Some(v);
138 self
139 }
140 pub fn set_hsms_last_action_failed(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
142 self.hsms_last_action_failed = input;
143 self
144 }
145 pub fn get_hsms_last_action_failed(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
147 &self.hsms_last_action_failed
148 }
149 pub fn hsms_pending_deletion(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155 let mut v = self.hsms_pending_deletion.unwrap_or_default();
156 v.push(input.into());
157 self.hsms_pending_deletion = ::std::option::Option::Some(v);
158 self
159 }
160 pub fn set_hsms_pending_deletion(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
162 self.hsms_pending_deletion = input;
163 self
164 }
165 pub fn get_hsms_pending_deletion(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
167 &self.hsms_pending_deletion
168 }
169 pub fn hsms_pending_registration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 let mut v = self.hsms_pending_registration.unwrap_or_default();
176 v.push(input.into());
177 self.hsms_pending_registration = ::std::option::Option::Some(v);
178 self
179 }
180 pub fn set_hsms_pending_registration(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
182 self.hsms_pending_registration = input;
183 self
184 }
185 pub fn get_hsms_pending_registration(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
187 &self.hsms_pending_registration
188 }
189 pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191 self.label = ::std::option::Option::Some(input.into());
192 self
193 }
194 pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196 self.label = input;
197 self
198 }
199 pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
201 &self.label
202 }
203 pub fn last_modified_timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205 self.last_modified_timestamp = ::std::option::Option::Some(input.into());
206 self
207 }
208 pub fn set_last_modified_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.last_modified_timestamp = input;
211 self
212 }
213 pub fn get_last_modified_timestamp(&self) -> &::std::option::Option<::std::string::String> {
215 &self.last_modified_timestamp
216 }
217 pub fn partition_serial_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 let mut v = self.partition_serial_list.unwrap_or_default();
224 v.push(input.into());
225 self.partition_serial_list = ::std::option::Option::Some(v);
226 self
227 }
228 pub fn set_partition_serial_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
230 self.partition_serial_list = input;
231 self
232 }
233 pub fn get_partition_serial_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
235 &self.partition_serial_list
236 }
237 pub fn state(mut self, input: crate::types::CloudHsmObjectState) -> Self {
239 self.state = ::std::option::Option::Some(input);
240 self
241 }
242 pub fn set_state(mut self, input: ::std::option::Option<crate::types::CloudHsmObjectState>) -> Self {
244 self.state = input;
245 self
246 }
247 pub fn get_state(&self) -> &::std::option::Option<crate::types::CloudHsmObjectState> {
249 &self.state
250 }
251 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
252 self._request_id = Some(request_id.into());
253 self
254 }
255
256 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
257 self._request_id = request_id;
258 self
259 }
260 pub fn build(self) -> crate::operation::describe_hapg::DescribeHapgOutput {
262 crate::operation::describe_hapg::DescribeHapgOutput {
263 hapg_arn: self.hapg_arn,
264 hapg_serial: self.hapg_serial,
265 hsms_last_action_failed: self.hsms_last_action_failed,
266 hsms_pending_deletion: self.hsms_pending_deletion,
267 hsms_pending_registration: self.hsms_pending_registration,
268 label: self.label,
269 last_modified_timestamp: self.last_modified_timestamp,
270 partition_serial_list: self.partition_serial_list,
271 state: self.state,
272 _request_id: self._request_id,
273 }
274 }
275}