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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRevocationStatusInput {
/// <p>The timestamp of the signature that validates the profile or job.</p>
pub signature_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The ID of a signing platform.</p>
pub platform_id: ::std::option::Option<::std::string::String>,
/// <p>The version of a signing profile.</p>
pub profile_version_arn: ::std::option::Option<::std::string::String>,
/// <p>The ARN of a signing job.</p>
pub job_arn: ::std::option::Option<::std::string::String>,
/// <p>A list of composite signed hashes that identify certificates.</p>
/// <p>A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.</p>
/// <p>The following example shows how to calculate a hash for this parameter using OpenSSL commands:</p>
/// <p><code>openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs</code></p>
/// <p><code>openssl sha384 < childCert.tbs -binary > childCertTbsHash</code></p>
/// <p><code>openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs</code></p>
/// <p><code>openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex</code></p>
/// <p><code>cat certificateHash.hex | tr -d '\n'</code></p>
pub certificate_hashes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetRevocationStatusInput {
/// <p>The timestamp of the signature that validates the profile or job.</p>
pub fn signature_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.signature_timestamp.as_ref()
}
/// <p>The ID of a signing platform.</p>
pub fn platform_id(&self) -> ::std::option::Option<&str> {
self.platform_id.as_deref()
}
/// <p>The version of a signing profile.</p>
pub fn profile_version_arn(&self) -> ::std::option::Option<&str> {
self.profile_version_arn.as_deref()
}
/// <p>The ARN of a signing job.</p>
pub fn job_arn(&self) -> ::std::option::Option<&str> {
self.job_arn.as_deref()
}
/// <p>A list of composite signed hashes that identify certificates.</p>
/// <p>A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.</p>
/// <p>The following example shows how to calculate a hash for this parameter using OpenSSL commands:</p>
/// <p><code>openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs</code></p>
/// <p><code>openssl sha384 < childCert.tbs -binary > childCertTbsHash</code></p>
/// <p><code>openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs</code></p>
/// <p><code>openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex</code></p>
/// <p><code>cat certificateHash.hex | tr -d '\n'</code></p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.certificate_hashes.is_none()`.
pub fn certificate_hashes(&self) -> &[::std::string::String] {
self.certificate_hashes.as_deref().unwrap_or_default()
}
}
impl GetRevocationStatusInput {
/// Creates a new builder-style object to manufacture [`GetRevocationStatusInput`](crate::operation::get_revocation_status::GetRevocationStatusInput).
pub fn builder() -> crate::operation::get_revocation_status::builders::GetRevocationStatusInputBuilder {
crate::operation::get_revocation_status::builders::GetRevocationStatusInputBuilder::default()
}
}
/// A builder for [`GetRevocationStatusInput`](crate::operation::get_revocation_status::GetRevocationStatusInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRevocationStatusInputBuilder {
pub(crate) signature_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) platform_id: ::std::option::Option<::std::string::String>,
pub(crate) profile_version_arn: ::std::option::Option<::std::string::String>,
pub(crate) job_arn: ::std::option::Option<::std::string::String>,
pub(crate) certificate_hashes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetRevocationStatusInputBuilder {
/// <p>The timestamp of the signature that validates the profile or job.</p>
/// This field is required.
pub fn signature_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.signature_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp of the signature that validates the profile or job.</p>
pub fn set_signature_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.signature_timestamp = input;
self
}
/// <p>The timestamp of the signature that validates the profile or job.</p>
pub fn get_signature_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.signature_timestamp
}
/// <p>The ID of a signing platform.</p>
/// This field is required.
pub fn platform_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.platform_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of a signing platform.</p>
pub fn set_platform_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.platform_id = input;
self
}
/// <p>The ID of a signing platform.</p>
pub fn get_platform_id(&self) -> &::std::option::Option<::std::string::String> {
&self.platform_id
}
/// <p>The version of a signing profile.</p>
/// This field is required.
pub fn profile_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_version_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of a signing profile.</p>
pub fn set_profile_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_version_arn = input;
self
}
/// <p>The version of a signing profile.</p>
pub fn get_profile_version_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_version_arn
}
/// <p>The ARN of a signing job.</p>
/// This field is required.
pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of a signing job.</p>
pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_arn = input;
self
}
/// <p>The ARN of a signing job.</p>
pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.job_arn
}
/// Appends an item to `certificate_hashes`.
///
/// To override the contents of this collection use [`set_certificate_hashes`](Self::set_certificate_hashes).
///
/// <p>A list of composite signed hashes that identify certificates.</p>
/// <p>A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.</p>
/// <p>The following example shows how to calculate a hash for this parameter using OpenSSL commands:</p>
/// <p><code>openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs</code></p>
/// <p><code>openssl sha384 < childCert.tbs -binary > childCertTbsHash</code></p>
/// <p><code>openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs</code></p>
/// <p><code>openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex</code></p>
/// <p><code>cat certificateHash.hex | tr -d '\n'</code></p>
pub fn certificate_hashes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.certificate_hashes.unwrap_or_default();
v.push(input.into());
self.certificate_hashes = ::std::option::Option::Some(v);
self
}
/// <p>A list of composite signed hashes that identify certificates.</p>
/// <p>A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.</p>
/// <p>The following example shows how to calculate a hash for this parameter using OpenSSL commands:</p>
/// <p><code>openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs</code></p>
/// <p><code>openssl sha384 < childCert.tbs -binary > childCertTbsHash</code></p>
/// <p><code>openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs</code></p>
/// <p><code>openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex</code></p>
/// <p><code>cat certificateHash.hex | tr -d '\n'</code></p>
pub fn set_certificate_hashes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.certificate_hashes = input;
self
}
/// <p>A list of composite signed hashes that identify certificates.</p>
/// <p>A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.</p>
/// <p>The following example shows how to calculate a hash for this parameter using OpenSSL commands:</p>
/// <p><code>openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs</code></p>
/// <p><code>openssl sha384 < childCert.tbs -binary > childCertTbsHash</code></p>
/// <p><code>openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs</code></p>
/// <p><code>openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex</code></p>
/// <p><code>cat certificateHash.hex | tr -d '\n'</code></p>
pub fn get_certificate_hashes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.certificate_hashes
}
/// Consumes the builder and constructs a [`GetRevocationStatusInput`](crate::operation::get_revocation_status::GetRevocationStatusInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_revocation_status::GetRevocationStatusInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_revocation_status::GetRevocationStatusInput {
signature_timestamp: self.signature_timestamp,
platform_id: self.platform_id,
profile_version_arn: self.profile_version_arn,
job_arn: self.job_arn,
certificate_hashes: self.certificate_hashes,
})
}
}