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

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.bigquery.ReservationAssignmentArgs;
import com.pulumi.gcp.bigquery.inputs.ReservationAssignmentState;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * The BigqueryReservation Assignment resource
 * 
 * ## Example Usage
 * ### Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.bigquery.Reservation;
 * import com.pulumi.gcp.bigquery.ReservationArgs;
 * import com.pulumi.gcp.bigquery.ReservationAssignment;
 * import com.pulumi.gcp.bigquery.ReservationAssignmentArgs;
 * 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 basic = new Reservation(&#34;basic&#34;, ReservationArgs.builder()        
 *             .project(&#34;my-project-name&#34;)
 *             .location(&#34;us-central1&#34;)
 *             .slotCapacity(0)
 *             .ignoreIdleSlots(false)
 *             .build());
 * 
 *         var primary = new ReservationAssignment(&#34;primary&#34;, ReservationAssignmentArgs.builder()        
 *             .assignee(&#34;projects/my-project-name&#34;)
 *             .jobType(&#34;PIPELINE&#34;)
 *             .reservation(basic.id())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Assignment can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{project}}/{{location}}/{{reservation}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:bigquery/reservationAssignment:ReservationAssignment default {{location}}/{{reservation}}/{{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:bigquery/reservationAssignment:ReservationAssignment")
public class ReservationAssignment extends com.pulumi.resources.CustomResource {
    /**
     * The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
     * 
     */
    @Export(name="assignee", type=String.class, parameters={})
    private Output<String> assignee;

    /**
     * @return The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
     * 
     */
    public Output<String> assignee() {
        return this.assignee;
    }
    /**
     * Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
     * 
     */
    @Export(name="jobType", type=String.class, parameters={})
    private Output<String> jobType;

    /**
     * @return Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
     * 
     */
    public Output<String> jobType() {
        return this.jobType;
    }
    /**
     * The location for the resource
     * 
     */
    @Export(name="location", type=String.class, parameters={})
    private Output<String> location;

    /**
     * @return The location for the resource
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * Output only. The resource name of the assignment.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Output only. The resource name of the assignment.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The project for the resource
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The project for the resource
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * The reservation for the resource
     * 
     * ***
     * 
     */
    @Export(name="reservation", type=String.class, parameters={})
    private Output<String> reservation;

    /**
     * @return The reservation for the resource
     * 
     * ***
     * 
     */
    public Output<String> reservation() {
        return this.reservation;
    }
    /**
     * Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
     * 
     */
    @Export(name="state", type=String.class, parameters={})
    private Output<String> state;

    /**
     * @return Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
     * 
     */
    public Output<String> state() {
        return this.state;
    }

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

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