// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";

/**
 * This resource allows you to configure gates for your Statsig project.
 *
 * To learn more about gates, see [Gates Documentation](https://docs.statsig.com/feature-flags/)
 *
 * To learn more about the API powering this resource, see [Gates API Documentation](https://docs.statsig.com/console-api/gates)
 */
export class Gate extends pulumi.CustomResource {
    /**
     * Get an existing Gate 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 Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GateState, opts?: pulumi.CustomResourceOptions): Gate {
        return new Gate(name, <any>state, { ...opts, id: id });
    }

    /** @internal */
    public static readonly __pulumiType = 'statsig:index/gate:Gate';

    /**
     * Returns true if the given object is an instance of Gate.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    public static isInstance(obj: any): obj is Gate {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === Gate.__pulumiType;
    }

    public readonly creatorEmail!: pulumi.Output<string>;
    public readonly creatorId!: pulumi.Output<string>;
    public readonly description!: pulumi.Output<string>;
    public readonly idType!: pulumi.Output<string>;
    public readonly isEnabled!: pulumi.Output<boolean>;
    public readonly measureMetricLifts!: pulumi.Output<boolean>;
    public readonly monitoringMetrics!: pulumi.Output<outputs.GateMonitoringMetric[]>;
    /**
     * id
     */
    public readonly name!: pulumi.Output<string>;
    public readonly rules!: pulumi.Output<outputs.GateRule[]>;
    public readonly tags!: pulumi.Output<string[]>;
    public readonly targetApps!: pulumi.Output<string[]>;
    public readonly team!: pulumi.Output<string>;
    public readonly type!: pulumi.Output<string>;

    /**
     * Create a Gate resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args?: GateArgs, opts?: pulumi.CustomResourceOptions)
    constructor(name: string, argsOrState?: GateArgs | GateState, opts?: pulumi.CustomResourceOptions) {
        let resourceInputs: pulumi.Inputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState as GateState | undefined;
            resourceInputs["creatorEmail"] = state ? state.creatorEmail : undefined;
            resourceInputs["creatorId"] = state ? state.creatorId : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["idType"] = state ? state.idType : undefined;
            resourceInputs["isEnabled"] = state ? state.isEnabled : undefined;
            resourceInputs["measureMetricLifts"] = state ? state.measureMetricLifts : undefined;
            resourceInputs["monitoringMetrics"] = state ? state.monitoringMetrics : undefined;
            resourceInputs["name"] = state ? state.name : undefined;
            resourceInputs["rules"] = state ? state.rules : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["targetApps"] = state ? state.targetApps : undefined;
            resourceInputs["team"] = state ? state.team : undefined;
            resourceInputs["type"] = state ? state.type : undefined;
        } else {
            const args = argsOrState as GateArgs | undefined;
            resourceInputs["creatorEmail"] = args ? args.creatorEmail : undefined;
            resourceInputs["creatorId"] = args ? args.creatorId : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["idType"] = args ? args.idType : undefined;
            resourceInputs["isEnabled"] = args ? args.isEnabled : undefined;
            resourceInputs["measureMetricLifts"] = args ? args.measureMetricLifts : undefined;
            resourceInputs["monitoringMetrics"] = args ? args.monitoringMetrics : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["rules"] = args ? args.rules : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["targetApps"] = args ? args.targetApps : undefined;
            resourceInputs["team"] = args ? args.team : undefined;
            resourceInputs["type"] = args ? args.type : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Gate.__pulumiType, name, resourceInputs, opts);
    }
}

/**
 * Input properties used for looking up and filtering Gate resources.
 */
export interface GateState {
    creatorEmail?: pulumi.Input<string>;
    creatorId?: pulumi.Input<string>;
    description?: pulumi.Input<string>;
    idType?: pulumi.Input<string>;
    isEnabled?: pulumi.Input<boolean>;
    measureMetricLifts?: pulumi.Input<boolean>;
    monitoringMetrics?: pulumi.Input<pulumi.Input<inputs.GateMonitoringMetric>[]>;
    /**
     * id
     */
    name?: pulumi.Input<string>;
    rules?: pulumi.Input<pulumi.Input<inputs.GateRule>[]>;
    tags?: pulumi.Input<pulumi.Input<string>[]>;
    targetApps?: pulumi.Input<pulumi.Input<string>[]>;
    team?: pulumi.Input<string>;
    type?: pulumi.Input<string>;
}

/**
 * The set of arguments for constructing a Gate resource.
 */
export interface GateArgs {
    creatorEmail?: pulumi.Input<string>;
    creatorId?: pulumi.Input<string>;
    description?: pulumi.Input<string>;
    idType?: pulumi.Input<string>;
    isEnabled?: pulumi.Input<boolean>;
    measureMetricLifts?: pulumi.Input<boolean>;
    monitoringMetrics?: pulumi.Input<pulumi.Input<inputs.GateMonitoringMetric>[]>;
    /**
     * id
     */
    name?: pulumi.Input<string>;
    rules?: pulumi.Input<pulumi.Input<inputs.GateRule>[]>;
    tags?: pulumi.Input<pulumi.Input<string>[]>;
    targetApps?: pulumi.Input<pulumi.Input<string>[]>;
    team?: pulumi.Input<string>;
    type?: pulumi.Input<string>;
}
