"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.SerialPort = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents the serial port of the parent resource.
 *
 * Uses Azure REST API version 2018-05-01. In version 2.x of the Azure Native provider, it used API version 2018-05-01.
 */
class SerialPort extends pulumi.CustomResource {
    /**
     * Get an existing SerialPort 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 SerialPort(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of SerialPort.  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'] === SerialPort.__pulumiType;
    }
    /**
     * Create a SerialPort 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?.parentResource === undefined && !opts.urn) {
                throw new Error("Missing required property 'parentResource'");
            }
            if (args?.parentResourceType === undefined && !opts.urn) {
                throw new Error("Missing required property 'parentResourceType'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.resourceProviderNamespace === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceProviderNamespace'");
            }
            resourceInputs["parentResource"] = args?.parentResource;
            resourceInputs["parentResourceType"] = args?.parentResourceType;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["resourceProviderNamespace"] = args?.resourceProviderNamespace;
            resourceInputs["serialPort"] = args?.serialPort;
            resourceInputs["state"] = args?.state;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:serialconsole/v20180501:SerialPort" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(SerialPort.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SerialPort = SerialPort;
/** @internal */
SerialPort.__pulumiType = 'azure-native:serialconsole:SerialPort';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsUG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NlcmlhbGNvbnNvbGUvc2VyaWFsUG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsc0VBQXNFO0FBQ3RFLGlGQUFpRjs7O0FBRWpGLHlDQUF5QztBQUl6QywwQ0FBMEM7QUFFMUM7Ozs7R0FJRztBQUNILE1BQWEsVUFBVyxTQUFRLE1BQU0sQ0FBQyxjQUFjO0lBQ2pEOzs7Ozs7O09BT0c7SUFDSSxNQUFNLENBQUMsR0FBRyxDQUFDLElBQVksRUFBRSxFQUEyQixFQUFFLElBQW1DO1FBQzVGLE9BQU8sSUFBSSxVQUFVLENBQUMsSUFBSSxFQUFFLFNBQWdCLEVBQUUsRUFBRSxHQUFHLElBQUksRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQztJQUN2RSxDQUFDO0lBS0Q7OztPQUdHO0lBQ0ksTUFBTSxDQUFDLFVBQVUsQ0FBQyxHQUFRO1FBQzdCLElBQUksR0FB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