// *** 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 com.pulumi.gcp.certificateauthority.outputs.CertificateTemplatePredefinedValuesAdditionalExtension;
import com.pulumi.gcp.certificateauthority.outputs.CertificateTemplatePredefinedValuesCaOptions;
import com.pulumi.gcp.certificateauthority.outputs.CertificateTemplatePredefinedValuesKeyUsage;
import com.pulumi.gcp.certificateauthority.outputs.CertificateTemplatePredefinedValuesPolicyId;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CertificateTemplatePredefinedValues {
    /**
     * @return Optional. Describes custom X.509 extensions.
     * 
     */
    private @Nullable List<CertificateTemplatePredefinedValuesAdditionalExtension> additionalExtensions;
    /**
     * @return Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the &#34;Authority Information Access&#34; extension in the certificate.
     * 
     */
    private @Nullable List<String> aiaOcspServers;
    /**
     * @return Optional. Describes options in this X509Parameters that are relevant in a CA certificate.
     * 
     */
    private @Nullable CertificateTemplatePredefinedValuesCaOptions caOptions;
    /**
     * @return Optional. Indicates the intended use for keys that correspond to a certificate.
     * 
     */
    private @Nullable CertificateTemplatePredefinedValuesKeyUsage keyUsage;
    /**
     * @return Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
     * 
     */
    private @Nullable List<CertificateTemplatePredefinedValuesPolicyId> policyIds;

    private CertificateTemplatePredefinedValues() {}
    /**
     * @return Optional. Describes custom X.509 extensions.
     * 
     */
    public List<CertificateTemplatePredefinedValuesAdditionalExtension> additionalExtensions() {
        return this.additionalExtensions == null ? List.of() : this.additionalExtensions;
    }
    /**
     * @return Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the &#34;Authority Information Access&#34; extension in the certificate.
     * 
     */
    public List<String> aiaOcspServers() {
        return this.aiaOcspServers == null ? List.of() : this.aiaOcspServers;
    }
    /**
     * @return Optional. Describes options in this X509Parameters that are relevant in a CA certificate.
     * 
     */
    public Optional<CertificateTemplatePredefinedValuesCaOptions> caOptions() {
        return Optional.ofNullable(this.caOptions);
    }
    /**
     * @return Optional. Indicates the intended use for keys that correspond to a certificate.
     * 
     */
    public Optional<CertificateTemplatePredefinedValuesKeyUsage> keyUsage() {
        return Optional.ofNullable(this.keyUsage);
    }
    /**
     * @return Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
     * 
     */
    public List<CertificateTemplatePredefinedValuesPolicyId> policyIds() {
        return this.policyIds == null ? List.of() : this.policyIds;
    }

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

    public static Builder builder(CertificateTemplatePredefinedValues defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<CertificateTemplatePredefinedValuesAdditionalExtension> additionalExtensions;
        private @Nullable List<String> aiaOcspServers;
        private @Nullable CertificateTemplatePredefinedValuesCaOptions caOptions;
        private @Nullable CertificateTemplatePredefinedValuesKeyUsage keyUsage;
        private @Nullable List<CertificateTemplatePredefinedValuesPolicyId> policyIds;
        public Builder() {}
        public Builder(CertificateTemplatePredefinedValues defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.additionalExtensions = defaults.additionalExtensions;
    	      this.aiaOcspServers = defaults.aiaOcspServers;
    	      this.caOptions = defaults.caOptions;
    	      this.keyUsage = defaults.keyUsage;
    	      this.policyIds = defaults.policyIds;
        }

        @CustomType.Setter
        public Builder additionalExtensions(@Nullable List<CertificateTemplatePredefinedValuesAdditionalExtension> additionalExtensions) {
            this.additionalExtensions = additionalExtensions;
            return this;
        }
        public Builder additionalExtensions(CertificateTemplatePredefinedValuesAdditionalExtension... additionalExtensions) {
            return additionalExtensions(List.of(additionalExtensions));
        }
        @CustomType.Setter
        public Builder aiaOcspServers(@Nullable List<String> aiaOcspServers) {
            this.aiaOcspServers = aiaOcspServers;
            return this;
        }
        public Builder aiaOcspServers(String... aiaOcspServers) {
            return aiaOcspServers(List.of(aiaOcspServers));
        }
        @CustomType.Setter
        public Builder caOptions(@Nullable CertificateTemplatePredefinedValuesCaOptions caOptions) {
            this.caOptions = caOptions;
            return this;
        }
        @CustomType.Setter
        public Builder keyUsage(@Nullable CertificateTemplatePredefinedValuesKeyUsage keyUsage) {
            this.keyUsage = keyUsage;
            return this;
        }
        @CustomType.Setter
        public Builder policyIds(@Nullable List<CertificateTemplatePredefinedValuesPolicyId> policyIds) {
            this.policyIds = policyIds;
            return this;
        }
        public Builder policyIds(CertificateTemplatePredefinedValuesPolicyId... policyIds) {
            return policyIds(List.of(policyIds));
        }
        public CertificateTemplatePredefinedValues build() {
            final var o = new CertificateTemplatePredefinedValues();
            o.additionalExtensions = additionalExtensions;
            o.aiaOcspServers = aiaOcspServers;
            o.caOptions = caOptions;
            o.keyUsage = keyUsage;
            o.policyIds = policyIds;
            return o;
        }
    }
}
