"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.ManagedKafkaKafkaCluster = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Kafka Cluster resource in Oracle Cloud Infrastructure Managed Kafka service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/kafka/latest/KafkaCluster
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/managed_kafka
 *
 * Creates a KafkaCluster.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testKafkaCluster = new oci.oci.ManagedKafkaKafkaCluster("test_kafka_cluster", {
 *     accessSubnets: [{
 *         subnets: kafkaClusterAccessSubnetsSubnets,
 *     }],
 *     brokerShape: {
 *         nodeCount: Number(kafkaClusterBrokerShapeNodeCount),
 *         ocpuCount: Number(kafkaClusterBrokerShapeOcpuCount),
 *         nodeShape: kafkaClusterBrokerShapeNodeShape,
 *         storageSizeInGbs: Number(kafkaClusterBrokerShapeStorageSizeInGbs),
 *     },
 *     clusterConfigId: testConfig.id,
 *     clusterConfigVersion: Number(kafkaClusterClusterConfigVersion),
 *     clusterType: kafkaClusterClusterType,
 *     compartmentId: compartmentId,
 *     coordinationType: kafkaClusterCoordinationType,
 *     kafkaVersion: kafkaClusterKafkaVersion,
 *     clientCertificateBundle: kafkaClusterClientCertificateBundle,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: kafkaClusterDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * KafkaClusters can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:oci/managedKafkaKafkaCluster:ManagedKafkaKafkaCluster test_kafka_cluster "id"
 * ```
 */
class ManagedKafkaKafkaCluster extends pulumi.CustomResource {
    /**
     * Get an existing ManagedKafkaKafkaCluster 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 ManagedKafkaKafkaCluster(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:oci/managedKafkaKafkaCluster:ManagedKafkaKafkaCluster';
    /**
     * Returns true if the given object is an instance of ManagedKafkaKafkaCluster.  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'] === ManagedKafkaKafkaCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessSubnets"] = state?.accessSubnets;
            resourceInputs["brokerShape"] = state?.brokerShape;
            resourceInputs["clientCertificateBundle"] = state?.clientCertificateBundle;
            resourceInputs["clusterConfigId"] = state?.clusterConfigId;
            resourceInputs["clusterConfigVersion"] = state?.clusterConfigVersion;
            resourceInputs["clusterType"] = state?.clusterType;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["coordinationType"] = state?.coordinationType;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["kafkaBootstrapUrls"] = state?.kafkaBootstrapUrls;
            resourceInputs["kafkaVersion"] = state?.kafkaVersion;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["secretId"] = state?.secretId;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
        }
        else {
            const args = argsOrState;
            if (args?.accessSubnets === undefined && !opts.urn) {
                throw new Error("Missing required property 'accessSubnets'");
            }
            if (args?.brokerShape === undefined && !opts.urn) {
                throw new Error("Missing required property 'brokerShape'");
            }
            if (args?.clusterConfigId === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterConfigId'");
            }
            if (args?.clusterConfigVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterConfigVersion'");
            }
            if (args?.clusterType === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterType'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.coordinationType === undefined && !opts.urn) {
                throw new Error("Missing required property 'coordinationType'");
            }
            if (args?.kafkaVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'kafkaVersion'");
            }
            resourceInputs["accessSubnets"] = args?.accessSubnets;
            resourceInputs["brokerShape"] = args?.brokerShape;
            resourceInputs["clientCertificateBundle"] = args?.clientCertificateBundle;
            resourceInputs["clusterConfigId"] = args?.clusterConfigId;
            resourceInputs["clusterConfigVersion"] = args?.clusterConfigVersion;
            resourceInputs["clusterType"] = args?.clusterType;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["coordinationType"] = args?.coordinationType;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["kafkaVersion"] = args?.kafkaVersion;
            resourceInputs["kafkaBootstrapUrls"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["secretId"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ManagedKafkaKafkaCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ManagedKafkaKafkaCluster = ManagedKafkaKafkaCluster;
//# sourceMappingURL=managedKafkaKafkaCluster.js.map