"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.ApiSource = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * API source entity.
 *
 * Uses Azure REST API version 2024-06-01-preview. In version 2.x of the Azure Native provider, it used API version 2024-06-01-preview.
 */
class ApiSource extends pulumi.CustomResource {
    /**
     * Get an existing ApiSource 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 ApiSource(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ApiSource.  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'] === ApiSource.__pulumiType;
    }
    /**
     * Create a ApiSource 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?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.serviceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceName'");
            }
            if (args?.workspaceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'workspaceName'");
            }
            resourceInputs["apiSourceName"] = args?.apiSourceName;
            resourceInputs["azureApiManagementSource"] = args?.azureApiManagementSource;
            resourceInputs["importSpecification"] = (args?.importSpecification) ?? "ondemand";
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["serviceName"] = args?.serviceName;
            resourceInputs["targetEnvironmentId"] = args?.targetEnvironmentId;
            resourceInputs["targetLifecycleStage"] = args?.targetLifecycleStage;
            resourceInputs["workspaceName"] = args?.workspaceName;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["linkState"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        else {
            resourceInputs["azureApiManagementSource"] = undefined /*out*/;
            resourceInputs["azureApiVersion"] = undefined /*out*/;
            resourceInputs["importSpecification"] = undefined /*out*/;
            resourceInputs["linkState"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["systemData"] = undefined /*out*/;
            resourceInputs["targetEnvironmentId"] = undefined /*out*/;
            resourceInputs["targetLifecycleStage"] = undefined /*out*/;
            resourceInputs["type"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "azure-native:apicenter/v20240601preview:ApiSource" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(ApiSource.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ApiSource = ApiSource;
/** @internal */
ApiSource.__pulumiType = 'azure-native:apicenter:ApiSource';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpU291cmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vYXBpY2VudGVyL2FwaVNvdXJjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsc0VBQXNFO0FBQ3RFLGlGQUFpRjs7O0FBRWpGLHlDQUF5QztBQUl6QywwQ0FBMEM7QUFFMUM7Ozs7R0FJRztBQUNILE1BQWEsU0FBVSxTQUFRLE1BQU0sQ0FBQyxjQUFjO0lBQ2hEOzs7Ozs7O09BT0c7SUFDSSxNQUFNLENBQUMsR0FBRyxDQUFDLElBQVksRUFBRSxFQUEyQixFQUFFLElBQW1DO1FBQzVGLE9BQU8sSU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