"use strict";
// *** 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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Account = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage organization account
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooUnit = new volcengine.organization.Unit("fooUnit", {
 *     parentId: "730671013833632****",
 *     description: "acc-test",
 * });
 * const fooAccount = new volcengine.organization.Account("fooAccount", {
 *     accountName: "acc-test-account",
 *     showName: "acc-test-account",
 *     description: "acc-test",
 *     orgUnitId: fooUnit.id,
 *     verificationRelationId: "210026****",
 *     tags: [{
 *         key: "k1",
 *         value: "v1",
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * OrganizationAccount can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:organization/account:Account default resource_id
 * ```
 */
class Account extends pulumi.CustomResource {
    /**
     * Get an existing Account 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 Account(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Account.  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'] === Account.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountName"] = state ? state.accountName : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["iamRole"] = state ? state.iamRole : undefined;
            resourceInputs["orgId"] = state ? state.orgId : undefined;
            resourceInputs["orgUnitId"] = state ? state.orgUnitId : undefined;
            resourceInputs["orgUnitName"] = state ? state.orgUnitName : undefined;
            resourceInputs["orgVerificationId"] = state ? state.orgVerificationId : undefined;
            resourceInputs["owner"] = state ? state.owner : undefined;
            resourceInputs["showName"] = state ? state.showName : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["verificationRelationId"] = state ? state.verificationRelationId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.accountName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'accountName'");
            }
            if ((!args || args.showName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'showName'");
            }
            resourceInputs["accountName"] = args ? args.accountName : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["orgUnitId"] = args ? args.orgUnitId : undefined;
            resourceInputs["showName"] = args ? args.showName : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["verificationRelationId"] = args ? args.verificationRelationId : undefined;
            resourceInputs["iamRole"] = undefined /*out*/;
            resourceInputs["orgId"] = undefined /*out*/;
            resourceInputs["orgUnitName"] = undefined /*out*/;
            resourceInputs["orgVerificationId"] = undefined /*out*/;
            resourceInputs["owner"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Account.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Account = Account;
/** @internal */
Account.__pulumiType = 'volcengine:organization/account:Account';
//# sourceMappingURL=account.js.map