import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
 *
 * To get more information about Webhook, see:
 *
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.webhooks)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 *
 * ## Example Usage
 *
 * ### Dialogflowcx Webhook Standard
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const standardWebhook = new gcp.diagflow.CxWebhook("standard_webhook", {
 *     parent: agent.id,
 *     displayName: "MyFlow",
 *     genericWebService: {
 *         allowedCaCerts: ["BQA="],
 *         uri: "https://example.com",
 *         requestHeaders: {
 *             "example-key": "example-value",
 *         },
 *         webhookType: "STANDARD",
 *         oauthConfig: {
 *             clientId: "example-client-id",
 *             secretVersionForClientSecret: "projects/example-proj/secrets/example-secret/versions/example-version",
 *             tokenEndpoint: "https://example.com",
 *             scopes: ["example-scope"],
 *         },
 *         serviceAgentAuth: "NONE",
 *         secretVersionForUsernamePassword: "projects/example-proj/secrets/example-secret/versions/example-version",
 *         secretVersionsForRequestHeaders: [
 *             {
 *                 key: "example-key-1",
 *                 secretVersion: "projects/example-proj/secrets/example-secret/versions/example-version",
 *             },
 *             {
 *                 key: "example-key-2",
 *                 secretVersion: "projects/example-proj/secrets/example-secret/versions/example-version-2",
 *             },
 *         ],
 *     },
 * });
 * ```
 * ### Dialogflowcx Webhook Flexible
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const flexibleWebhook = new gcp.diagflow.CxWebhook("flexible_webhook", {
 *     parent: agent.id,
 *     displayName: "MyFlow",
 *     genericWebService: {
 *         uri: "https://example.com",
 *         requestHeaders: {
 *             "example-key": "example-value",
 *         },
 *         webhookType: "FLEXIBLE",
 *         oauthConfig: {
 *             clientId: "example-client-id",
 *             clientSecret: "projects/example-proj/secrets/example-secret/versions/example-version",
 *             tokenEndpoint: "https://example.com",
 *         },
 *         serviceAgentAuth: "NONE",
 *         httpMethod: "POST",
 *         requestBody: "{\"example-key\": \"example-value\"}",
 *         parameterMapping: {
 *             "example-parameter": "examplePath",
 *         },
 *     },
 * });
 * ```
 * ### Dialogflowcx Webhook Service Directory Standard
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "us-central1",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const standardWebhook = new gcp.diagflow.CxWebhook("standard_webhook", {
 *     parent: agent.id,
 *     displayName: "MyFlow",
 *     serviceDirectory: {
 *         service: "projects/example-proj/locations/us-central1/namespaces/example-namespace/services/example-service",
 *         genericWebService: {
 *             allowedCaCerts: ["BQA="],
 *             uri: "https://example.com",
 *             requestHeaders: {
 *                 "example-key": "example-value",
 *             },
 *             webhookType: "STANDARD",
 *             oauthConfig: {
 *                 clientId: "example-client-id",
 *                 secretVersionForClientSecret: "projects/example-proj/secrets/example-secret/versions/example-version",
 *                 tokenEndpoint: "https://example.com",
 *                 scopes: ["example-scope"],
 *             },
 *             serviceAgentAuth: "NONE",
 *             secretVersionForUsernamePassword: "projects/example-proj/secrets/example-secret/versions/example-version",
 *             secretVersionsForRequestHeaders: [
 *                 {
 *                     key: "example-key-1",
 *                     secretVersion: "projects/example-proj/secrets/example-secret/versions/example-version",
 *                 },
 *                 {
 *                     key: "example-key-2",
 *                     secretVersion: "projects/example-proj/secrets/example-secret/versions/example-version-2",
 *                 },
 *             ],
 *         },
 *     },
 * });
 * ```
 * ### Dialogflowcx Webhook Service Directory Flexible
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "us-central1",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const flexibleWebhook = new gcp.diagflow.CxWebhook("flexible_webhook", {
 *     parent: agent.id,
 *     displayName: "MyFlow",
 *     serviceDirectory: {
 *         service: "projects/example-proj/locations/us-central1/namespaces/example-namespace/services/example-service",
 *         genericWebService: {
 *             uri: "https://example.com",
 *             requestHeaders: {
 *                 "example-key": "example-value",
 *             },
 *             webhookType: "FLEXIBLE",
 *             oauthConfig: {
 *                 clientId: "example-client-id",
 *                 clientSecret: "projects/example-proj/secrets/example-secret/versions/example-version",
 *                 tokenEndpoint: "https://example.com",
 *             },
 *             serviceAgentAuth: "NONE",
 *             httpMethod: "POST",
 *             requestBody: "{\"example-key\": \"example-value\"}",
 *             parameterMapping: {
 *                 "example-parameter": "examplePath",
 *             },
 *         },
 *     },
 * });
 * ```
 * ### Dialogflowcx Webhook With Service Account Auth
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const webhookUseServiceAccount = new gcp.diagflow.CxWebhook("webhook_use_service_account", {
 *     parent: agent.id,
 *     displayName: "MyWebhook",
 *     genericWebService: {
 *         uri: "https://example.googleapis.com",
 *         webhookType: "STANDARD",
 *         serviceAccountAuthConfig: {
 *             serviceAccount: "my@service-account.com",
 *         },
 *     },
 * });
 * ```
 * ### Dialogflowcx Webhook Service Directory With Service Account Auth
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "us-central1",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "it",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const webhookUseServiceAccount = new gcp.diagflow.CxWebhook("webhook_use_service_account", {
 *     parent: agent.id,
 *     displayName: "MyWebhook",
 *     serviceDirectory: {
 *         service: "projects/example-proj/locations/us-central1/namespaces/example-namespace/services/example-service",
 *         genericWebService: {
 *             uri: "https://example.googleapis.com",
 *             webhookType: "STANDARD",
 *             serviceAccountAuthConfig: {
 *                 serviceAccount: "my@service-account.com",
 *             },
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Webhook can be imported using any of these accepted formats:
 *
 * * `{{parent}}/webhooks/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, Webhook can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/webhooks/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/{{name}}
 * ```
 */
export declare class CxWebhook extends pulumi.CustomResource {
    /**
     * Get an existing CxWebhook 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: string, id: pulumi.Input<pulumi.ID>, state?: CxWebhookState, opts?: pulumi.CustomResourceOptions): CxWebhook;
    /**
     * Returns true if the given object is an instance of CxWebhook.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is CxWebhook;
    /**
     * Indicates whether the webhook is disabled.
     */
    readonly disabled: pulumi.Output<boolean | undefined>;
    /**
     * The human-readable name of the webhook, unique within the agent.
     */
    readonly displayName: pulumi.Output<string>;
    /**
     * Deprecated. Indicates if automatic spell correction is enabled in detect intent requests.
     */
    readonly enableSpellCorrection: pulumi.Output<boolean | undefined>;
    /**
     * Deprecated. Determines whether this agent should log conversation queries.
     */
    readonly enableStackdriverLogging: pulumi.Output<boolean | undefined>;
    /**
     * Represents configuration for a generic web service.
     * Structure is documented below.
     */
    readonly genericWebService: pulumi.Output<outputs.diagflow.CxWebhookGenericWebService | undefined>;
    /**
     * The unique identifier of the webhook.
     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.
     */
    readonly name: pulumi.Output<string>;
    /**
     * The agent to create a webhook for.
     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
     */
    readonly parent: pulumi.Output<string | undefined>;
    /**
     * Deprecated. Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.
     */
    readonly securitySettings: pulumi.Output<string | undefined>;
    /**
     * Configuration for a Service Directory service.
     * Structure is documented below.
     */
    readonly serviceDirectory: pulumi.Output<outputs.diagflow.CxWebhookServiceDirectory | undefined>;
    /**
     * Deprecated. Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.
     */
    readonly startFlow: pulumi.Output<string>;
    /**
     * Webhook execution timeout.
     */
    readonly timeout: pulumi.Output<string | undefined>;
    /**
     * Create a CxWebhook 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: string, args: CxWebhookArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering CxWebhook resources.
 */
export interface CxWebhookState {
    /**
     * Indicates whether the webhook is disabled.
     */
    disabled?: pulumi.Input<boolean>;
    /**
     * The human-readable name of the webhook, unique within the agent.
     */
    displayName?: pulumi.Input<string>;
    /**
     * Deprecated. Indicates if automatic spell correction is enabled in detect intent requests.
     */
    enableSpellCorrection?: pulumi.Input<boolean>;
    /**
     * Deprecated. Determines whether this agent should log conversation queries.
     */
    enableStackdriverLogging?: pulumi.Input<boolean>;
    /**
     * Represents configuration for a generic web service.
     * Structure is documented below.
     */
    genericWebService?: pulumi.Input<inputs.diagflow.CxWebhookGenericWebService>;
    /**
     * The unique identifier of the webhook.
     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.
     */
    name?: pulumi.Input<string>;
    /**
     * The agent to create a webhook for.
     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
     */
    parent?: pulumi.Input<string>;
    /**
     * Deprecated. Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.
     */
    securitySettings?: pulumi.Input<string>;
    /**
     * Configuration for a Service Directory service.
     * Structure is documented below.
     */
    serviceDirectory?: pulumi.Input<inputs.diagflow.CxWebhookServiceDirectory>;
    /**
     * Deprecated. Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.
     */
    startFlow?: pulumi.Input<string>;
    /**
     * Webhook execution timeout.
     */
    timeout?: pulumi.Input<string>;
}
/**
 * The set of arguments for constructing a CxWebhook resource.
 */
export interface CxWebhookArgs {
    /**
     * Indicates whether the webhook is disabled.
     */
    disabled?: pulumi.Input<boolean>;
    /**
     * The human-readable name of the webhook, unique within the agent.
     */
    displayName: pulumi.Input<string>;
    /**
     * Deprecated. Indicates if automatic spell correction is enabled in detect intent requests.
     */
    enableSpellCorrection?: pulumi.Input<boolean>;
    /**
     * Deprecated. Determines whether this agent should log conversation queries.
     */
    enableStackdriverLogging?: pulumi.Input<boolean>;
    /**
     * Represents configuration for a generic web service.
     * Structure is documented below.
     */
    genericWebService?: pulumi.Input<inputs.diagflow.CxWebhookGenericWebService>;
    /**
     * The agent to create a webhook for.
     * Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.
     */
    parent?: pulumi.Input<string>;
    /**
     * Deprecated. Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.
     */
    securitySettings?: pulumi.Input<string>;
    /**
     * Configuration for a Service Directory service.
     * Structure is documented below.
     */
    serviceDirectory?: pulumi.Input<inputs.diagflow.CxWebhookServiceDirectory>;
    /**
     * Webhook execution timeout.
     */
    timeout?: pulumi.Input<string>;
}
