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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.networksecurity.inputs.ServerTlsPolicyServerCertificateCertificateProviderInstanceArgs;
import com.pulumi.gcp.networksecurity.inputs.ServerTlsPolicyServerCertificateGrpcEndpointArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ServerTlsPolicyServerCertificateArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerTlsPolicyServerCertificateArgs Empty = new ServerTlsPolicyServerCertificateArgs();

    /**
     * Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty.
     * Defines a mechanism to provision server identity (public and private keys). Cannot be combined with allowOpen as a permissive mode that allows both plain text and TLS is not supported.
     * Structure is documented below.
     * 
     */
    @Import(name="certificateProviderInstance")
    private @Nullable Output<ServerTlsPolicyServerCertificateCertificateProviderInstanceArgs> certificateProviderInstance;

    /**
     * @return Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty.
     * Defines a mechanism to provision server identity (public and private keys). Cannot be combined with allowOpen as a permissive mode that allows both plain text and TLS is not supported.
     * Structure is documented below.
     * 
     */
    public Optional<Output<ServerTlsPolicyServerCertificateCertificateProviderInstanceArgs>> certificateProviderInstance() {
        return Optional.ofNullable(this.certificateProviderInstance);
    }

    /**
     * gRPC specific configuration to access the gRPC server to obtain the cert and private key.
     * Structure is documented below.
     * 
     */
    @Import(name="grpcEndpoint")
    private @Nullable Output<ServerTlsPolicyServerCertificateGrpcEndpointArgs> grpcEndpoint;

    /**
     * @return gRPC specific configuration to access the gRPC server to obtain the cert and private key.
     * Structure is documented below.
     * 
     */
    public Optional<Output<ServerTlsPolicyServerCertificateGrpcEndpointArgs>> grpcEndpoint() {
        return Optional.ofNullable(this.grpcEndpoint);
    }

    private ServerTlsPolicyServerCertificateArgs() {}

    private ServerTlsPolicyServerCertificateArgs(ServerTlsPolicyServerCertificateArgs $) {
        this.certificateProviderInstance = $.certificateProviderInstance;
        this.grpcEndpoint = $.grpcEndpoint;
    }

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

    public static final class Builder {
        private ServerTlsPolicyServerCertificateArgs $;

        public Builder() {
            $ = new ServerTlsPolicyServerCertificateArgs();
        }

        public Builder(ServerTlsPolicyServerCertificateArgs defaults) {
            $ = new ServerTlsPolicyServerCertificateArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param certificateProviderInstance Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty.
         * Defines a mechanism to provision server identity (public and private keys). Cannot be combined with allowOpen as a permissive mode that allows both plain text and TLS is not supported.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder certificateProviderInstance(@Nullable Output<ServerTlsPolicyServerCertificateCertificateProviderInstanceArgs> certificateProviderInstance) {
            $.certificateProviderInstance = certificateProviderInstance;
            return this;
        }

        /**
         * @param certificateProviderInstance Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty.
         * Defines a mechanism to provision server identity (public and private keys). Cannot be combined with allowOpen as a permissive mode that allows both plain text and TLS is not supported.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder certificateProviderInstance(ServerTlsPolicyServerCertificateCertificateProviderInstanceArgs certificateProviderInstance) {
            return certificateProviderInstance(Output.of(certificateProviderInstance));
        }

        /**
         * @param grpcEndpoint gRPC specific configuration to access the gRPC server to obtain the cert and private key.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder grpcEndpoint(@Nullable Output<ServerTlsPolicyServerCertificateGrpcEndpointArgs> grpcEndpoint) {
            $.grpcEndpoint = grpcEndpoint;
            return this;
        }

        /**
         * @param grpcEndpoint gRPC specific configuration to access the gRPC server to obtain the cert and private key.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder grpcEndpoint(ServerTlsPolicyServerCertificateGrpcEndpointArgs grpcEndpoint) {
            return grpcEndpoint(Output.of(grpcEndpoint));
        }

        public ServerTlsPolicyServerCertificateArgs build() {
            return $;
        }
    }

}
