aws_sdk_cloudhsm/operation/get_config/
_get_config_output.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 GetConfigOutput {
6    /// <p>The type of credentials.</p>
7    pub config_type: ::std::option::Option<::std::string::String>,
8    /// <p>The chrystoki.conf configuration file.</p>
9    pub config_file: ::std::option::Option<::std::string::String>,
10    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
11    pub config_cred: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl GetConfigOutput {
15    /// <p>The type of credentials.</p>
16    pub fn config_type(&self) -> ::std::option::Option<&str> {
17        self.config_type.as_deref()
18    }
19    /// <p>The chrystoki.conf configuration file.</p>
20    pub fn config_file(&self) -> ::std::option::Option<&str> {
21        self.config_file.as_deref()
22    }
23    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
24    pub fn config_cred(&self) -> ::std::option::Option<&str> {
25        self.config_cred.as_deref()
26    }
27}
28impl ::aws_types::request_id::RequestId for GetConfigOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl GetConfigOutput {
34    /// Creates a new builder-style object to manufacture [`GetConfigOutput`](crate::operation::get_config::GetConfigOutput).
35    pub fn builder() -> crate::operation::get_config::builders::GetConfigOutputBuilder {
36        crate::operation::get_config::builders::GetConfigOutputBuilder::default()
37    }
38}
39
40/// A builder for [`GetConfigOutput`](crate::operation::get_config::GetConfigOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetConfigOutputBuilder {
44    pub(crate) config_type: ::std::option::Option<::std::string::String>,
45    pub(crate) config_file: ::std::option::Option<::std::string::String>,
46    pub(crate) config_cred: ::std::option::Option<::std::string::String>,
47    _request_id: Option<String>,
48}
49impl GetConfigOutputBuilder {
50    /// <p>The type of credentials.</p>
51    pub fn config_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.config_type = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The type of credentials.</p>
56    pub fn set_config_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.config_type = input;
58        self
59    }
60    /// <p>The type of credentials.</p>
61    pub fn get_config_type(&self) -> &::std::option::Option<::std::string::String> {
62        &self.config_type
63    }
64    /// <p>The chrystoki.conf configuration file.</p>
65    pub fn config_file(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.config_file = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The chrystoki.conf configuration file.</p>
70    pub fn set_config_file(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.config_file = input;
72        self
73    }
74    /// <p>The chrystoki.conf configuration file.</p>
75    pub fn get_config_file(&self) -> &::std::option::Option<::std::string::String> {
76        &self.config_file
77    }
78    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
79    pub fn config_cred(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.config_cred = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
84    pub fn set_config_cred(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.config_cred = input;
86        self
87    }
88    /// <p>The certificate file containing the server.pem files of the HSMs.</p>
89    pub fn get_config_cred(&self) -> &::std::option::Option<::std::string::String> {
90        &self.config_cred
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`GetConfigOutput`](crate::operation::get_config::GetConfigOutput).
102    pub fn build(self) -> crate::operation::get_config::GetConfigOutput {
103        crate::operation::get_config::GetConfigOutput {
104            config_type: self.config_type,
105            config_file: self.config_file,
106            config_cred: self.config_cred,
107            _request_id: self._request_id,
108        }
109    }
110}