"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.V2OrganizationSource = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Cloud Security Command Center's (Cloud SCC) finding source. A finding
 * source is an entity or a mechanism that can produce a finding. A source is
 * like a container of findings that come from the same scanner, logger,
 * monitor, etc.
 *
 * To get more information about OrganizationSource, see:
 *
 * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v2/organizations.sources)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/security-command-center/docs)
 *
 * ## Example Usage
 *
 * ### Scc Source Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const customSource = new gcp.securitycenter.Source("custom_source", {
 *     displayName: "My Source",
 *     organization: "123456789",
 *     description: "My custom Cloud Security Command Center Finding Source",
 * });
 * ```
 *
 * ## Import
 *
 * OrganizationSource can be imported using any of these accepted formats:
 *
 * * `organizations/{{organization}}/sources/{{name}}`
 *
 * * `{{organization}}/{{name}}`
 *
 * When using the `pulumi import` command, OrganizationSource can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/v2OrganizationSource:V2OrganizationSource default organizations/{{organization}}/sources/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/v2OrganizationSource:V2OrganizationSource default {{organization}}/{{name}}
 * ```
 */
class V2OrganizationSource extends pulumi.CustomResource {
    /**
     * Get an existing V2OrganizationSource 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.
     */
    static get(name, id, state, opts) {
        return new V2OrganizationSource(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of V2OrganizationSource.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === V2OrganizationSource.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["name"] = state?.name;
            resourceInputs["organization"] = state?.organization;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.organization === undefined && !opts.urn) {
                throw new Error("Missing required property 'organization'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["organization"] = args?.organization;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(V2OrganizationSource.__pulumiType, name, resourceInputs, opts);
    }
}
exports.V2OrganizationSource = V2OrganizationSource;
/** @internal */
V2OrganizationSource.__pulumiType = 'gcp:securitycenter/v2OrganizationSource:V2OrganizationSource';
//# sourceMappingURL=v2organizationSource.js.map