aws_sdk_cloudhsm/operation/get_config/
_get_config_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetConfigInput {
6    /// <p>The ARN of the client.</p>
7    pub client_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The client version.</p>
9    pub client_version: ::std::option::Option<crate::types::ClientVersion>,
10    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
11    pub hapg_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12}
13impl GetConfigInput {
14    /// <p>The ARN of the client.</p>
15    pub fn client_arn(&self) -> ::std::option::Option<&str> {
16        self.client_arn.as_deref()
17    }
18    /// <p>The client version.</p>
19    pub fn client_version(&self) -> ::std::option::Option<&crate::types::ClientVersion> {
20        self.client_version.as_ref()
21    }
22    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
23    ///
24    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hapg_list.is_none()`.
25    pub fn hapg_list(&self) -> &[::std::string::String] {
26        self.hapg_list.as_deref().unwrap_or_default()
27    }
28}
29impl GetConfigInput {
30    /// Creates a new builder-style object to manufacture [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
31    pub fn builder() -> crate::operation::get_config::builders::GetConfigInputBuilder {
32        crate::operation::get_config::builders::GetConfigInputBuilder::default()
33    }
34}
35
36/// A builder for [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
37#[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    /// <p>The ARN of the client.</p>
46    /// This field is required.
47    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    /// <p>The ARN of the client.</p>
52    pub fn set_client_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.client_arn = input;
54        self
55    }
56    /// <p>The ARN of the client.</p>
57    pub fn get_client_arn(&self) -> &::std::option::Option<::std::string::String> {
58        &self.client_arn
59    }
60    /// <p>The client version.</p>
61    /// This field is required.
62    pub fn client_version(mut self, input: crate::types::ClientVersion) -> Self {
63        self.client_version = ::std::option::Option::Some(input);
64        self
65    }
66    /// <p>The client version.</p>
67    pub fn set_client_version(mut self, input: ::std::option::Option<crate::types::ClientVersion>) -> Self {
68        self.client_version = input;
69        self
70    }
71    /// <p>The client version.</p>
72    pub fn get_client_version(&self) -> &::std::option::Option<crate::types::ClientVersion> {
73        &self.client_version
74    }
75    /// Appends an item to `hapg_list`.
76    ///
77    /// To override the contents of this collection use [`set_hapg_list`](Self::set_hapg_list).
78    ///
79    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
80    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    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
87    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    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
92    pub fn get_hapg_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
93        &self.hapg_list
94    }
95    /// Consumes the builder and constructs a [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
96    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}