// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.certificateauthority;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.certificateauthority.CertificateArgs;
import com.pulumi.gcp.certificateauthority.inputs.CertificateState;
import com.pulumi.gcp.certificateauthority.outputs.CertificateCertificateDescription;
import com.pulumi.gcp.certificateauthority.outputs.CertificateConfig;
import com.pulumi.gcp.certificateauthority.outputs.CertificateRevocationDetail;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * A Certificate corresponds to a signed X.509 certificate issued by a Certificate.
 * 
 * &gt; **Note:** The Certificate Authority that is referenced by this resource **must** be
 * `tier = &#34;ENTERPRISE&#34;`
 * 
 * ## Example Usage
 * ### Privateca Certificate With Template
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.certificateauthority.CaPool;
 * import com.pulumi.gcp.certificateauthority.CaPoolArgs;
 * import com.pulumi.gcp.certificateauthority.CertificateTemplate;
 * import com.pulumi.gcp.certificateauthority.CertificateTemplateArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplateIdentityConstraintsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplateIdentityConstraintsCelExpressionArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePassthroughExtensionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePredefinedValuesArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePredefinedValuesCaOptionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePredefinedValuesKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePredefinedValuesKeyUsageBaseKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateTemplatePredefinedValuesKeyUsageExtendedKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.Authority;
 * import com.pulumi.gcp.certificateauthority.AuthorityArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectAltNameArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigCaOptionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityKeySpecArgs;
 * import com.pulumi.gcp.certificateauthority.Certificate;
 * import com.pulumi.gcp.certificateauthority.CertificateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var defaultCaPool = new CaPool(&#34;defaultCaPool&#34;, CaPoolArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .tier(&#34;ENTERPRISE&#34;)
 *             .build());
 * 
 *         var defaultCertificateTemplate = new CertificateTemplate(&#34;defaultCertificateTemplate&#34;, CertificateTemplateArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .description(&#34;An updated sample certificate template&#34;)
 *             .identityConstraints(CertificateTemplateIdentityConstraintsArgs.builder()
 *                 .allowSubjectAltNamesPassthrough(true)
 *                 .allowSubjectPassthrough(true)
 *                 .celExpression(CertificateTemplateIdentityConstraintsCelExpressionArgs.builder()
 *                     .description(&#34;Always true&#34;)
 *                     .expression(&#34;true&#34;)
 *                     .location(&#34;any.file.anywhere&#34;)
 *                     .title(&#34;Sample expression&#34;)
 *                     .build())
 *                 .build())
 *             .passthroughExtensions(CertificateTemplatePassthroughExtensionsArgs.builder()
 *                 .additionalExtensions(CertificateTemplatePassthroughExtensionsAdditionalExtensionArgs.builder()
 *                     .objectIdPaths(                    
 *                         1,
 *                         6)
 *                     .build())
 *                 .knownExtensions(&#34;EXTENDED_KEY_USAGE&#34;)
 *                 .build())
 *             .predefinedValues(CertificateTemplatePredefinedValuesArgs.builder()
 *                 .additionalExtensions(CertificateTemplatePredefinedValuesAdditionalExtensionArgs.builder()
 *                     .objectId(CertificateTemplatePredefinedValuesAdditionalExtensionObjectIdArgs.builder()
 *                         .objectIdPaths(                        
 *                             1,
 *                             6)
 *                         .build())
 *                     .value(&#34;c3RyaW5nCg==&#34;)
 *                     .critical(true)
 *                     .build())
 *                 .aiaOcspServers(&#34;string&#34;)
 *                 .caOptions(CertificateTemplatePredefinedValuesCaOptionsArgs.builder()
 *                     .isCa(false)
 *                     .maxIssuerPathLength(6)
 *                     .build())
 *                 .keyUsage(CertificateTemplatePredefinedValuesKeyUsageArgs.builder()
 *                     .baseKeyUsage(CertificateTemplatePredefinedValuesKeyUsageBaseKeyUsageArgs.builder()
 *                         .certSign(false)
 *                         .contentCommitment(true)
 *                         .crlSign(false)
 *                         .dataEncipherment(true)
 *                         .decipherOnly(true)
 *                         .digitalSignature(true)
 *                         .encipherOnly(true)
 *                         .keyAgreement(true)
 *                         .keyEncipherment(true)
 *                         .build())
 *                     .extendedKeyUsage(CertificateTemplatePredefinedValuesKeyUsageExtendedKeyUsageArgs.builder()
 *                         .clientAuth(true)
 *                         .codeSigning(true)
 *                         .emailProtection(true)
 *                         .ocspSigning(true)
 *                         .serverAuth(true)
 *                         .timeStamping(true)
 *                         .build())
 *                     .unknownExtendedKeyUsages(CertificateTemplatePredefinedValuesKeyUsageUnknownExtendedKeyUsageArgs.builder()
 *                         .objectIdPaths(                        
 *                             1,
 *                             6)
 *                         .build())
 *                     .build())
 *                 .policyIds(CertificateTemplatePredefinedValuesPolicyIdArgs.builder()
 *                     .objectIdPaths(                    
 *                         1,
 *                         6)
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *         var defaultAuthority = new Authority(&#34;defaultAuthority&#34;, AuthorityArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .certificateAuthorityId(&#34;my-authority&#34;)
 *             .config(AuthorityConfigArgs.builder()
 *                 .subjectConfig(AuthorityConfigSubjectConfigArgs.builder()
 *                     .subject(AuthorityConfigSubjectConfigSubjectArgs.builder()
 *                         .organization(&#34;HashiCorp&#34;)
 *                         .commonName(&#34;my-certificate-authority&#34;)
 *                         .build())
 *                     .subjectAltName(AuthorityConfigSubjectConfigSubjectAltNameArgs.builder()
 *                         .dnsNames(&#34;hashicorp.com&#34;)
 *                         .build())
 *                     .build())
 *                 .x509Config(AuthorityConfigX509ConfigArgs.builder()
 *                     .caOptions(AuthorityConfigX509ConfigCaOptionsArgs.builder()
 *                         .isCa(true)
 *                         .build())
 *                     .keyUsage(AuthorityConfigX509ConfigKeyUsageArgs.builder()
 *                         .baseKeyUsage(AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs.builder()
 *                             .certSign(true)
 *                             .crlSign(true)
 *                             .build())
 *                         .extendedKeyUsage(AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs.builder()
 *                             .serverAuth(false)
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .keySpec(AuthorityKeySpecArgs.builder()
 *                 .algorithm(&#34;RSA_PKCS1_4096_SHA256&#34;)
 *                 .build())
 *             .deletionProtection(false)
 *             .skipGracePeriod(true)
 *             .ignoreActiveCertificatesOnDeletion(true)
 *             .build());
 * 
 *         var defaultCertificate = new Certificate(&#34;defaultCertificate&#34;, CertificateArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .certificateAuthority(defaultAuthority.certificateAuthorityId())
 *             .lifetime(&#34;860s&#34;)
 *             .pemCsr(Files.readString(Paths.get(&#34;test-fixtures/rsa_csr.pem&#34;)))
 *             .certificateTemplate(defaultCertificateTemplate.id())
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Privateca Certificate Csr
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.certificateauthority.CaPool;
 * import com.pulumi.gcp.certificateauthority.CaPoolArgs;
 * import com.pulumi.gcp.certificateauthority.Authority;
 * import com.pulumi.gcp.certificateauthority.AuthorityArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectAltNameArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigCaOptionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityKeySpecArgs;
 * import com.pulumi.gcp.certificateauthority.Certificate;
 * import com.pulumi.gcp.certificateauthority.CertificateArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var defaultCaPool = new CaPool(&#34;defaultCaPool&#34;, CaPoolArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .tier(&#34;ENTERPRISE&#34;)
 *             .build());
 * 
 *         var defaultAuthority = new Authority(&#34;defaultAuthority&#34;, AuthorityArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .certificateAuthorityId(&#34;my-authority&#34;)
 *             .config(AuthorityConfigArgs.builder()
 *                 .subjectConfig(AuthorityConfigSubjectConfigArgs.builder()
 *                     .subject(AuthorityConfigSubjectConfigSubjectArgs.builder()
 *                         .organization(&#34;HashiCorp&#34;)
 *                         .commonName(&#34;my-certificate-authority&#34;)
 *                         .build())
 *                     .subjectAltName(AuthorityConfigSubjectConfigSubjectAltNameArgs.builder()
 *                         .dnsNames(&#34;hashicorp.com&#34;)
 *                         .build())
 *                     .build())
 *                 .x509Config(AuthorityConfigX509ConfigArgs.builder()
 *                     .caOptions(AuthorityConfigX509ConfigCaOptionsArgs.builder()
 *                         .isCa(true)
 *                         .build())
 *                     .keyUsage(AuthorityConfigX509ConfigKeyUsageArgs.builder()
 *                         .baseKeyUsage(AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs.builder()
 *                             .certSign(true)
 *                             .crlSign(true)
 *                             .build())
 *                         .extendedKeyUsage(AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs.builder()
 *                             .serverAuth(false)
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .keySpec(AuthorityKeySpecArgs.builder()
 *                 .algorithm(&#34;RSA_PKCS1_4096_SHA256&#34;)
 *                 .build())
 *             .deletionProtection(false)
 *             .skipGracePeriod(true)
 *             .ignoreActiveCertificatesOnDeletion(true)
 *             .build());
 * 
 *         var defaultCertificate = new Certificate(&#34;defaultCertificate&#34;, CertificateArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .certificateAuthority(defaultAuthority.certificateAuthorityId())
 *             .lifetime(&#34;860s&#34;)
 *             .pemCsr(Files.readString(Paths.get(&#34;test-fixtures/rsa_csr.pem&#34;)))
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Privateca Certificate No Authority
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.certificateauthority.CaPool;
 * import com.pulumi.gcp.certificateauthority.CaPoolArgs;
 * import com.pulumi.gcp.certificateauthority.Authority;
 * import com.pulumi.gcp.certificateauthority.AuthorityArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigSubjectConfigSubjectAltNameArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigCaOptionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.AuthorityKeySpecArgs;
 * import com.pulumi.gcp.certificateauthority.Certificate;
 * import com.pulumi.gcp.certificateauthority.CertificateArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigSubjectConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigSubjectConfigSubjectArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigX509ConfigArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigX509ConfigCaOptionsArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigX509ConfigKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigX509ConfigKeyUsageBaseKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigX509ConfigKeyUsageExtendedKeyUsageArgs;
 * import com.pulumi.gcp.certificateauthority.inputs.CertificateConfigPublicKeyArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var defaultCaPool = new CaPool(&#34;defaultCaPool&#34;, CaPoolArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .tier(&#34;ENTERPRISE&#34;)
 *             .build());
 * 
 *         var defaultAuthority = new Authority(&#34;defaultAuthority&#34;, AuthorityArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .certificateAuthorityId(&#34;my-authority&#34;)
 *             .config(AuthorityConfigArgs.builder()
 *                 .subjectConfig(AuthorityConfigSubjectConfigArgs.builder()
 *                     .subject(AuthorityConfigSubjectConfigSubjectArgs.builder()
 *                         .organization(&#34;HashiCorp&#34;)
 *                         .commonName(&#34;my-certificate-authority&#34;)
 *                         .build())
 *                     .subjectAltName(AuthorityConfigSubjectConfigSubjectAltNameArgs.builder()
 *                         .dnsNames(&#34;hashicorp.com&#34;)
 *                         .build())
 *                     .build())
 *                 .x509Config(AuthorityConfigX509ConfigArgs.builder()
 *                     .caOptions(AuthorityConfigX509ConfigCaOptionsArgs.builder()
 *                         .isCa(true)
 *                         .build())
 *                     .keyUsage(AuthorityConfigX509ConfigKeyUsageArgs.builder()
 *                         .baseKeyUsage(AuthorityConfigX509ConfigKeyUsageBaseKeyUsageArgs.builder()
 *                             .digitalSignature(true)
 *                             .certSign(true)
 *                             .crlSign(true)
 *                             .build())
 *                         .extendedKeyUsage(AuthorityConfigX509ConfigKeyUsageExtendedKeyUsageArgs.builder()
 *                             .serverAuth(true)
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .lifetime(&#34;86400s&#34;)
 *             .keySpec(AuthorityKeySpecArgs.builder()
 *                 .algorithm(&#34;RSA_PKCS1_4096_SHA256&#34;)
 *                 .build())
 *             .deletionProtection(false)
 *             .skipGracePeriod(true)
 *             .ignoreActiveCertificatesOnDeletion(true)
 *             .build());
 * 
 *         var defaultCertificate = new Certificate(&#34;defaultCertificate&#34;, CertificateArgs.builder()        
 *             .location(&#34;us-central1&#34;)
 *             .pool(defaultCaPool.name())
 *             .lifetime(&#34;860s&#34;)
 *             .config(CertificateConfigArgs.builder()
 *                 .subjectConfig(CertificateConfigSubjectConfigArgs.builder()
 *                     .subject(CertificateConfigSubjectConfigSubjectArgs.builder()
 *                         .commonName(&#34;san1.example.com&#34;)
 *                         .countryCode(&#34;us&#34;)
 *                         .organization(&#34;google&#34;)
 *                         .organizationalUnit(&#34;enterprise&#34;)
 *                         .locality(&#34;mountain view&#34;)
 *                         .province(&#34;california&#34;)
 *                         .streetAddress(&#34;1600 amphitheatre parkway&#34;)
 *                         .postalCode(&#34;94109&#34;)
 *                         .build())
 *                     .build())
 *                 .x509Config(CertificateConfigX509ConfigArgs.builder()
 *                     .caOptions(CertificateConfigX509ConfigCaOptionsArgs.builder()
 *                         .isCa(false)
 *                         .build())
 *                     .keyUsage(CertificateConfigX509ConfigKeyUsageArgs.builder()
 *                         .baseKeyUsage(CertificateConfigX509ConfigKeyUsageBaseKeyUsageArgs.builder()
 *                             .crlSign(true)
 *                             .build())
 *                         .extendedKeyUsage(CertificateConfigX509ConfigKeyUsageExtendedKeyUsageArgs.builder()
 *                             .serverAuth(true)
 *                             .build())
 *                         .build())
 *                     .build())
 *                 .publicKey(CertificateConfigPublicKeyArgs.builder()
 *                     .format(&#34;PEM&#34;)
 *                     .key(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get(&#34;test-fixtures/rsa_public.pem&#34;))))
 *                     .build())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(defaultAuthority)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Certificate can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:certificateauthority/certificate:Certificate default projects/{{project}}/locations/{{location}}/caPools/{{pool}}/certificates/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:certificateauthority/certificate:Certificate default {{project}}/{{location}}/{{pool}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:certificateauthority/certificate:Certificate default {{location}}/{{pool}}/{{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:certificateauthority/certificate:Certificate")
public class Certificate extends com.pulumi.resources.CustomResource {
    /**
     * The Certificate Authority ID that should issue the certificate. For example, to issue a Certificate from
     * a Certificate Authority with resource name `projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca`,
     * argument `pool` should be set to `projects/my-project/locations/us-central1/caPools/my-pool`, argument `certificate_authority`
     * should be set to `my-ca`.
     * 
     */
    @Export(name="certificateAuthority", type=String.class, parameters={})
    private Output</* @Nullable */ String> certificateAuthority;

    /**
     * @return The Certificate Authority ID that should issue the certificate. For example, to issue a Certificate from
     * a Certificate Authority with resource name `projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca`,
     * argument `pool` should be set to `projects/my-project/locations/us-central1/caPools/my-pool`, argument `certificate_authority`
     * should be set to `my-ca`.
     * 
     */
    public Output<Optional<String>> certificateAuthority() {
        return Codegen.optional(this.certificateAuthority);
    }
    /**
     * Output only. Details regarding the revocation of this Certificate. This Certificate is considered revoked if and only if this field is present.
     * Structure is documented below.
     * 
     */
    @Export(name="certificateDescriptions", type=List.class, parameters={CertificateCertificateDescription.class})
    private Output<List<CertificateCertificateDescription>> certificateDescriptions;

    /**
     * @return Output only. Details regarding the revocation of this Certificate. This Certificate is considered revoked if and only if this field is present.
     * Structure is documented below.
     * 
     */
    public Output<List<CertificateCertificateDescription>> certificateDescriptions() {
        return this.certificateDescriptions;
    }
    /**
     * The resource name for a CertificateTemplate used to issue this certificate,
     * in the format `projects/*{@literal /}locations/*{@literal /}certificateTemplates/*`. If this is specified,
     * the caller must have the necessary permission to use this template. If this is
     * omitted, no template will be used. This template must be in the same location
     * as the Certificate.
     * 
     */
    @Export(name="certificateTemplate", type=String.class, parameters={})
    private Output</* @Nullable */ String> certificateTemplate;

    /**
     * @return The resource name for a CertificateTemplate used to issue this certificate,
     * in the format `projects/*{@literal /}locations/*{@literal /}certificateTemplates/*`. If this is specified,
     * the caller must have the necessary permission to use this template. If this is
     * omitted, no template will be used. This template must be in the same location
     * as the Certificate.
     * 
     */
    public Output<Optional<String>> certificateTemplate() {
        return Codegen.optional(this.certificateTemplate);
    }
    /**
     * The config used to create a self-signed X.509 certificate or CSR.
     * Structure is documented below.
     * 
     */
    @Export(name="config", type=CertificateConfig.class, parameters={})
    private Output</* @Nullable */ CertificateConfig> config;

    /**
     * @return The config used to create a self-signed X.509 certificate or CSR.
     * Structure is documented below.
     * 
     */
    public Output<Optional<CertificateConfig>> config() {
        return Codegen.optional(this.config);
    }
    /**
     * The time that this resource was created on the server.
     * This is in RFC3339 text format.
     * 
     */
    @Export(name="createTime", type=String.class, parameters={})
    private Output<String> createTime;

    /**
     * @return The time that this resource was created on the server.
     * This is in RFC3339 text format.
     * 
     */
    public Output<String> createTime() {
        return this.createTime;
    }
    /**
     * The resource name of the issuing CertificateAuthority in the format `projects/*{@literal /}locations/*{@literal /}caPools/*{@literal /}certificateAuthorities/*`.
     * 
     */
    @Export(name="issuerCertificateAuthority", type=String.class, parameters={})
    private Output<String> issuerCertificateAuthority;

    /**
     * @return The resource name of the issuing CertificateAuthority in the format `projects/*{@literal /}locations/*{@literal /}caPools/*{@literal /}certificateAuthorities/*`.
     * 
     */
    public Output<String> issuerCertificateAuthority() {
        return this.issuerCertificateAuthority;
    }
    /**
     * Labels with user-defined metadata to apply to this resource.
     * 
     */
    @Export(name="labels", type=Map.class, parameters={String.class, String.class})
    private Output</* @Nullable */ Map<String,String>> labels;

    /**
     * @return Labels with user-defined metadata to apply to this resource.
     * 
     */
    public Output<Optional<Map<String,String>>> labels() {
        return Codegen.optional(this.labels);
    }
    /**
     * The desired lifetime of the CA certificate. Used to create the &#34;notBeforeTime&#34; and
     * &#34;notAfterTime&#34; fields inside an X.509 certificate. A duration in seconds with up to nine
     * fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    @Export(name="lifetime", type=String.class, parameters={})
    private Output</* @Nullable */ String> lifetime;

    /**
     * @return The desired lifetime of the CA certificate. Used to create the &#34;notBeforeTime&#34; and
     * &#34;notAfterTime&#34; fields inside an X.509 certificate. A duration in seconds with up to nine
     * fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    public Output<Optional<String>> lifetime() {
        return Codegen.optional(this.lifetime);
    }
    /**
     * Location of the Certificate. A full list of valid locations can be found by
     * running `gcloud privateca locations list`.
     * 
     * ***
     * 
     */
    @Export(name="location", type=String.class, parameters={})
    private Output<String> location;

    /**
     * @return Location of the Certificate. A full list of valid locations can be found by
     * running `gcloud privateca locations list`.
     * 
     * ***
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * The name for this Certificate.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return The name for this Certificate.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Output only. The pem-encoded, signed X.509 certificate.
     * 
     */
    @Export(name="pemCertificate", type=String.class, parameters={})
    private Output<String> pemCertificate;

    /**
     * @return Output only. The pem-encoded, signed X.509 certificate.
     * 
     */
    public Output<String> pemCertificate() {
        return this.pemCertificate;
    }
    /**
     * The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.
     * 
     */
    @Export(name="pemCertificateChains", type=List.class, parameters={String.class})
    private Output<List<String>> pemCertificateChains;

    /**
     * @return The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.
     * 
     */
    public Output<List<String>> pemCertificateChains() {
        return this.pemCertificateChains;
    }
    /**
     * (Deprecated)
     * Required. Expected to be in leaf-to-root order according to RFC 5246.
     * 
     * @deprecated
     * Deprecated in favor of `pem_certificate_chain`.
     * 
     */
    @Deprecated /* Deprecated in favor of `pem_certificate_chain`. */
    @Export(name="pemCertificates", type=List.class, parameters={String.class})
    private Output<List<String>> pemCertificates;

    /**
     * @return (Deprecated)
     * Required. Expected to be in leaf-to-root order according to RFC 5246.
     * 
     */
    public Output<List<String>> pemCertificates() {
        return this.pemCertificates;
    }
    /**
     * Immutable. A pem-encoded X.509 certificate signing request (CSR).
     * 
     */
    @Export(name="pemCsr", type=String.class, parameters={})
    private Output</* @Nullable */ String> pemCsr;

    /**
     * @return Immutable. A pem-encoded X.509 certificate signing request (CSR).
     * 
     */
    public Output<Optional<String>> pemCsr() {
        return Codegen.optional(this.pemCsr);
    }
    /**
     * The name of the CaPool this Certificate belongs to.
     * 
     */
    @Export(name="pool", type=String.class, parameters={})
    private Output<String> pool;

    /**
     * @return The name of the CaPool this Certificate belongs to.
     * 
     */
    public Output<String> pool() {
        return this.pool;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * Output only. Details regarding the revocation of this Certificate. This Certificate is
     * considered revoked if and only if this field is present.
     * Structure is documented below.
     * 
     */
    @Export(name="revocationDetails", type=List.class, parameters={CertificateRevocationDetail.class})
    private Output<List<CertificateRevocationDetail>> revocationDetails;

    /**
     * @return Output only. Details regarding the revocation of this Certificate. This Certificate is
     * considered revoked if and only if this field is present.
     * Structure is documented below.
     * 
     */
    public Output<List<CertificateRevocationDetail>> revocationDetails() {
        return this.revocationDetails;
    }
    /**
     * Output only. The time at which this CertificateAuthority was updated.
     * This is in RFC3339 text format.
     * 
     */
    @Export(name="updateTime", type=String.class, parameters={})
    private Output<String> updateTime;

    /**
     * @return Output only. The time at which this CertificateAuthority was updated.
     * This is in RFC3339 text format.
     * 
     */
    public Output<String> updateTime() {
        return this.updateTime;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Certificate(String name) {
        this(name, CertificateArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Certificate(String name, CertificateArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Certificate(String name, CertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:certificateauthority/certificate:Certificate", name, args == null ? CertificateArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Certificate(String name, Output<String> id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:certificateauthority/certificate:Certificate", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Certificate get(String name, Output<String> id, @Nullable CertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Certificate(name, id, state, options);
    }
}
