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

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.compute.OrganizationSecurityPolicyArgs;
import com.pulumi.gcp.compute.inputs.OrganizationSecurityPolicyState;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Organization security policies are used to control incoming/outgoing traffic.
 * 
 * To get more information about OrganizationSecurityPolicy, see:
 * 
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies)
 * * How-to Guides
 *     * [Creating a firewall policy](https://cloud.google.com/vpc/docs/using-firewall-policies#create-policy)
 * 
 * ## Example Usage
 * ### Organization Security Policy Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.OrganizationSecurityPolicy;
 * import com.pulumi.gcp.compute.OrganizationSecurityPolicyArgs;
 * 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 policy = new OrganizationSecurityPolicy(&#34;policy&#34;, OrganizationSecurityPolicyArgs.builder()        
 *             .displayName(&#34;tf-test&#34;)
 *             .parent(&#34;organizations/123456789&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * OrganizationSecurityPolicy can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default locations/global/securityPolicies/{{policy_id}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy default {{policy_id}}
 * ```
 * 
 */
@ResourceType(type="gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy")
public class OrganizationSecurityPolicy extends com.pulumi.resources.CustomResource {
    /**
     * A textual description for the organization security policy.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return A textual description for the organization security policy.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * A textual name of the security policy.
     * 
     */
    @Export(name="displayName", type=String.class, parameters={})
    private Output<String> displayName;

    /**
     * @return A textual name of the security policy.
     * 
     */
    public Output<String> displayName() {
        return this.displayName;
    }
    /**
     * Fingerprint of this resource. This field is used internally during
     * updates of this resource.
     * 
     */
    @Export(name="fingerprint", type=String.class, parameters={})
    private Output<String> fingerprint;

    /**
     * @return Fingerprint of this resource. This field is used internally during
     * updates of this resource.
     * 
     */
    public Output<String> fingerprint() {
        return this.fingerprint;
    }
    /**
     * The parent of this OrganizationSecurityPolicy in the Cloud Resource Hierarchy.
     * Format: organizations/{organization_id} or folders/{folder_id}
     * 
     * ***
     * 
     */
    @Export(name="parent", type=String.class, parameters={})
    private Output<String> parent;

    /**
     * @return The parent of this OrganizationSecurityPolicy in the Cloud Resource Hierarchy.
     * Format: organizations/{organization_id} or folders/{folder_id}
     * 
     * ***
     * 
     */
    public Output<String> parent() {
        return this.parent;
    }
    /**
     * The unique identifier for the resource. This identifier is defined by the server.
     * 
     */
    @Export(name="policyId", type=String.class, parameters={})
    private Output<String> policyId;

    /**
     * @return The unique identifier for the resource. This identifier is defined by the server.
     * 
     */
    public Output<String> policyId() {
        return this.policyId;
    }
    /**
     * The type indicates the intended use of the security policy.
     * For organization security policies, the only supported type
     * is &#34;FIREWALL&#34;.
     * Default value is `FIREWALL`.
     * Possible values are: `FIREWALL`.
     * 
     */
    @Export(name="type", type=String.class, parameters={})
    private Output</* @Nullable */ String> type;

    /**
     * @return The type indicates the intended use of the security policy.
     * For organization security policies, the only supported type
     * is &#34;FIREWALL&#34;.
     * Default value is `FIREWALL`.
     * Possible values are: `FIREWALL`.
     * 
     */
    public Output<Optional<String>> type() {
        return Codegen.optional(this.type);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public OrganizationSecurityPolicy(String name) {
        this(name, OrganizationSecurityPolicyArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public OrganizationSecurityPolicy(String name, OrganizationSecurityPolicyArgs 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 OrganizationSecurityPolicy(String name, OrganizationSecurityPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy", name, args == null ? OrganizationSecurityPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private OrganizationSecurityPolicy(String name, Output<String> id, @Nullable OrganizationSecurityPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/organizationSecurityPolicy:OrganizationSecurityPolicy", 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 OrganizationSecurityPolicy get(String name, Output<String> id, @Nullable OrganizationSecurityPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new OrganizationSecurityPolicy(name, id, state, options);
    }
}
