aws_sdk_rds/operation/describe_certificates/_describe_certificates_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Data returned by the <b>DescribeCertificates</b> action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeCertificatesOutput {
7 /// <p>The default root CA for new databases created by your Amazon Web Services account. This is either the root CA override set on your Amazon Web Services account or the system default CA for the Region if no override exists. To override the default CA, use the <code>ModifyCertificates</code> operation.</p>
8 pub default_certificate_for_new_launches: ::std::option::Option<::std::string::String>,
9 /// <p>The list of <code>Certificate</code> objects for the Amazon Web Services account.</p>
10 pub certificates: ::std::option::Option<::std::vec::Vec<crate::types::Certificate>>,
11 /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code> .</p>
12 pub marker: ::std::option::Option<::std::string::String>,
13 _request_id: Option<String>,
14}
15impl DescribeCertificatesOutput {
16 /// <p>The default root CA for new databases created by your Amazon Web Services account. This is either the root CA override set on your Amazon Web Services account or the system default CA for the Region if no override exists. To override the default CA, use the <code>ModifyCertificates</code> operation.</p>
17 pub fn default_certificate_for_new_launches(&self) -> ::std::option::Option<&str> {
18 self.default_certificate_for_new_launches.as_deref()
19 }
20 /// <p>The list of <code>Certificate</code> objects for the Amazon Web Services account.</p>
21 ///
22 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.certificates.is_none()`.
23 pub fn certificates(&self) -> &[crate::types::Certificate] {
24 self.certificates.as_deref().unwrap_or_default()
25 }
26 /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code> .</p>
27 pub fn marker(&self) -> ::std::option::Option<&str> {
28 self.marker.as_deref()
29 }
30}
31impl ::aws_types::request_id::RequestId for DescribeCertificatesOutput {
32 fn request_id(&self) -> Option<&str> {
33 self._request_id.as_deref()
34 }
35}
36impl DescribeCertificatesOutput {
37 /// Creates a new builder-style object to manufacture [`DescribeCertificatesOutput`](crate::operation::describe_certificates::DescribeCertificatesOutput).
38 pub fn builder() -> crate::operation::describe_certificates::builders::DescribeCertificatesOutputBuilder {
39 crate::operation::describe_certificates::builders::DescribeCertificatesOutputBuilder::default()
40 }
41}
42
43/// A builder for [`DescribeCertificatesOutput`](crate::operation::describe_certificates::DescribeCertificatesOutput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct DescribeCertificatesOutputBuilder {
47 pub(crate) default_certificate_for_new_launches: ::std::option::Option<::std::string::String>,
48 pub(crate) certificates: ::std::option::Option<::std::vec::Vec<crate::types::Certificate>>,
49 pub(crate) marker: ::std::option::Option<::std::string::String>,
50 _request_id: Option<String>,
51}
52impl DescribeCertificatesOutputBuilder {
53 /// <p>The default root CA for new databases created by your Amazon Web Services account. This is either the root CA override set on your Amazon Web Services account or the system default CA for the Region if no override exists. To override the default CA, use the <code>ModifyCertificates</code> operation.</p>
54 pub fn default_certificate_for_new_launches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.default_certificate_for_new_launches = ::std::option::Option::Some(input.into());
56 self
57 }
58 /// <p>The default root CA for new databases created by your Amazon Web Services account. This is either the root CA override set on your Amazon Web Services account or the system default CA for the Region if no override exists. To override the default CA, use the <code>ModifyCertificates</code> operation.</p>
59 pub fn set_default_certificate_for_new_launches(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.default_certificate_for_new_launches = input;
61 self
62 }
63 /// <p>The default root CA for new databases created by your Amazon Web Services account. This is either the root CA override set on your Amazon Web Services account or the system default CA for the Region if no override exists. To override the default CA, use the <code>ModifyCertificates</code> operation.</p>
64 pub fn get_default_certificate_for_new_launches(&self) -> &::std::option::Option<::std::string::String> {
65 &self.default_certificate_for_new_launches
66 }
67 /// Appends an item to `certificates`.
68 ///
69 /// To override the contents of this collection use [`set_certificates`](Self::set_certificates).
70 ///
71 /// <p>The list of <code>Certificate</code> objects for the Amazon Web Services account.</p>
72 pub fn certificates(mut self, input: crate::types::Certificate) -> Self {
73 let mut v = self.certificates.unwrap_or_default();
74 v.push(input);
75 self.certificates = ::std::option::Option::Some(v);
76 self
77 }
78 /// <p>The list of <code>Certificate</code> objects for the Amazon Web Services account.</p>
79 pub fn set_certificates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Certificate>>) -> Self {
80 self.certificates = input;
81 self
82 }
83 /// <p>The list of <code>Certificate</code> objects for the Amazon Web Services account.</p>
84 pub fn get_certificates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Certificate>> {
85 &self.certificates
86 }
87 /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code> .</p>
88 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89 self.marker = ::std::option::Option::Some(input.into());
90 self
91 }
92 /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code> .</p>
93 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.marker = input;
95 self
96 }
97 /// <p>An optional pagination token provided by a previous <code>DescribeCertificates</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code> .</p>
98 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
99 &self.marker
100 }
101 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
102 self._request_id = Some(request_id.into());
103 self
104 }
105
106 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
107 self._request_id = request_id;
108 self
109 }
110 /// Consumes the builder and constructs a [`DescribeCertificatesOutput`](crate::operation::describe_certificates::DescribeCertificatesOutput).
111 pub fn build(self) -> crate::operation::describe_certificates::DescribeCertificatesOutput {
112 crate::operation::describe_certificates::DescribeCertificatesOutput {
113 default_certificate_for_new_launches: self.default_certificate_for_new_launches,
114 certificates: self.certificates,
115 marker: self.marker,
116 _request_id: self._request_id,
117 }
118 }
119}