// *** 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.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CaPoolPublishingOptions {
    /**
     * @return Specifies the encoding format of each CertificateAuthority&#39;s CA
     * certificate and CRLs. If this is omitted, CA certificates and CRLs
     * will be published in PEM.
     * Possible values are: `PEM`, `DER`.
     * 
     */
    private @Nullable String encodingFormat;
    /**
     * @return When true, publishes each CertificateAuthority&#39;s CA certificate and includes its URL in the &#34;Authority Information Access&#34;
     * X.509 extension in all issued Certificates. If this is false, the CA certificate will not be published and the corresponding
     * X.509 extension will not be written in issued certificates.
     * 
     */
    private Boolean publishCaCert;
    /**
     * @return When true, publishes each CertificateAuthority&#39;s CRL and includes its URL in the &#34;CRL Distribution Points&#34; X.509 extension
     * in all issued Certificates. If this is false, CRLs will not be published and the corresponding X.509 extension will not
     * be written in issued certificates. CRLs will expire 7 days from their creation. However, we will rebuild daily. CRLs are
     * also rebuilt shortly after a certificate is revoked.
     * 
     */
    private Boolean publishCrl;

    private CaPoolPublishingOptions() {}
    /**
     * @return Specifies the encoding format of each CertificateAuthority&#39;s CA
     * certificate and CRLs. If this is omitted, CA certificates and CRLs
     * will be published in PEM.
     * Possible values are: `PEM`, `DER`.
     * 
     */
    public Optional<String> encodingFormat() {
        return Optional.ofNullable(this.encodingFormat);
    }
    /**
     * @return When true, publishes each CertificateAuthority&#39;s CA certificate and includes its URL in the &#34;Authority Information Access&#34;
     * X.509 extension in all issued Certificates. If this is false, the CA certificate will not be published and the corresponding
     * X.509 extension will not be written in issued certificates.
     * 
     */
    public Boolean publishCaCert() {
        return this.publishCaCert;
    }
    /**
     * @return When true, publishes each CertificateAuthority&#39;s CRL and includes its URL in the &#34;CRL Distribution Points&#34; X.509 extension
     * in all issued Certificates. If this is false, CRLs will not be published and the corresponding X.509 extension will not
     * be written in issued certificates. CRLs will expire 7 days from their creation. However, we will rebuild daily. CRLs are
     * also rebuilt shortly after a certificate is revoked.
     * 
     */
    public Boolean publishCrl() {
        return this.publishCrl;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(CaPoolPublishingOptions defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String encodingFormat;
        private Boolean publishCaCert;
        private Boolean publishCrl;
        public Builder() {}
        public Builder(CaPoolPublishingOptions defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.encodingFormat = defaults.encodingFormat;
    	      this.publishCaCert = defaults.publishCaCert;
    	      this.publishCrl = defaults.publishCrl;
        }

        @CustomType.Setter
        public Builder encodingFormat(@Nullable String encodingFormat) {
            this.encodingFormat = encodingFormat;
            return this;
        }
        @CustomType.Setter
        public Builder publishCaCert(Boolean publishCaCert) {
            this.publishCaCert = Objects.requireNonNull(publishCaCert);
            return this;
        }
        @CustomType.Setter
        public Builder publishCrl(Boolean publishCrl) {
            this.publishCrl = Objects.requireNonNull(publishCrl);
            return this;
        }
        public CaPoolPublishingOptions build() {
            final var o = new CaPoolPublishingOptions();
            o.encodingFormat = encodingFormat;
            o.publishCaCert = publishCaCert;
            o.publishCrl = publishCrl;
            return o;
        }
    }
}
