"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.Webhook = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Resource Type definition for AWS::CodePipeline::Webhook
 */
class Webhook extends pulumi.CustomResource {
    /**
     * Get an existing Webhook 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 Webhook(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Webhook.  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'] === Webhook.__pulumiType;
    }
    /**
     * Create a Webhook 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?.authentication === undefined && !opts.urn) {
                throw new Error("Missing required property 'authentication'");
            }
            if (args?.authenticationConfiguration === undefined && !opts.urn) {
                throw new Error("Missing required property 'authenticationConfiguration'");
            }
            if (args?.filters === undefined && !opts.urn) {
                throw new Error("Missing required property 'filters'");
            }
            if (args?.targetAction === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetAction'");
            }
            if (args?.targetPipeline === undefined && !opts.urn) {
                throw new Error("Missing required property 'targetPipeline'");
            }
            resourceInputs["authentication"] = args?.authentication;
            resourceInputs["authenticationConfiguration"] = args?.authenticationConfiguration;
            resourceInputs["filters"] = args?.filters;
            resourceInputs["name"] = args?.name;
            resourceInputs["registerWithThirdParty"] = args?.registerWithThirdParty;
            resourceInputs["targetAction"] = args?.targetAction;
            resourceInputs["targetPipeline"] = args?.targetPipeline;
            resourceInputs["targetPipelineVersion"] = args?.targetPipelineVersion;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["url"] = undefined /*out*/;
        }
        else {
            resourceInputs["authentication"] = undefined /*out*/;
            resourceInputs["authenticationConfiguration"] = undefined /*out*/;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["filters"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["registerWithThirdParty"] = undefined /*out*/;
            resourceInputs["targetAction"] = undefined /*out*/;
            resourceInputs["targetPipeline"] = undefined /*out*/;
            resourceInputs["targetPipelineVersion"] = undefined /*out*/;
            resourceInputs["url"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["name"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Webhook.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Webhook = Webhook;
/** @internal */
Webhook.__pulumiType = 'aws-native:codepipeline:Webhook';
//# sourceMappingURL=webhook.js.map