aws_sdk_cloudhsm/operation/modify_hapg/
_modify_hapg_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ModifyHapgInput {
6 pub hapg_arn: ::std::option::Option<::std::string::String>,
8 pub label: ::std::option::Option<::std::string::String>,
10 pub partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12}
13impl ModifyHapgInput {
14 pub fn hapg_arn(&self) -> ::std::option::Option<&str> {
16 self.hapg_arn.as_deref()
17 }
18 pub fn label(&self) -> ::std::option::Option<&str> {
20 self.label.as_deref()
21 }
22 pub fn partition_serial_list(&self) -> &[::std::string::String] {
26 self.partition_serial_list.as_deref().unwrap_or_default()
27 }
28}
29impl ModifyHapgInput {
30 pub fn builder() -> crate::operation::modify_hapg::builders::ModifyHapgInputBuilder {
32 crate::operation::modify_hapg::builders::ModifyHapgInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct ModifyHapgInputBuilder {
40 pub(crate) hapg_arn: ::std::option::Option<::std::string::String>,
41 pub(crate) label: ::std::option::Option<::std::string::String>,
42 pub(crate) partition_serial_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43}
44impl ModifyHapgInputBuilder {
45 pub fn hapg_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.hapg_arn = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_hapg_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.hapg_arn = input;
54 self
55 }
56 pub fn get_hapg_arn(&self) -> &::std::option::Option<::std::string::String> {
58 &self.hapg_arn
59 }
60 pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.label = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.label = input;
68 self
69 }
70 pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
72 &self.label
73 }
74 pub fn partition_serial_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 let mut v = self.partition_serial_list.unwrap_or_default();
81 v.push(input.into());
82 self.partition_serial_list = ::std::option::Option::Some(v);
83 self
84 }
85 pub fn set_partition_serial_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
87 self.partition_serial_list = input;
88 self
89 }
90 pub fn get_partition_serial_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
92 &self.partition_serial_list
93 }
94 pub fn build(self) -> ::std::result::Result<crate::operation::modify_hapg::ModifyHapgInput, ::aws_smithy_types::error::operation::BuildError> {
96 ::std::result::Result::Ok(crate::operation::modify_hapg::ModifyHapgInput {
97 hapg_arn: self.hapg_arn,
98 label: self.label,
99 partition_serial_list: self.partition_serial_list,
100 })
101 }
102}