#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ImportCertificateInput {
pub certificate_arn: ::std::option::Option<::std::string::String>,
pub certificate: ::std::option::Option<::aws_smithy_types::Blob>,
pub private_key: ::std::option::Option<::aws_smithy_types::Blob>,
pub certificate_chain: ::std::option::Option<::aws_smithy_types::Blob>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl ImportCertificateInput {
pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
self.certificate_arn.as_deref()
}
pub fn certificate(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.certificate.as_ref()
}
pub fn private_key(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.private_key.as_ref()
}
pub fn certificate_chain(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.certificate_chain.as_ref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for ImportCertificateInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ImportCertificateInput");
formatter.field("certificate_arn", &self.certificate_arn);
formatter.field("certificate", &self.certificate);
formatter.field("private_key", &"*** Sensitive Data Redacted ***");
formatter.field("certificate_chain", &self.certificate_chain);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
impl ImportCertificateInput {
pub fn builder() -> crate::operation::import_certificate::builders::ImportCertificateInputBuilder {
crate::operation::import_certificate::builders::ImportCertificateInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ImportCertificateInputBuilder {
pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
pub(crate) certificate: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) private_key: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) certificate_chain: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl ImportCertificateInputBuilder {
pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_arn = input;
self
}
pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_arn
}
pub fn certificate(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.certificate = ::std::option::Option::Some(input);
self
}
pub fn set_certificate(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.certificate = input;
self
}
pub fn get_certificate(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.certificate
}
pub fn private_key(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.private_key = ::std::option::Option::Some(input);
self
}
pub fn set_private_key(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.private_key = input;
self
}
pub fn get_private_key(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.private_key
}
pub fn certificate_chain(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.certificate_chain = ::std::option::Option::Some(input);
self
}
pub fn set_certificate_chain(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.certificate_chain = input;
self
}
pub fn get_certificate_chain(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.certificate_chain
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::import_certificate::ImportCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::import_certificate::ImportCertificateInput {
certificate_arn: self.certificate_arn,
certificate: self.certificate,
private_key: self.private_key,
certificate_chain: self.certificate_chain,
tags: self.tags,
})
}
}
impl ::std::fmt::Debug for ImportCertificateInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ImportCertificateInputBuilder");
formatter.field("certificate_arn", &self.certificate_arn);
formatter.field("certificate", &self.certificate);
formatter.field("private_key", &"*** Sensitive Data Redacted ***");
formatter.field("certificate_chain", &self.certificate_chain);
formatter.field("tags", &self.tags);
formatter.finish()
}
}