"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerGateway = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Specifies a customer gateway.
 */
class CustomerGateway extends pulumi.CustomResource {
    /**
     * Get an existing CustomerGateway 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new CustomerGateway(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CustomerGateway.  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'] === CustomerGateway.__pulumiType;
    }
    /**
     * Create a CustomerGateway resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.ipAddress === undefined && !opts.urn) {
                throw new Error("Missing required property 'ipAddress'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["bgpAsn"] = args?.bgpAsn;
            resourceInputs["bgpAsnExtended"] = args?.bgpAsnExtended;
            resourceInputs["certificateArn"] = args?.certificateArn;
            resourceInputs["deviceName"] = args?.deviceName;
            resourceInputs["ipAddress"] = args?.ipAddress;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["type"] = args?.type;
            resourceInputs["customerGatewayId"] = undefined /*out*/;
        }
        else {
            resourceInputs["bgpAsn"] = undefined /*out*/;
            resourceInputs["bgpAsnExtended"] = undefined /*out*/;
            resourceInputs["certificateArn"] = undefined /*out*/;
            resourceInputs["customerGatewayId"] = undefined /*out*/;
            resourceInputs["deviceName"] = undefined /*out*/;
            resourceInputs["ipAddress"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["bgpAsn", "bgpAsnExtended", "certificateArn", "deviceName", "ipAddress", "type"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(CustomerGateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CustomerGateway = CustomerGateway;
/** @internal */
CustomerGateway.__pulumiType = 'aws-native:ec2:CustomerGateway';
//# sourceMappingURL=customerGateway.js.map