aws-sdk-signerdata 1.5.0

AWS SDK for AWS Signer Data Plane
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Request structure for checking revocation status.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRevocationStatusInput {
    /// <p>The timestamp when the artifact was signed, in ISO 8601 format.</p>
    pub signature_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The platform identifier for the signing platform used.</p>
    pub platform_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the signing profile version used to sign the artifact.</p>
    pub profile_version_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the signing job that produced the signature.</p>
    pub job_arn: ::std::option::Option<::std::string::String>,
    /// <p>List of certificate hashes to check for revocation.</p>
    pub certificate_hashes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl GetRevocationStatusInput {
    /// <p>The timestamp when the artifact was signed, in ISO 8601 format.</p>
    pub fn signature_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.signature_timestamp.as_ref()
    }
    /// <p>The platform identifier for the signing platform used.</p>
    pub fn platform_id(&self) -> ::std::option::Option<&str> {
        self.platform_id.as_deref()
    }
    /// <p>The ARN of the signing profile version used to sign the artifact.</p>
    pub fn profile_version_arn(&self) -> ::std::option::Option<&str> {
        self.profile_version_arn.as_deref()
    }
    /// <p>The ARN of the signing job that produced the signature.</p>
    pub fn job_arn(&self) -> ::std::option::Option<&str> {
        self.job_arn.as_deref()
    }
    /// <p>List of certificate hashes to check for revocation.</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 when the artifact was signed, in ISO 8601 format.</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 when the artifact was signed, in ISO 8601 format.</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 when the artifact was signed, in ISO 8601 format.</p>
    pub fn get_signature_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.signature_timestamp
    }
    /// <p>The platform identifier for the signing platform used.</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 platform identifier for the signing platform used.</p>
    pub fn set_platform_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform_id = input;
        self
    }
    /// <p>The platform identifier for the signing platform used.</p>
    pub fn get_platform_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform_id
    }
    /// <p>The ARN of the signing profile version used to sign the artifact.</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 ARN of the signing profile version used to sign the artifact.</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 ARN of the signing profile version used to sign the artifact.</p>
    pub fn get_profile_version_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_version_arn
    }
    /// <p>The ARN of the signing job that produced the signature.</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 the signing job that produced the signature.</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 the signing job that produced the signature.</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>List of certificate hashes to check for revocation.</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>List of certificate hashes to check for revocation.</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>List of certificate hashes to check for revocation.</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,
        })
    }
}