"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.Gateway = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Gateway resource in Oracle Cloud Infrastructure API Gateway service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/api-gateway/latest/Gateway
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/api_gateway
 *
 * Creates a new gateway.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testGateway = new oci.apigateway.Gateway("test_gateway", {
 *     compartmentId: compartmentId,
 *     endpointType: gatewayEndpointType,
 *     subnetId: testSubnet.id,
 *     certificateId: testCertificate.id,
 *     caBundles: [{
 *         type: gatewayCaBundlesType,
 *         caBundleId: testCaBundle.id,
 *         certificateAuthorityId: testCertificateAuthority.id,
 *     }],
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: gatewayDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     ipMode: gatewayIpMode,
 *     ipv4addressConfiguration: {
 *         reservedIpIds: gatewayIpv4addressConfigurationReservedIpIds,
 *     },
 *     ipv6addressConfiguration: {
 *         addresses: gatewayIpv6addressConfigurationAddresses,
 *         subnetCidrs: gatewayIpv6addressConfigurationSubnetCidrs,
 *     },
 *     locks: [{
 *         type: gatewayLocksType,
 *         message: gatewayLocksMessage,
 *     }],
 *     networkSecurityGroupIds: gatewayNetworkSecurityGroupIds,
 *     responseCacheDetails: {
 *         type: gatewayResponseCacheDetailsType,
 *         authenticationSecretId: testSecret.id,
 *         authenticationSecretVersionNumber: gatewayResponseCacheDetailsAuthenticationSecretVersionNumber,
 *         connectTimeoutInMs: Number(gatewayResponseCacheDetailsConnectTimeoutInMs),
 *         isSslEnabled: gatewayResponseCacheDetailsIsSslEnabled === "true",
 *         isSslVerifyDisabled: gatewayResponseCacheDetailsIsSslVerifyDisabled === "true",
 *         readTimeoutInMs: Number(gatewayResponseCacheDetailsReadTimeoutInMs),
 *         sendTimeoutInMs: Number(gatewayResponseCacheDetailsSendTimeoutInMs),
 *         servers: [{
 *             host: gatewayResponseCacheDetailsServersHost,
 *             port: Number(gatewayResponseCacheDetailsServersPort),
 *         }],
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Gateways can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:ApiGateway/gateway:Gateway test_gateway "id"
 * ```
 */
class Gateway extends pulumi.CustomResource {
    /**
     * Get an existing Gateway 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 Gateway(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:ApiGateway/gateway:Gateway';
    /**
     * Returns true if the given object is an instance of Gateway.  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'] === Gateway.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["caBundles"] = state?.caBundles;
            resourceInputs["certificateId"] = state?.certificateId;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["endpointType"] = state?.endpointType;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hostname"] = state?.hostname;
            resourceInputs["ipAddresses"] = state?.ipAddresses;
            resourceInputs["ipMode"] = state?.ipMode;
            resourceInputs["ipv4addressConfiguration"] = state?.ipv4addressConfiguration;
            resourceInputs["ipv6addressConfiguration"] = state?.ipv6addressConfiguration;
            resourceInputs["isLockOverride"] = state?.isLockOverride;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["locks"] = state?.locks;
            resourceInputs["networkSecurityGroupIds"] = state?.networkSecurityGroupIds;
            resourceInputs["responseCacheDetails"] = state?.responseCacheDetails;
            resourceInputs["state"] = state?.state;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.endpointType === undefined && !opts.urn) {
                throw new Error("Missing required property 'endpointType'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            resourceInputs["caBundles"] = args?.caBundles;
            resourceInputs["certificateId"] = args?.certificateId;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["endpointType"] = args?.endpointType;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["ipMode"] = args?.ipMode;
            resourceInputs["ipv4addressConfiguration"] = args?.ipv4addressConfiguration;
            resourceInputs["ipv6addressConfiguration"] = args?.ipv6addressConfiguration;
            resourceInputs["isLockOverride"] = args?.isLockOverride;
            resourceInputs["locks"] = args?.locks;
            resourceInputs["networkSecurityGroupIds"] = args?.networkSecurityGroupIds;
            resourceInputs["responseCacheDetails"] = args?.responseCacheDetails;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["hostname"] = undefined /*out*/;
            resourceInputs["ipAddresses"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = 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(Gateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Gateway = Gateway;
//# sourceMappingURL=gateway.js.map