// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(std::fmt::Debug)]
pub(crate) struct Handle<C = aws_hyper::DynConnector> {
    client: aws_hyper::Client<C>,
    conf: crate::Config,
}

#[derive(Clone, std::fmt::Debug)]
pub struct Client<C = aws_hyper::DynConnector> {
    handle: std::sync::Arc<Handle<C>>,
}
impl<C> Client<C> {
    pub fn from_conf_conn(conf: crate::Config, conn: C) -> Self {
        let client = aws_hyper::Client::new(conn);
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }

    pub fn conf(&self) -> &crate::Config {
        &self.handle.conf
    }
}
impl Client {
    #[cfg(any(feature = "rustls", feature = "native-tls"))]
    pub fn from_env() -> Self {
        Self::from_conf(crate::Config::builder().build())
    }

    #[cfg(any(feature = "rustls", feature = "native-tls"))]
    pub fn from_conf(conf: crate::Config) -> Self {
        let client = aws_hyper::Client::https();
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }
}
impl<C> Client<C>
where
    C: aws_hyper::SmithyConnector,
{
    pub fn create_certificate_authority(&self) -> fluent_builders::CreateCertificateAuthority<C> {
        fluent_builders::CreateCertificateAuthority::new(self.handle.clone())
    }
    pub fn create_certificate_authority_audit_report(
        &self,
    ) -> fluent_builders::CreateCertificateAuthorityAuditReport<C> {
        fluent_builders::CreateCertificateAuthorityAuditReport::new(self.handle.clone())
    }
    pub fn create_permission(&self) -> fluent_builders::CreatePermission<C> {
        fluent_builders::CreatePermission::new(self.handle.clone())
    }
    pub fn delete_certificate_authority(&self) -> fluent_builders::DeleteCertificateAuthority<C> {
        fluent_builders::DeleteCertificateAuthority::new(self.handle.clone())
    }
    pub fn delete_permission(&self) -> fluent_builders::DeletePermission<C> {
        fluent_builders::DeletePermission::new(self.handle.clone())
    }
    pub fn delete_policy(&self) -> fluent_builders::DeletePolicy<C> {
        fluent_builders::DeletePolicy::new(self.handle.clone())
    }
    pub fn describe_certificate_authority(
        &self,
    ) -> fluent_builders::DescribeCertificateAuthority<C> {
        fluent_builders::DescribeCertificateAuthority::new(self.handle.clone())
    }
    pub fn describe_certificate_authority_audit_report(
        &self,
    ) -> fluent_builders::DescribeCertificateAuthorityAuditReport<C> {
        fluent_builders::DescribeCertificateAuthorityAuditReport::new(self.handle.clone())
    }
    pub fn get_certificate(&self) -> fluent_builders::GetCertificate<C> {
        fluent_builders::GetCertificate::new(self.handle.clone())
    }
    pub fn get_certificate_authority_certificate(
        &self,
    ) -> fluent_builders::GetCertificateAuthorityCertificate<C> {
        fluent_builders::GetCertificateAuthorityCertificate::new(self.handle.clone())
    }
    pub fn get_certificate_authority_csr(&self) -> fluent_builders::GetCertificateAuthorityCsr<C> {
        fluent_builders::GetCertificateAuthorityCsr::new(self.handle.clone())
    }
    pub fn get_policy(&self) -> fluent_builders::GetPolicy<C> {
        fluent_builders::GetPolicy::new(self.handle.clone())
    }
    pub fn import_certificate_authority_certificate(
        &self,
    ) -> fluent_builders::ImportCertificateAuthorityCertificate<C> {
        fluent_builders::ImportCertificateAuthorityCertificate::new(self.handle.clone())
    }
    pub fn issue_certificate(&self) -> fluent_builders::IssueCertificate<C> {
        fluent_builders::IssueCertificate::new(self.handle.clone())
    }
    pub fn list_certificate_authorities(&self) -> fluent_builders::ListCertificateAuthorities<C> {
        fluent_builders::ListCertificateAuthorities::new(self.handle.clone())
    }
    pub fn list_permissions(&self) -> fluent_builders::ListPermissions<C> {
        fluent_builders::ListPermissions::new(self.handle.clone())
    }
    pub fn list_tags(&self) -> fluent_builders::ListTags<C> {
        fluent_builders::ListTags::new(self.handle.clone())
    }
    pub fn put_policy(&self) -> fluent_builders::PutPolicy<C> {
        fluent_builders::PutPolicy::new(self.handle.clone())
    }
    pub fn restore_certificate_authority(&self) -> fluent_builders::RestoreCertificateAuthority<C> {
        fluent_builders::RestoreCertificateAuthority::new(self.handle.clone())
    }
    pub fn revoke_certificate(&self) -> fluent_builders::RevokeCertificate<C> {
        fluent_builders::RevokeCertificate::new(self.handle.clone())
    }
    pub fn tag_certificate_authority(&self) -> fluent_builders::TagCertificateAuthority<C> {
        fluent_builders::TagCertificateAuthority::new(self.handle.clone())
    }
    pub fn untag_certificate_authority(&self) -> fluent_builders::UntagCertificateAuthority<C> {
        fluent_builders::UntagCertificateAuthority::new(self.handle.clone())
    }
    pub fn update_certificate_authority(&self) -> fluent_builders::UpdateCertificateAuthority<C> {
        fluent_builders::UpdateCertificateAuthority::new(self.handle.clone())
    }
}
pub mod fluent_builders {
    #[derive(std::fmt::Debug)]
    pub struct CreateCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::create_certificate_authority_input::Builder,
    }
    impl<C> CreateCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::CreateCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>Name and bit size of the private key algorithm, the name of the signing algorithm, and
        /// X.500 certificate subject information.</p>
        pub fn certificate_authority_configuration(
            mut self,
            input: crate::model::CertificateAuthorityConfiguration,
        ) -> Self {
            self.inner = self.inner.certificate_authority_configuration(input);
            self
        }
        pub fn set_certificate_authority_configuration(
            mut self,
            input: std::option::Option<crate::model::CertificateAuthorityConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_configuration(input);
            self
        }
        /// <p>Contains a Boolean value that you can use to enable a certification revocation list
        /// (CRL) for the CA, the name of the S3 bucket to which ACM Private CA will write the CRL, and an
        /// optional CNAME alias that you can use to hide the name of your bucket in the <b>CRL Distribution Points</b> extension of your CA certificate. For
        /// more information, see the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CrlConfiguration.html">CrlConfiguration</a> structure.
        /// </p>
        pub fn revocation_configuration(
            mut self,
            input: crate::model::RevocationConfiguration,
        ) -> Self {
            self.inner = self.inner.revocation_configuration(input);
            self
        }
        pub fn set_revocation_configuration(
            mut self,
            input: std::option::Option<crate::model::RevocationConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_revocation_configuration(input);
            self
        }
        /// <p>The type of the certificate authority.</p>
        pub fn certificate_authority_type(
            mut self,
            input: crate::model::CertificateAuthorityType,
        ) -> Self {
            self.inner = self.inner.certificate_authority_type(input);
            self
        }
        pub fn set_certificate_authority_type(
            mut self,
            input: std::option::Option<crate::model::CertificateAuthorityType>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_type(input);
            self
        }
        /// <p>Custom string that can be used to distinguish between calls to the <b>CreateCertificateAuthority</b> action. Idempotency tokens for
        /// <b>CreateCertificateAuthority</b> time out after five
        /// minutes. Therefore, if you call <b>CreateCertificateAuthority</b> multiple times with the same idempotency
        /// token within five minutes, ACM Private CA recognizes that you are requesting only certificate
        /// authority and will issue only one. If you change the idempotency token for each call,
        /// PCA recognizes that you are requesting multiple certificate authorities.</p>
        pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.idempotency_token(input);
            self
        }
        pub fn set_idempotency_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_idempotency_token(input);
            self
        }
        /// <p>Specifies a
        /// cryptographic key management compliance standard used for handling CA keys.</p>
        /// <p>Default: FIPS_140_2_LEVEL_3_OR_HIGHER</p>
        /// <p>Note: <code>FIPS_140_2_LEVEL_3_OR_HIGHER</code> is not supported in Region
        /// ap-northeast-3. When creating a CA in the ap-northeast-3, you must provide
        /// <code>FIPS_140_2_LEVEL_2_OR_HIGHER</code> as the argument for
        /// <code>KeyStorageSecurityStandard</code>. Failure to do this results in an
        /// <code>InvalidArgsException</code> with the message, "A certificate authority cannot
        /// be created in this region with the specified security standard."</p>
        pub fn key_storage_security_standard(
            mut self,
            input: crate::model::KeyStorageSecurityStandard,
        ) -> Self {
            self.inner = self.inner.key_storage_security_standard(input);
            self
        }
        pub fn set_key_storage_security_standard(
            mut self,
            input: std::option::Option<crate::model::KeyStorageSecurityStandard>,
        ) -> Self {
            self.inner = self.inner.set_key_storage_security_standard(input);
            self
        }
        /// <p>Key-value pairs that will be attached to the new private CA. You can associate up to
        /// 50 tags with a private CA. For information using tags with IAM to manage permissions,
        /// see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
        pub fn tags(mut self, inp: impl Into<crate::model::Tag>) -> Self {
            self.inner = self.inner.tags(inp);
            self
        }
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct CreateCertificateAuthorityAuditReport<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::create_certificate_authority_audit_report_input::Builder,
    }
    impl<C> CreateCertificateAuthorityAuditReport<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateCertificateAuthorityAuditReportOutput,
            smithy_http::result::SdkError<crate::error::CreateCertificateAuthorityAuditReportError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the CA to be audited. This is of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.</p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The name of the S3 bucket that will contain the audit report.</p>
        pub fn s3_bucket_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.s3_bucket_name(input);
            self
        }
        pub fn set_s3_bucket_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_s3_bucket_name(input);
            self
        }
        /// <p>The format in which to create the report. This can be either <b>JSON</b> or <b>CSV</b>.</p>
        pub fn audit_report_response_format(
            mut self,
            input: crate::model::AuditReportResponseFormat,
        ) -> Self {
            self.inner = self.inner.audit_report_response_format(input);
            self
        }
        pub fn set_audit_report_response_format(
            mut self,
            input: std::option::Option<crate::model::AuditReportResponseFormat>,
        ) -> Self {
            self.inner = self.inner.set_audit_report_response_format(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct CreatePermission<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::create_permission_input::Builder,
    }
    impl<C> CreatePermission<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreatePermissionOutput,
            smithy_http::result::SdkError<crate::error::CreatePermissionError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the CA that grants the permissions. You can find the
        /// ARN by calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The AWS service or identity that receives the permission. At this time, the only
        /// valid principal is <code>acm.amazonaws.com</code>.</p>
        pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.principal(input);
            self
        }
        pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_principal(input);
            self
        }
        /// <p>The ID of the calling account.</p>
        pub fn source_account(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.source_account(input);
            self
        }
        pub fn set_source_account(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_source_account(input);
            self
        }
        /// <p>The actions that the specified AWS service principal can use. These include
        /// <code>IssueCertificate</code>, <code>GetCertificate</code>, and
        /// <code>ListPermissions</code>.</p>
        pub fn actions(mut self, inp: impl Into<crate::model::ActionType>) -> Self {
            self.inner = self.inner.actions(inp);
            self
        }
        pub fn set_actions(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ActionType>>,
        ) -> Self {
            self.inner = self.inner.set_actions(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct DeleteCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::delete_certificate_authority_input::Builder,
    }
    impl<C> DeleteCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeleteCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::DeleteCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must have the following form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The number of days to make a CA restorable after it has been deleted. This can be
        /// anywhere from 7 to 30 days, with 30 being the default.</p>
        pub fn permanent_deletion_time_in_days(mut self, input: i32) -> Self {
            self.inner = self.inner.permanent_deletion_time_in_days(input);
            self
        }
        pub fn set_permanent_deletion_time_in_days(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.inner = self.inner.set_permanent_deletion_time_in_days(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct DeletePermission<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::delete_permission_input::Builder,
    }
    impl<C> DeletePermission<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeletePermissionOutput,
            smithy_http::result::SdkError<crate::error::DeletePermissionError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Number (ARN) of the private CA that issued the permissions. You
        /// can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must have the following form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The AWS service or identity that will have its CA permissions revoked. At this time,
        /// the only valid service principal is <code>acm.amazonaws.com</code>
        /// </p>
        pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.principal(input);
            self
        }
        pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_principal(input);
            self
        }
        /// <p>The AWS account that calls this action.</p>
        pub fn source_account(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.source_account(input);
            self
        }
        pub fn set_source_account(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_source_account(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct DeletePolicy<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::delete_policy_input::Builder,
    }
    impl<C> DeletePolicy<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeletePolicyOutput,
            smithy_http::result::SdkError<crate::error::DeletePolicyError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Number (ARN) of the private CA that will have its policy deleted.
        /// You can find the CA's ARN by calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. The ARN value must have the form
        /// <code>arn:aws:acm-pca:region:account:certificate-authority/01234567-89ab-cdef-0123-0123456789ab</code>.
        /// </p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input);
            self
        }
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct DescribeCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::describe_certificate_authority_input::Builder,
    }
    impl<C> DescribeCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::DescribeCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct DescribeCertificateAuthorityAuditReport<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::describe_certificate_authority_audit_report_input::Builder,
    }
    impl<C> DescribeCertificateAuthorityAuditReport<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeCertificateAuthorityAuditReportOutput,
            smithy_http::result::SdkError<
                crate::error::DescribeCertificateAuthorityAuditReportError,
            >,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of the private CA. This must be of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The report ID returned by calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthorityAuditReport.html">CreateCertificateAuthorityAuditReport</a> action.</p>
        pub fn audit_report_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.audit_report_id(input);
            self
        }
        pub fn set_audit_report_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_audit_report_id(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct GetCertificate<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::get_certificate_input::Builder,
    }
    impl<C> GetCertificate<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetCertificateOutput,
            smithy_http::result::SdkError<crate::error::GetCertificateError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The ARN of the issued certificate. The ARN contains the certificate serial number and
        /// must be in the following form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>/certificate/<i>286535153982981100925020015808220737245</i>
        /// </code>
        /// </p>
        pub fn certificate_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_arn(input);
            self
        }
        pub fn set_certificate_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct GetCertificateAuthorityCertificate<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::get_certificate_authority_certificate_input::Builder,
    }
    impl<C> GetCertificateAuthorityCertificate<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetCertificateAuthorityCertificateOutput,
            smithy_http::result::SdkError<crate::error::GetCertificateAuthorityCertificateError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) of your private CA. This is of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>.
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct GetCertificateAuthorityCsr<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::get_certificate_authority_csr_input::Builder,
    }
    impl<C> GetCertificateAuthorityCsr<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetCertificateAuthorityCsrOutput,
            smithy_http::result::SdkError<crate::error::GetCertificateAuthorityCsrError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a> action. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct GetPolicy<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::get_policy_input::Builder,
    }
    impl<C> GetPolicy<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetPolicyOutput,
            smithy_http::result::SdkError<crate::error::GetPolicyError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Number (ARN) of the private CA that will have its policy
        /// retrieved. You can find the CA's ARN by calling the ListCertificateAuthorities action.
        /// </p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input);
            self
        }
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct ImportCertificateAuthorityCertificate<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::import_certificate_authority_certificate_input::Builder,
    }
    impl<C> ImportCertificateAuthorityCertificate<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ImportCertificateAuthorityCertificateOutput,
            smithy_http::result::SdkError<crate::error::ImportCertificateAuthorityCertificateError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The PEM-encoded certificate for a private CA. This may be a self-signed certificate in
        /// the case of a root CA, or it may be signed by another CA that you control.</p>
        pub fn certificate(mut self, input: smithy_types::Blob) -> Self {
            self.inner = self.inner.certificate(input);
            self
        }
        pub fn set_certificate(mut self, input: std::option::Option<smithy_types::Blob>) -> Self {
            self.inner = self.inner.set_certificate(input);
            self
        }
        /// <p>A PEM-encoded file that contains all of your certificates, other than the certificate
        /// you're importing, chaining up to your root CA. Your ACM Private CA-hosted or on-premises root
        /// certificate is the last in the chain, and each certificate in the chain signs the one
        /// preceding. </p>
        /// <p>This parameter must be supplied when you import a subordinate CA. When you import a
        /// root CA, there is no chain.</p>
        pub fn certificate_chain(mut self, input: smithy_types::Blob) -> Self {
            self.inner = self.inner.certificate_chain(input);
            self
        }
        pub fn set_certificate_chain(
            mut self,
            input: std::option::Option<smithy_types::Blob>,
        ) -> Self {
            self.inner = self.inner.set_certificate_chain(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct IssueCertificate<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::issue_certificate_input::Builder,
    }
    impl<C> IssueCertificate<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::IssueCertificateOutput,
            smithy_http::result::SdkError<crate::error::IssueCertificateError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>Specifies X.509 certificate information to be included in the issued certificate. An
        /// <code>APIPassthrough</code> or <code>APICSRPassthrough</code> template variant must
        /// be selected, or else this parameter is ignored. For more information about using these
        /// templates, see <a href="https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html">Understanding Certificate Templates</a>.</p>
        /// <p>If conflicting or duplicate certificate information is supplied during certificate
        /// issuance, ACM Private CA applies <a href="https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html#template-order-of-operations">order of
        /// operation rules</a> to determine what information is used.</p>
        pub fn api_passthrough(mut self, input: crate::model::ApiPassthrough) -> Self {
            self.inner = self.inner.api_passthrough(input);
            self
        }
        pub fn set_api_passthrough(
            mut self,
            input: std::option::Option<crate::model::ApiPassthrough>,
        ) -> Self {
            self.inner = self.inner.set_api_passthrough(input);
            self
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>The certificate signing request (CSR) for the certificate you want to issue. As an
        /// example, you can use the following OpenSSL command to create the CSR and a 2048 bit RSA
        /// private key. </p>
        /// <p>
        /// <code>openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem
        /// -out csr/test_cert_.csr</code>
        /// </p>
        /// <p>If you have a configuration file, you can then use the following OpenSSL command. The
        /// <code>usr_cert</code> block in the configuration file contains your X509 version 3
        /// extensions. </p>
        /// <p>
        /// <code>openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048
        /// -days -365 -keyout private/test_cert_priv_key.pem -out
        /// csr/test_cert_.csr</code>
        /// </p>
        /// <p>Note: A CSR must provide either a <i>subject name</i> or a
        /// <i>subject alternative name</i> or the request will be rejected.
        /// </p>
        pub fn csr(mut self, input: smithy_types::Blob) -> Self {
            self.inner = self.inner.csr(input);
            self
        }
        pub fn set_csr(mut self, input: std::option::Option<smithy_types::Blob>) -> Self {
            self.inner = self.inner.set_csr(input);
            self
        }
        /// <p>The name of the algorithm that will be used to sign the certificate to be issued. </p>
        /// <p>This parameter should not be confused with the <code>SigningAlgorithm</code> parameter
        /// used to sign a CSR in the <code>CreateCertificateAuthority</code> action.</p>
        pub fn signing_algorithm(mut self, input: crate::model::SigningAlgorithm) -> Self {
            self.inner = self.inner.signing_algorithm(input);
            self
        }
        pub fn set_signing_algorithm(
            mut self,
            input: std::option::Option<crate::model::SigningAlgorithm>,
        ) -> Self {
            self.inner = self.inner.set_signing_algorithm(input);
            self
        }
        /// <p>Specifies a custom configuration template to use when issuing a certificate. If this
        /// parameter is not provided, ACM Private CA defaults to the <code>EndEntityCertificate/V1</code>
        /// template. For CA certificates, you should choose the shortest path length that meets
        /// your needs. The path length is indicated by the PathLen<i>N</i> portion of
        /// the ARN, where <i>N</i> is the <a href="https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaTerms.html#terms-cadepth">CA depth</a>.</p>
        /// <p>Note: The CA depth configured on a subordinate CA certificate must not exceed the
        /// limit set by its parents in the CA hierarchy.</p>
        /// <p>For a list of <code>TemplateArn</code> values supported by ACM Private CA, see <a href="https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html">Understanding Certificate
        /// Templates</a>.</p>
        pub fn template_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.template_arn(input);
            self
        }
        pub fn set_template_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_template_arn(input);
            self
        }
        /// <p>Information describing the end of the validity period of the certificate. This
        /// parameter sets the “Not After” date for the certificate.</p>
        /// <p>Certificate validity is the period of time during which a certificate is valid.
        /// Validity can be expressed as an explicit date and time when the certificate expires, or
        /// as a span of time after issuance, stated in days, months, or years. For more
        /// information, see <a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.5">Validity</a> in RFC 5280. </p>
        /// <p>This value is unaffected when <code>ValidityNotBefore</code> is also specified. For
        /// example, if <code>Validity</code> is set to 20 days in the future, the certificate will
        /// expire 20 days from issuance time regardless of the <code>ValidityNotBefore</code>
        /// value.</p>
        /// <p>The end of the validity period configured on a certificate must not exceed the limit
        /// set on its parents in the CA hierarchy.</p>
        pub fn validity(mut self, input: crate::model::Validity) -> Self {
            self.inner = self.inner.validity(input);
            self
        }
        pub fn set_validity(mut self, input: std::option::Option<crate::model::Validity>) -> Self {
            self.inner = self.inner.set_validity(input);
            self
        }
        /// <p>Information describing the start of the validity period of the certificate. This
        /// parameter sets the “Not Before" date for the certificate.</p>
        /// <p>By default, when issuing a certificate, ACM Private CA sets the "Not Before" date to the
        /// issuance time minus 60 minutes. This compensates for clock inconsistencies across
        /// computer systems. The <code>ValidityNotBefore</code> parameter can be used to customize
        /// the “Not Before” value. </p>
        /// <p>Unlike the <code>Validity</code> parameter, the <code>ValidityNotBefore</code>
        /// parameter is optional.</p>
        /// <p>The <code>ValidityNotBefore</code> value is expressed as an explicit date and time,
        /// using the <code>Validity</code> type value <code>ABSOLUTE</code>. For more information,
        /// see <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_Validity.html">Validity</a> in this API reference and <a href="https://tools.ietf.org/html/rfc5280#section-4.1.2.5">Validity</a> in RFC
        /// 5280.</p>
        pub fn validity_not_before(mut self, input: crate::model::Validity) -> Self {
            self.inner = self.inner.validity_not_before(input);
            self
        }
        pub fn set_validity_not_before(
            mut self,
            input: std::option::Option<crate::model::Validity>,
        ) -> Self {
            self.inner = self.inner.set_validity_not_before(input);
            self
        }
        /// <p>Alphanumeric string that can be used to distinguish between calls to the <b>IssueCertificate</b> action. Idempotency tokens for <b>IssueCertificate</b> time out after one minute. Therefore, if you
        /// call <b>IssueCertificate</b> multiple times with the same
        /// idempotency token within one minute, ACM Private CA recognizes that you are requesting only one
        /// certificate and will issue only one. If you change the idempotency token for each call,
        /// PCA recognizes that you are requesting multiple certificates.</p>
        pub fn idempotency_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.idempotency_token(input);
            self
        }
        pub fn set_idempotency_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_idempotency_token(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct ListCertificateAuthorities<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::list_certificate_authorities_input::Builder,
    }
    impl<C> ListCertificateAuthorities<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListCertificateAuthoritiesOutput,
            smithy_http::result::SdkError<crate::error::ListCertificateAuthoritiesError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>Use this parameter when paginating results in a subsequent request after you receive a
        /// response with truncated results. Set it to the value of the <code>NextToken</code>
        /// parameter from the response you just received.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input);
            self
        }
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>Use this parameter when paginating results to specify the maximum number of items to
        /// return in the response on each page. If additional items exist beyond the number you
        /// specify, the <code>NextToken</code> element is sent in the response. Use this
        /// <code>NextToken</code> value in a subsequent request to retrieve additional
        /// items.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>Use this parameter to filter the returned set of certificate authorities based on
        /// their owner. The default is SELF.</p>
        pub fn resource_owner(mut self, input: crate::model::ResourceOwner) -> Self {
            self.inner = self.inner.resource_owner(input);
            self
        }
        pub fn set_resource_owner(
            mut self,
            input: std::option::Option<crate::model::ResourceOwner>,
        ) -> Self {
            self.inner = self.inner.set_resource_owner(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct ListPermissions<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::list_permissions_input::Builder,
    }
    impl<C> ListPermissions<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListPermissionsOutput,
            smithy_http::result::SdkError<crate::error::ListPermissionsError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Number (ARN) of the private CA to inspect. You can find the ARN by
        /// calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action. This must be of the form:
        /// <code>arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012</code>
        /// You can get a private CA's ARN by running the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action.</p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>When paginating results, use this parameter in a subsequent request after you receive
        /// a response with truncated results. Set it to the value of <b>NextToken</b> from the response you just received.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input);
            self
        }
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>When paginating results, use this parameter to specify the maximum number of items to
        /// return in the response. If additional items exist beyond the number you specify, the
        /// <b>NextToken</b> element is sent in the response. Use this
        /// <b>NextToken</b> value in a subsequent request to retrieve
        /// additional items.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct ListTags<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::list_tags_input::Builder,
    }
    impl<C> ListTags<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListTagsOutput,
            smithy_http::result::SdkError<crate::error::ListTagsError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a> action. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>Use this parameter when paginating results in a subsequent request after you receive a
        /// response with truncated results. Set it to the value of <b>NextToken</b> from the response you just received.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input);
            self
        }
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>Use this parameter when paginating results to specify the maximum number of items to
        /// return in the response. If additional items exist beyond the number you specify, the
        /// <b>NextToken</b> element is sent in the response. Use this
        /// <b>NextToken</b> value in a subsequent request to retrieve
        /// additional items.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct PutPolicy<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::put_policy_input::Builder,
    }
    impl<C> PutPolicy<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::PutPolicyOutput,
            smithy_http::result::SdkError<crate::error::PutPolicyError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Number (ARN) of the private CA to associate with the policy. The
        /// ARN of the CA can be found by calling the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a> action.</p>
        /// <p></p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input);
            self
        }
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }
        /// <p>The path and file name of a JSON-formatted IAM policy to attach to the specified
        /// private CA resource. If this policy does not contain all required statements or if it
        /// includes any statement that is not allowed, the <code>PutPolicy</code> action returns an
        /// <code>InvalidPolicyException</code>. For information about IAM policy and
        /// statement structure, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json">Overview of JSON Policies</a>.</p>
        pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.policy(input);
            self
        }
        pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_policy(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct RestoreCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::restore_certificate_authority_input::Builder,
    }
    impl<C> RestoreCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::RestoreCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::RestoreCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called the <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a> action. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct RevokeCertificate<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::revoke_certificate_input::Builder,
    }
    impl<C> RevokeCertificate<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::RevokeCertificateOutput,
            smithy_http::result::SdkError<crate::error::RevokeCertificateError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>Amazon Resource Name (ARN) of the private CA that issued the certificate to be
        /// revoked. This must be of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>Serial number of the certificate to be revoked. This must be in hexadecimal format.
        /// You can retrieve the serial number by calling <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_GetCertificate.html">GetCertificate</a> with the Amazon
        /// Resource Name (ARN) of the certificate you want and the ARN of your private CA. The
        /// <b>GetCertificate</b> action retrieves the certificate in
        /// the PEM format. You can use the following OpenSSL command to list the certificate in
        /// text format and copy the hexadecimal serial number. </p>
        /// <p>
        /// <code>openssl x509 -in <i>file_path</i> -text -noout</code>
        /// </p>
        /// <p>You can also copy the serial number from the console or use the <a href="https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html">DescribeCertificate</a> action in the <i>AWS Certificate Manager API
        /// Reference</i>. </p>
        pub fn certificate_serial(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_serial(input);
            self
        }
        pub fn set_certificate_serial(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_serial(input);
            self
        }
        /// <p>Specifies why you revoked the certificate.</p>
        pub fn revocation_reason(mut self, input: crate::model::RevocationReason) -> Self {
            self.inner = self.inner.revocation_reason(input);
            self
        }
        pub fn set_revocation_reason(
            mut self,
            input: std::option::Option<crate::model::RevocationReason>,
        ) -> Self {
            self.inner = self.inner.set_revocation_reason(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct TagCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::tag_certificate_authority_input::Builder,
    }
    impl<C> TagCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::TagCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::TagCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>List of tags to be associated with the CA.</p>
        pub fn tags(mut self, inp: impl Into<crate::model::Tag>) -> Self {
            self.inner = self.inner.tags(inp);
            self
        }
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct UntagCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::untag_certificate_authority_input::Builder,
    }
    impl<C> UntagCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UntagCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::UntagCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>List of tags to be removed from the CA.</p>
        pub fn tags(mut self, inp: impl Into<crate::model::Tag>) -> Self {
            self.inner = self.inner.tags(inp);
            self
        }
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
    }
    #[derive(std::fmt::Debug)]
    pub struct UpdateCertificateAuthority<C = aws_hyper::DynConnector> {
        handle: std::sync::Arc<super::Handle<C>>,
        inner: crate::input::update_certificate_authority_input::Builder,
    }
    impl<C> UpdateCertificateAuthority<C> {
        pub(crate) fn new(handle: std::sync::Arc<super::Handle<C>>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UpdateCertificateAuthorityOutput,
            smithy_http::result::SdkError<crate::error::UpdateCertificateAuthorityError>,
        >
        where
            C: aws_hyper::SmithyConnector,
        {
            let input = self
                .inner
                .build()
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            let op = input
                .make_operation(&self.handle.conf)
                .map_err(|err| smithy_http::result::SdkError::ConstructionFailure(err.into()))?;
            self.handle.client.call(op).await
        }
        /// <p>Amazon Resource Name (ARN) of the private CA that issued the certificate to be
        /// revoked. This must be of the form:</p>
        /// <p>
        /// <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i>
        /// </code>
        /// </p>
        pub fn certificate_authority_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.certificate_authority_arn(input);
            self
        }
        pub fn set_certificate_authority_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_certificate_authority_arn(input);
            self
        }
        /// <p>Revocation information for your private CA.</p>
        pub fn revocation_configuration(
            mut self,
            input: crate::model::RevocationConfiguration,
        ) -> Self {
            self.inner = self.inner.revocation_configuration(input);
            self
        }
        pub fn set_revocation_configuration(
            mut self,
            input: std::option::Option<crate::model::RevocationConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_revocation_configuration(input);
            self
        }
        /// <p>Status of your private CA.</p>
        pub fn status(mut self, input: crate::model::CertificateAuthorityStatus) -> Self {
            self.inner = self.inner.status(input);
            self
        }
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::CertificateAuthorityStatus>,
        ) -> Self {
            self.inner = self.inner.set_status(input);
            self
        }
    }
}
