// *** 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.CaPoolIssuancePolicyBaselineValuesAdditionalExtension;
import com.pulumi.gcp.certificateauthority.outputs.CaPoolIssuancePolicyBaselineValuesCaOptions;
import com.pulumi.gcp.certificateauthority.outputs.CaPoolIssuancePolicyBaselineValuesKeyUsage;
import com.pulumi.gcp.certificateauthority.outputs.CaPoolIssuancePolicyBaselineValuesNameConstraints;
import com.pulumi.gcp.certificateauthority.outputs.CaPoolIssuancePolicyBaselineValuesPolicyId;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class CaPoolIssuancePolicyBaselineValues {
    /**
     * @return Specifies an X.509 extension, which may be used in different parts of X.509 objects like certificates, CSRs, and CRLs.
     * Structure is documented below.
     * 
     */
    private @Nullable List<CaPoolIssuancePolicyBaselineValuesAdditionalExtension> additionalExtensions;
    /**
     * @return 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 Describes values that are relevant in a CA certificate.
     * Structure is documented below.
     * 
     */
    private CaPoolIssuancePolicyBaselineValuesCaOptions caOptions;
    /**
     * @return Indicates the intended use for keys that correspond to a certificate.
     * Structure is documented below.
     * 
     */
    private CaPoolIssuancePolicyBaselineValuesKeyUsage keyUsage;
    /**
     * @return Describes the X.509 name constraints extension.
     * Structure is documented below.
     * 
     */
    private @Nullable CaPoolIssuancePolicyBaselineValuesNameConstraints nameConstraints;
    /**
     * @return Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
     * Structure is documented below.
     * 
     */
    private @Nullable List<CaPoolIssuancePolicyBaselineValuesPolicyId> policyIds;

    private CaPoolIssuancePolicyBaselineValues() {}
    /**
     * @return Specifies an X.509 extension, which may be used in different parts of X.509 objects like certificates, CSRs, and CRLs.
     * Structure is documented below.
     * 
     */
    public List<CaPoolIssuancePolicyBaselineValuesAdditionalExtension> additionalExtensions() {
        return this.additionalExtensions == null ? List.of() : this.additionalExtensions;
    }
    /**
     * @return 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 Describes values that are relevant in a CA certificate.
     * Structure is documented below.
     * 
     */
    public CaPoolIssuancePolicyBaselineValuesCaOptions caOptions() {
        return this.caOptions;
    }
    /**
     * @return Indicates the intended use for keys that correspond to a certificate.
     * Structure is documented below.
     * 
     */
    public CaPoolIssuancePolicyBaselineValuesKeyUsage keyUsage() {
        return this.keyUsage;
    }
    /**
     * @return Describes the X.509 name constraints extension.
     * Structure is documented below.
     * 
     */
    public Optional<CaPoolIssuancePolicyBaselineValuesNameConstraints> nameConstraints() {
        return Optional.ofNullable(this.nameConstraints);
    }
    /**
     * @return Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
     * Structure is documented below.
     * 
     */
    public List<CaPoolIssuancePolicyBaselineValuesPolicyId> policyIds() {
        return this.policyIds == null ? List.of() : this.policyIds;
    }

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

    public static Builder builder(CaPoolIssuancePolicyBaselineValues defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<CaPoolIssuancePolicyBaselineValuesAdditionalExtension> additionalExtensions;
        private @Nullable List<String> aiaOcspServers;
        private CaPoolIssuancePolicyBaselineValuesCaOptions caOptions;
        private CaPoolIssuancePolicyBaselineValuesKeyUsage keyUsage;
        private @Nullable CaPoolIssuancePolicyBaselineValuesNameConstraints nameConstraints;
        private @Nullable List<CaPoolIssuancePolicyBaselineValuesPolicyId> policyIds;
        public Builder() {}
        public Builder(CaPoolIssuancePolicyBaselineValues defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.additionalExtensions = defaults.additionalExtensions;
    	      this.aiaOcspServers = defaults.aiaOcspServers;
    	      this.caOptions = defaults.caOptions;
    	      this.keyUsage = defaults.keyUsage;
    	      this.nameConstraints = defaults.nameConstraints;
    	      this.policyIds = defaults.policyIds;
        }

        @CustomType.Setter
        public Builder additionalExtensions(@Nullable List<CaPoolIssuancePolicyBaselineValuesAdditionalExtension> additionalExtensions) {
            this.additionalExtensions = additionalExtensions;
            return this;
        }
        public Builder additionalExtensions(CaPoolIssuancePolicyBaselineValuesAdditionalExtension... 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(CaPoolIssuancePolicyBaselineValuesCaOptions caOptions) {
            this.caOptions = Objects.requireNonNull(caOptions);
            return this;
        }
        @CustomType.Setter
        public Builder keyUsage(CaPoolIssuancePolicyBaselineValuesKeyUsage keyUsage) {
            this.keyUsage = Objects.requireNonNull(keyUsage);
            return this;
        }
        @CustomType.Setter
        public Builder nameConstraints(@Nullable CaPoolIssuancePolicyBaselineValuesNameConstraints nameConstraints) {
            this.nameConstraints = nameConstraints;
            return this;
        }
        @CustomType.Setter
        public Builder policyIds(@Nullable List<CaPoolIssuancePolicyBaselineValuesPolicyId> policyIds) {
            this.policyIds = policyIds;
            return this;
        }
        public Builder policyIds(CaPoolIssuancePolicyBaselineValuesPolicyId... policyIds) {
            return policyIds(List.of(policyIds));
        }
        public CaPoolIssuancePolicyBaselineValues build() {
            final var o = new CaPoolIssuancePolicyBaselineValues();
            o.additionalExtensions = additionalExtensions;
            o.aiaOcspServers = aiaOcspServers;
            o.caOptions = caOptions;
            o.keyUsage = keyUsage;
            o.nameConstraints = nameConstraints;
            o.policyIds = policyIds;
            return o;
        }
    }
}
