aws_sdk_cloudhsm/operation/get_config/
_get_config_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetConfigInput {
6 pub client_arn: ::std::option::Option<::std::string::String>,
8 pub client_version: ::std::option::Option<crate::types::ClientVersion>,
10 pub hapg_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12}
13impl GetConfigInput {
14 pub fn client_arn(&self) -> ::std::option::Option<&str> {
16 self.client_arn.as_deref()
17 }
18 pub fn client_version(&self) -> ::std::option::Option<&crate::types::ClientVersion> {
20 self.client_version.as_ref()
21 }
22 pub fn hapg_list(&self) -> &[::std::string::String] {
26 self.hapg_list.as_deref().unwrap_or_default()
27 }
28}
29impl GetConfigInput {
30 pub fn builder() -> crate::operation::get_config::builders::GetConfigInputBuilder {
32 crate::operation::get_config::builders::GetConfigInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct GetConfigInputBuilder {
40 pub(crate) client_arn: ::std::option::Option<::std::string::String>,
41 pub(crate) client_version: ::std::option::Option<crate::types::ClientVersion>,
42 pub(crate) hapg_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43}
44impl GetConfigInputBuilder {
45 pub fn client_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.client_arn = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_client_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.client_arn = input;
54 self
55 }
56 pub fn get_client_arn(&self) -> &::std::option::Option<::std::string::String> {
58 &self.client_arn
59 }
60 pub fn client_version(mut self, input: crate::types::ClientVersion) -> Self {
63 self.client_version = ::std::option::Option::Some(input);
64 self
65 }
66 pub fn set_client_version(mut self, input: ::std::option::Option<crate::types::ClientVersion>) -> Self {
68 self.client_version = input;
69 self
70 }
71 pub fn get_client_version(&self) -> &::std::option::Option<crate::types::ClientVersion> {
73 &self.client_version
74 }
75 pub fn hapg_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 let mut v = self.hapg_list.unwrap_or_default();
82 v.push(input.into());
83 self.hapg_list = ::std::option::Option::Some(v);
84 self
85 }
86 pub fn set_hapg_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
88 self.hapg_list = input;
89 self
90 }
91 pub fn get_hapg_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
93 &self.hapg_list
94 }
95 pub fn build(self) -> ::std::result::Result<crate::operation::get_config::GetConfigInput, ::aws_smithy_types::error::operation::BuildError> {
97 ::std::result::Result::Ok(crate::operation::get_config::GetConfigInput {
98 client_arn: self.client_arn,
99 client_version: self.client_version,
100 hapg_list: self.hapg_list,
101 })
102 }
103}