"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.SqlEndpoint = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Sql Endpoint resource in Oracle Cloud Infrastructure Data Flow service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-flow/latest/SqlEndpoint
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/dataflow
 *
 * ## Note
 *
 * Resource Discovery is not supported for this resource.
 *
 * Create a new Sql Endpoint.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testSqlEndpoint = new oci.dataflow.SqlEndpoint("test_sql_endpoint", {
 *     compartmentId: compartmentId,
 *     displayName: sqlEndpointDisplayName,
 *     driverShape: sqlEndpointDriverShape,
 *     executorShape: sqlEndpointExecutorShape,
 *     lakeId: testLake.id,
 *     maxExecutorCount: Number(sqlEndpointMaxExecutorCount),
 *     metastoreId: testMetastore.id,
 *     minExecutorCount: Number(sqlEndpointMinExecutorCount),
 *     networkConfiguration: {
 *         networkType: sqlEndpointNetworkConfigurationNetworkType,
 *         accessControlRules: [{
 *             ipNotation: sqlEndpointNetworkConfigurationAccessControlRulesIpNotation,
 *             value: sqlEndpointNetworkConfigurationAccessControlRulesValue,
 *             vcnIps: sqlEndpointNetworkConfigurationAccessControlRulesVcnIps,
 *         }],
 *         hostNamePrefix: sqlEndpointNetworkConfigurationHostNamePrefix,
 *         nsgIds: sqlEndpointNetworkConfigurationNsgIds,
 *         privateEndpointIp: sqlEndpointNetworkConfigurationPrivateEndpointIp,
 *         publicEndpointIp: sqlEndpointNetworkConfigurationPublicEndpointIp,
 *         subnetId: testSubnet.id,
 *         vcnId: testVcn.id,
 *     },
 *     sqlEndpointVersion: sqlEndpointSqlEndpointVersion,
 *     warehouseBucketUri: sqlEndpointWarehouseBucketUri,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     description: sqlEndpointDescription,
 *     driverShapeConfig: {
 *         memoryInGbs: sqlEndpointDriverShapeConfigMemoryInGbs,
 *         ocpus: sqlEndpointDriverShapeConfigOcpus,
 *     },
 *     executorShapeConfig: {
 *         memoryInGbs: sqlEndpointExecutorShapeConfigMemoryInGbs,
 *         ocpus: sqlEndpointExecutorShapeConfigOcpus,
 *     },
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     logCompartmentId: testCompartment.id,
 *     logDisplayName: sqlEndpointLogDisplayName,
 *     logGroupId: testLogGroup.id,
 *     logRetentionDuration: Number(sqlEndpointLogRetentionDuration),
 *     sparkAdvancedConfigurations: sqlEndpointSparkAdvancedConfigurations,
 * });
 * ```
 *
 * ## Import
 *
 * SqlEndpoints can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:DataFlow/sqlEndpoint:SqlEndpoint test_sql_endpoint "id"
 * ```
 */
class SqlEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing SqlEndpoint 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 SqlEndpoint(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:DataFlow/sqlEndpoint:SqlEndpoint';
    /**
     * Returns true if the given object is an instance of SqlEndpoint.  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'] === SqlEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["driverShape"] = state?.driverShape;
            resourceInputs["driverShapeConfig"] = state?.driverShapeConfig;
            resourceInputs["executorShape"] = state?.executorShape;
            resourceInputs["executorShapeConfig"] = state?.executorShapeConfig;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["jdbcEndpointUrl"] = state?.jdbcEndpointUrl;
            resourceInputs["lakeId"] = state?.lakeId;
            resourceInputs["logCompartmentId"] = state?.logCompartmentId;
            resourceInputs["logDisplayName"] = state?.logDisplayName;
            resourceInputs["logGroupId"] = state?.logGroupId;
            resourceInputs["logRetentionDuration"] = state?.logRetentionDuration;
            resourceInputs["maxExecutorCount"] = state?.maxExecutorCount;
            resourceInputs["metastoreId"] = state?.metastoreId;
            resourceInputs["minExecutorCount"] = state?.minExecutorCount;
            resourceInputs["networkConfiguration"] = state?.networkConfiguration;
            resourceInputs["sparkAdvancedConfigurations"] = state?.sparkAdvancedConfigurations;
            resourceInputs["sqlEndpointVersion"] = state?.sqlEndpointVersion;
            resourceInputs["state"] = state?.state;
            resourceInputs["stateMessage"] = state?.stateMessage;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["warehouseBucketUri"] = state?.warehouseBucketUri;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.driverShape === undefined && !opts.urn) {
                throw new Error("Missing required property 'driverShape'");
            }
            if (args?.executorShape === undefined && !opts.urn) {
                throw new Error("Missing required property 'executorShape'");
            }
            if (args?.maxExecutorCount === undefined && !opts.urn) {
                throw new Error("Missing required property 'maxExecutorCount'");
            }
            if (args?.metastoreId === undefined && !opts.urn) {
                throw new Error("Missing required property 'metastoreId'");
            }
            if (args?.minExecutorCount === undefined && !opts.urn) {
                throw new Error("Missing required property 'minExecutorCount'");
            }
            if (args?.networkConfiguration === undefined && !opts.urn) {
                throw new Error("Missing required property 'networkConfiguration'");
            }
            if (args?.sqlEndpointVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'sqlEndpointVersion'");
            }
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["driverShape"] = args?.driverShape;
            resourceInputs["driverShapeConfig"] = args?.driverShapeConfig;
            resourceInputs["executorShape"] = args?.executorShape;
            resourceInputs["executorShapeConfig"] = args?.executorShapeConfig;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["logCompartmentId"] = args?.logCompartmentId;
            resourceInputs["logDisplayName"] = args?.logDisplayName;
            resourceInputs["logGroupId"] = args?.logGroupId;
            resourceInputs["logRetentionDuration"] = args?.logRetentionDuration;
            resourceInputs["maxExecutorCount"] = args?.maxExecutorCount;
            resourceInputs["metastoreId"] = args?.metastoreId;
            resourceInputs["minExecutorCount"] = args?.minExecutorCount;
            resourceInputs["networkConfiguration"] = args?.networkConfiguration;
            resourceInputs["sparkAdvancedConfigurations"] = args?.sparkAdvancedConfigurations;
            resourceInputs["sqlEndpointVersion"] = args?.sqlEndpointVersion;
            resourceInputs["state"] = args?.state;
            resourceInputs["jdbcEndpointUrl"] = undefined /*out*/;
            resourceInputs["lakeId"] = undefined /*out*/;
            resourceInputs["stateMessage"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
            resourceInputs["warehouseBucketUri"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SqlEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SqlEndpoint = SqlEndpoint;
//# sourceMappingURL=sqlEndpoint.js.map