"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockchainPlatform = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Blockchain Platform resource in Oracle Cloud Infrastructure Blockchain service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/blockchain/latest/BlockchainPlatform
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/blockchain
 *
 * Creates a new Blockchain Platform.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testBlockchainPlatform = new oci.blockchain.BlockchainPlatform("test_blockchain_platform", {
 *     compartmentId: compartmentId,
 *     computeShape: blockchainPlatformComputeShape,
 *     displayName: blockchainPlatformDisplayName,
 *     idcsAccessToken: blockchainPlatformIdcsAccessToken,
 *     platformRole: blockchainPlatformPlatformRole,
 *     caCertArchiveText: blockchainPlatformCaCertArchiveText,
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     description: blockchainPlatformDescription,
 *     federatedUserId: testUser.id,
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     isByol: blockchainPlatformIsByol === "true",
 *     platformVersion: blockchainPlatformPlatformVersion,
 * });
 * ```
 *
 * ## Import
 *
 * BlockchainPlatforms can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Blockchain/blockchainPlatform:BlockchainPlatform test_blockchain_platform "id"
 * ```
 */
class BlockchainPlatform extends pulumi.CustomResource {
    /**
     * Get an existing BlockchainPlatform 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 BlockchainPlatform(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Blockchain/blockchainPlatform:BlockchainPlatform';
    /**
     * Returns true if the given object is an instance of BlockchainPlatform.  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'] === BlockchainPlatform.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["caCertArchiveText"] = state?.caCertArchiveText;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["componentDetails"] = state?.componentDetails;
            resourceInputs["computeShape"] = state?.computeShape;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["federatedUserId"] = state?.federatedUserId;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hostOcpuUtilizationInfos"] = state?.hostOcpuUtilizationInfos;
            resourceInputs["idcsAccessToken"] = state?.idcsAccessToken;
            resourceInputs["isByol"] = state?.isByol;
            resourceInputs["isMultiAd"] = state?.isMultiAd;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["loadBalancerShape"] = state?.loadBalancerShape;
            resourceInputs["platformRole"] = state?.platformRole;
            resourceInputs["platformShapeType"] = state?.platformShapeType;
            resourceInputs["platformVersion"] = state?.platformVersion;
            resourceInputs["replicas"] = state?.replicas;
            resourceInputs["serviceEndpoint"] = state?.serviceEndpoint;
            resourceInputs["serviceVersion"] = state?.serviceVersion;
            resourceInputs["state"] = state?.state;
            resourceInputs["storageSizeInTbs"] = state?.storageSizeInTbs;
            resourceInputs["storageUsedInTbs"] = state?.storageUsedInTbs;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["totalOcpuCapacity"] = state?.totalOcpuCapacity;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.computeShape === undefined && !opts.urn) {
                throw new Error("Missing required property 'computeShape'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.idcsAccessToken === undefined && !opts.urn) {
                throw new Error("Missing required property 'idcsAccessToken'");
            }
            if (args?.platformRole === undefined && !opts.urn) {
                throw new Error("Missing required property 'platformRole'");
            }
            resourceInputs["caCertArchiveText"] = args?.caCertArchiveText;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["computeShape"] = args?.computeShape;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["federatedUserId"] = args?.federatedUserId;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["idcsAccessToken"] = args?.idcsAccessToken ? pulumi.secret(args.idcsAccessToken) : undefined;
            resourceInputs["isByol"] = args?.isByol;
            resourceInputs["loadBalancerShape"] = args?.loadBalancerShape;
            resourceInputs["platformRole"] = args?.platformRole;
            resourceInputs["platformVersion"] = args?.platformVersion;
            resourceInputs["replicas"] = args?.replicas;
            resourceInputs["storageSizeInTbs"] = args?.storageSizeInTbs;
            resourceInputs["totalOcpuCapacity"] = args?.totalOcpuCapacity;
            resourceInputs["componentDetails"] = undefined /*out*/;
            resourceInputs["hostOcpuUtilizationInfos"] = undefined /*out*/;
            resourceInputs["isMultiAd"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["platformShapeType"] = undefined /*out*/;
            resourceInputs["serviceEndpoint"] = undefined /*out*/;
            resourceInputs["serviceVersion"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["storageUsedInTbs"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["idcsAccessToken"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(BlockchainPlatform.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BlockchainPlatform = BlockchainPlatform;
//# sourceMappingURL=blockchainPlatform.js.map