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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs;
import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyState;
import com.pulumi.gcp.networksecurity.outputs.ClientTlsPolicyClientCertificate;
import com.pulumi.gcp.networksecurity.outputs.ClientTlsPolicyServerValidationCa;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * ### Network Security Client Tls Policy Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.networksecurity.ClientTlsPolicy;
 * import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var default_ = new ClientTlsPolicy(&#34;default&#34;, ClientTlsPolicyArgs.builder()        
 *             .labels(Map.of(&#34;foo&#34;, &#34;bar&#34;))
 *             .description(&#34;my description&#34;)
 *             .sni(&#34;secure.example.com&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Network Security Client Tls Policy Advanced
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.networksecurity.ClientTlsPolicy;
 * import com.pulumi.gcp.networksecurity.ClientTlsPolicyArgs;
 * import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyClientCertificateArgs;
 * import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs;
 * import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyServerValidationCaArgs;
 * import com.pulumi.gcp.networksecurity.inputs.ClientTlsPolicyServerValidationCaGrpcEndpointArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var default_ = new ClientTlsPolicy(&#34;default&#34;, ClientTlsPolicyArgs.builder()        
 *             .labels(Map.of(&#34;foo&#34;, &#34;bar&#34;))
 *             .description(&#34;my description&#34;)
 *             .clientCertificate(ClientTlsPolicyClientCertificateArgs.builder()
 *                 .certificateProviderInstance(ClientTlsPolicyClientCertificateCertificateProviderInstanceArgs.builder()
 *                     .pluginInstance(&#34;google_cloud_private_spiffe&#34;)
 *                     .build())
 *                 .build())
 *             .serverValidationCas(            
 *                 ClientTlsPolicyServerValidationCaArgs.builder()
 *                     .grpcEndpoint(ClientTlsPolicyServerValidationCaGrpcEndpointArgs.builder()
 *                         .targetUri(&#34;unix:mypath&#34;)
 *                         .build())
 *                     .build(),
 *                 ClientTlsPolicyServerValidationCaArgs.builder()
 *                     .grpcEndpoint(ClientTlsPolicyServerValidationCaGrpcEndpointArgs.builder()
 *                         .targetUri(&#34;unix:mypath1&#34;)
 *                         .build())
 *                     .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * ClientTlsPolicy can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default projects/{{project}}/locations/{{location}}/clientTlsPolicies/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default {{project}}/{{location}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy default {{location}}/{{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy")
public class ClientTlsPolicy extends com.pulumi.resources.CustomResource {
    /**
     * Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS.
     * Structure is documented below.
     * 
     */
    @Export(name="clientCertificate", type=ClientTlsPolicyClientCertificate.class, parameters={})
    private Output</* @Nullable */ ClientTlsPolicyClientCertificate> clientCertificate;

    /**
     * @return Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS.
     * Structure is documented below.
     * 
     */
    public Output<Optional<ClientTlsPolicyClientCertificate>> clientCertificate() {
        return Codegen.optional(this.clientCertificate);
    }
    /**
     * Time the ClientTlsPolicy was created in UTC.
     * 
     */
    @Export(name="createTime", type=String.class, parameters={})
    private Output<String> createTime;

    /**
     * @return Time the ClientTlsPolicy was created in UTC.
     * 
     */
    public Output<String> createTime() {
        return this.createTime;
    }
    /**
     * A free-text description of the resource. Max length 1024 characters.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return A free-text description of the resource. Max length 1024 characters.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * Set of label tags associated with the ClientTlsPolicy resource.
     * 
     */
    @Export(name="labels", type=Map.class, parameters={String.class, String.class})
    private Output</* @Nullable */ Map<String,String>> labels;

    /**
     * @return Set of label tags associated with the ClientTlsPolicy resource.
     * 
     */
    public Output<Optional<Map<String,String>>> labels() {
        return Codegen.optional(this.labels);
    }
    /**
     * The location of the client tls policy.
     * The default value is `global`.
     * 
     */
    @Export(name="location", type=String.class, parameters={})
    private Output</* @Nullable */ String> location;

    /**
     * @return The location of the client tls policy.
     * The default value is `global`.
     * 
     */
    public Output<Optional<String>> location() {
        return Codegen.optional(this.location);
    }
    /**
     * Name of the ClientTlsPolicy resource.
     * 
     * ***
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Name of the ClientTlsPolicy resource.
     * 
     * ***
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
     * Structure is documented below.
     * 
     */
    @Export(name="serverValidationCas", type=List.class, parameters={ClientTlsPolicyServerValidationCa.class})
    private Output</* @Nullable */ List<ClientTlsPolicyServerValidationCa>> serverValidationCas;

    /**
     * @return Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.
     * Structure is documented below.
     * 
     */
    public Output<Optional<List<ClientTlsPolicyServerValidationCa>>> serverValidationCas() {
        return Codegen.optional(this.serverValidationCas);
    }
    /**
     * Server Name Indication string to present to the server during TLS handshake. E.g: &#34;secure.example.com&#34;.
     * 
     */
    @Export(name="sni", type=String.class, parameters={})
    private Output</* @Nullable */ String> sni;

    /**
     * @return Server Name Indication string to present to the server during TLS handshake. E.g: &#34;secure.example.com&#34;.
     * 
     */
    public Output<Optional<String>> sni() {
        return Codegen.optional(this.sni);
    }
    /**
     * Time the ClientTlsPolicy was updated in UTC.
     * 
     */
    @Export(name="updateTime", type=String.class, parameters={})
    private Output<String> updateTime;

    /**
     * @return Time the ClientTlsPolicy was updated in UTC.
     * 
     */
    public Output<String> updateTime() {
        return this.updateTime;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ClientTlsPolicy(String name) {
        this(name, ClientTlsPolicyArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ClientTlsPolicy(String name, @Nullable ClientTlsPolicyArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public ClientTlsPolicy(String name, @Nullable ClientTlsPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy", name, args == null ? ClientTlsPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private ClientTlsPolicy(String name, Output<String> id, @Nullable ClientTlsPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:networksecurity/clientTlsPolicy:ClientTlsPolicy", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static ClientTlsPolicy get(String name, Output<String> id, @Nullable ClientTlsPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ClientTlsPolicy(name, id, state, options);
    }
}
