1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Defines a <code>PolicyInformation</code> qualifier. Amazon Web Services Private CA supports the <a href="https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.4">certification practice statement (CPS) qualifier</a> defined in RFC 5280.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Qualifier {
/// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
pub cps_uri: ::std::string::String,
}
impl Qualifier {
/// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
pub fn cps_uri(&self) -> &str {
use std::ops::Deref;
self.cps_uri.deref()
}
}
impl Qualifier {
/// Creates a new builder-style object to manufacture [`Qualifier`](crate::types::Qualifier).
pub fn builder() -> crate::types::builders::QualifierBuilder {
crate::types::builders::QualifierBuilder::default()
}
}
/// A builder for [`Qualifier`](crate::types::Qualifier).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct QualifierBuilder {
pub(crate) cps_uri: ::std::option::Option<::std::string::String>,
}
impl QualifierBuilder {
/// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
/// This field is required.
pub fn cps_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cps_uri = ::std::option::Option::Some(input.into());
self
}
/// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
pub fn set_cps_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cps_uri = input;
self
}
/// <p>Contains a pointer to a certification practice statement (CPS) published by the CA.</p>
pub fn get_cps_uri(&self) -> &::std::option::Option<::std::string::String> {
&self.cps_uri
}
/// Consumes the builder and constructs a [`Qualifier`](crate::types::Qualifier).
/// This method will fail if any of the following fields are not set:
/// - [`cps_uri`](crate::types::builders::QualifierBuilder::cps_uri)
pub fn build(self) -> ::std::result::Result<crate::types::Qualifier, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Qualifier {
cps_uri: self.cps_uri.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"cps_uri",
"cps_uri was not specified but it is required when building Qualifier",
)
})?,
})
}
}