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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.binaryauthorization.outputs.AttestorAttestationAuthorityNotePublicKeyPkixPublicKey;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AttestorAttestationAuthorityNotePublicKey {
    /**
     * @return ASCII-armored representation of a PGP public key, as the
     * entire output by the command
     * `gpg --export --armor foo@example.com` (either LF or CRLF
     * line endings). When using this field, id should be left
     * blank. The BinAuthz API handlers will calculate the ID
     * and fill it in automatically. BinAuthz computes this ID
     * as the OpenPGP RFC4880 V4 fingerprint, represented as
     * upper-case hex. If id is provided by the caller, it will
     * be overwritten by the API-calculated ID.
     * 
     */
    private @Nullable String asciiArmoredPgpPublicKey;
    /**
     * @return A descriptive comment. This field may be updated.
     * 
     */
    private @Nullable String comment;
    /**
     * @return The ID of this public key. Signatures verified by BinAuthz
     * must include the ID of the public key that can be used to
     * verify them, and that ID must match the contents of this
     * field exactly. Additional restrictions on this field can
     * be imposed based on which public key type is encapsulated.
     * See the documentation on publicKey cases below for details.
     * 
     */
    private @Nullable String id;
    /**
     * @return A raw PKIX SubjectPublicKeyInfo format public key.
     * NOTE: id may be explicitly provided by the caller when using this
     * type of public key, but it MUST be a valid RFC3986 URI. If id is left
     * blank, a default one will be computed based on the digest of the DER
     * encoding of the public key.
     * Structure is documented below.
     * 
     */
    private @Nullable AttestorAttestationAuthorityNotePublicKeyPkixPublicKey pkixPublicKey;

    private AttestorAttestationAuthorityNotePublicKey() {}
    /**
     * @return ASCII-armored representation of a PGP public key, as the
     * entire output by the command
     * `gpg --export --armor foo@example.com` (either LF or CRLF
     * line endings). When using this field, id should be left
     * blank. The BinAuthz API handlers will calculate the ID
     * and fill it in automatically. BinAuthz computes this ID
     * as the OpenPGP RFC4880 V4 fingerprint, represented as
     * upper-case hex. If id is provided by the caller, it will
     * be overwritten by the API-calculated ID.
     * 
     */
    public Optional<String> asciiArmoredPgpPublicKey() {
        return Optional.ofNullable(this.asciiArmoredPgpPublicKey);
    }
    /**
     * @return A descriptive comment. This field may be updated.
     * 
     */
    public Optional<String> comment() {
        return Optional.ofNullable(this.comment);
    }
    /**
     * @return The ID of this public key. Signatures verified by BinAuthz
     * must include the ID of the public key that can be used to
     * verify them, and that ID must match the contents of this
     * field exactly. Additional restrictions on this field can
     * be imposed based on which public key type is encapsulated.
     * See the documentation on publicKey cases below for details.
     * 
     */
    public Optional<String> id() {
        return Optional.ofNullable(this.id);
    }
    /**
     * @return A raw PKIX SubjectPublicKeyInfo format public key.
     * NOTE: id may be explicitly provided by the caller when using this
     * type of public key, but it MUST be a valid RFC3986 URI. If id is left
     * blank, a default one will be computed based on the digest of the DER
     * encoding of the public key.
     * Structure is documented below.
     * 
     */
    public Optional<AttestorAttestationAuthorityNotePublicKeyPkixPublicKey> pkixPublicKey() {
        return Optional.ofNullable(this.pkixPublicKey);
    }

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

    public static Builder builder(AttestorAttestationAuthorityNotePublicKey defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String asciiArmoredPgpPublicKey;
        private @Nullable String comment;
        private @Nullable String id;
        private @Nullable AttestorAttestationAuthorityNotePublicKeyPkixPublicKey pkixPublicKey;
        public Builder() {}
        public Builder(AttestorAttestationAuthorityNotePublicKey defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.asciiArmoredPgpPublicKey = defaults.asciiArmoredPgpPublicKey;
    	      this.comment = defaults.comment;
    	      this.id = defaults.id;
    	      this.pkixPublicKey = defaults.pkixPublicKey;
        }

        @CustomType.Setter
        public Builder asciiArmoredPgpPublicKey(@Nullable String asciiArmoredPgpPublicKey) {
            this.asciiArmoredPgpPublicKey = asciiArmoredPgpPublicKey;
            return this;
        }
        @CustomType.Setter
        public Builder comment(@Nullable String comment) {
            this.comment = comment;
            return this;
        }
        @CustomType.Setter
        public Builder id(@Nullable String id) {
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder pkixPublicKey(@Nullable AttestorAttestationAuthorityNotePublicKeyPkixPublicKey pkixPublicKey) {
            this.pkixPublicKey = pkixPublicKey;
            return this;
        }
        public AttestorAttestationAuthorityNotePublicKey build() {
            final var o = new AttestorAttestationAuthorityNotePublicKey();
            o.asciiArmoredPgpPublicKey = asciiArmoredPgpPublicKey;
            o.comment = comment;
            o.id = id;
            o.pkixPublicKey = pkixPublicKey;
            return o;
        }
    }
}
