"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.ActionHttp = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an HTTP Action within a Logic App Workflow
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "workflow-resources",
 *     location: "West Europe",
 * });
 * const exampleWorkflow = new azure.logicapps.Workflow("example", {
 *     name: "workflow1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleActionHttp = new azure.logicapps.ActionHttp("example", {
 *     name: "webhook",
 *     logicAppId: exampleWorkflow.id,
 *     method: "GET",
 *     uri: "http://example.com/some-webhook",
 * });
 * ```
 *
 * ## Import
 *
 * Logic App HTTP Actions can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:logicapps/actionHttp:ActionHttp webhook1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Logic/workflows/workflow1/actions/webhook1
 * ```
 *
 * > **NOTE:** This ID is unique to this provider and doesn't directly match to any other resource. To compose this ID, you can take the ID Logic App Workflow and append `/actions/{name of the action}`.
 */
class ActionHttp extends pulumi.CustomResource {
    /**
     * Get an existing ActionHttp 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 ActionHttp(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:logicapps/actionHttp:ActionHttp';
    /**
     * Returns true if the given object is an instance of ActionHttp.  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'] === ActionHttp.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["body"] = state?.body;
            resourceInputs["headers"] = state?.headers;
            resourceInputs["logicAppId"] = state?.logicAppId;
            resourceInputs["method"] = state?.method;
            resourceInputs["name"] = state?.name;
            resourceInputs["queries"] = state?.queries;
            resourceInputs["runAfters"] = state?.runAfters;
            resourceInputs["uri"] = state?.uri;
        }
        else {
            const args = argsOrState;
            if (args?.logicAppId === undefined && !opts.urn) {
                throw new Error("Missing required property 'logicAppId'");
            }
            if (args?.method === undefined && !opts.urn) {
                throw new Error("Missing required property 'method'");
            }
            if (args?.uri === undefined && !opts.urn) {
                throw new Error("Missing required property 'uri'");
            }
            resourceInputs["body"] = args?.body;
            resourceInputs["headers"] = args?.headers;
            resourceInputs["logicAppId"] = args?.logicAppId;
            resourceInputs["method"] = args?.method;
            resourceInputs["name"] = args?.name;
            resourceInputs["queries"] = args?.queries;
            resourceInputs["runAfters"] = args?.runAfters;
            resourceInputs["uri"] = args?.uri;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ActionHttp.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ActionHttp = ActionHttp;
//# sourceMappingURL=actionHttp.js.map