aws-sdk-cloudfront 1.115.0

AWS SDK for Amazon CloudFront
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A list of Amazon Web Services accounts and the active CloudFront key pairs in each account that CloudFront can use to verify the signatures of signed URLs and signed cookies.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Signer {
    /// <p>An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs is the same account that owns the CloudFront distribution, the value of this field is <code>self</code>.</p>
    pub aws_account_number: ::std::option::Option<::std::string::String>,
    /// <p>A list of CloudFront key pair identifiers.</p>
    pub key_pair_ids: ::std::option::Option<crate::types::KeyPairIds>,
}
impl Signer {
    /// <p>An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs is the same account that owns the CloudFront distribution, the value of this field is <code>self</code>.</p>
    pub fn aws_account_number(&self) -> ::std::option::Option<&str> {
        self.aws_account_number.as_deref()
    }
    /// <p>A list of CloudFront key pair identifiers.</p>
    pub fn key_pair_ids(&self) -> ::std::option::Option<&crate::types::KeyPairIds> {
        self.key_pair_ids.as_ref()
    }
}
impl Signer {
    /// Creates a new builder-style object to manufacture [`Signer`](crate::types::Signer).
    pub fn builder() -> crate::types::builders::SignerBuilder {
        crate::types::builders::SignerBuilder::default()
    }
}

/// A builder for [`Signer`](crate::types::Signer).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SignerBuilder {
    pub(crate) aws_account_number: ::std::option::Option<::std::string::String>,
    pub(crate) key_pair_ids: ::std::option::Option<crate::types::KeyPairIds>,
}
impl SignerBuilder {
    /// <p>An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs is the same account that owns the CloudFront distribution, the value of this field is <code>self</code>.</p>
    pub fn aws_account_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs is the same account that owns the CloudFront distribution, the value of this field is <code>self</code>.</p>
    pub fn set_aws_account_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_number = input;
        self
    }
    /// <p>An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs is the same account that owns the CloudFront distribution, the value of this field is <code>self</code>.</p>
    pub fn get_aws_account_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_number
    }
    /// <p>A list of CloudFront key pair identifiers.</p>
    pub fn key_pair_ids(mut self, input: crate::types::KeyPairIds) -> Self {
        self.key_pair_ids = ::std::option::Option::Some(input);
        self
    }
    /// <p>A list of CloudFront key pair identifiers.</p>
    pub fn set_key_pair_ids(mut self, input: ::std::option::Option<crate::types::KeyPairIds>) -> Self {
        self.key_pair_ids = input;
        self
    }
    /// <p>A list of CloudFront key pair identifiers.</p>
    pub fn get_key_pair_ids(&self) -> &::std::option::Option<crate::types::KeyPairIds> {
        &self.key_pair_ids
    }
    /// Consumes the builder and constructs a [`Signer`](crate::types::Signer).
    pub fn build(self) -> crate::types::Signer {
        crate::types::Signer {
            aws_account_number: self.aws_account_number,
            key_pair_ids: self.key_pair_ids,
        }
    }
}