4.34.0 (latest) 4.33.0 4.32.0 4.31.0 4.30.0 4.29.0 4.28.0 4.27.0 4.26.0 4.25.0 4.24.0 4.23.0 4.22.0 4.21.0 4.20.0 4.19.0 4.18.0 4.17.0 4.16.0 4.15.0 4.14.0 4.13.0 4.12.0 4.11.0 4.10.0 4.9.0 4.8.0 4.7.0 4.6.0 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0

    public sealed class WebhookResponse : IMessage<WebhookResponse>, IEquatable<WebhookResponse>, IDeepCloneable<WebhookResponse>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class WebhookResponse.

The response message for a webhook call.

This response is validated by the Dialogflow server. If validation fails,
an error will be returned in the
\[QueryResult.diagnostic_info\]\[google.cloud.dialogflow.v2.QueryResult.diagnostic_info\]
field. Setting JSON fields to an empty value with the wrong type is a common
error. To avoid this error:

- Use `""` for empty strings
- Use `{}` or `null` for empty objects
- Use `[]` or `null` for empty arrays

For more information, see the
[Protocol Buffers Language
Guide](https://developers.google.com/protocol-buffers/docs/proto3#json).

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> WebhookResponse

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[WebhookResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.WebhookResponse.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[WebhookResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.WebhookResponse.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[WebhookResponse](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.WebhookResponse.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Dialogflow.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.md.txt)

## Assembly

Google.Cloud.Dialogflow.V2.dll

## Constructors

### WebhookResponse()

    public WebhookResponse()

### WebhookResponse(WebhookResponse)

    public WebhookResponse(WebhookResponse other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `WebhookResponse` |

## Properties

### FollowupEventInput

    public EventInput FollowupEventInput { get; set; }

Optional. Invokes the supplied events.
When this field is set, Dialogflow ignores the `fulfillment_text`,
`fulfillment_messages`, and `payload` fields.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `EventInput` |   |

### FulfillmentMessages

    public RepeatedField<Intent.Types.Message> FulfillmentMessages { get; }

Optional. The rich response messages intended for the end-user.
When provided, Dialogflow uses this field to populate
\[QueryResult.fulfillment_messages\]\[google.cloud.dialogflow.v2.QueryResult.fulfillment_messages\]
sent to the integration or API caller.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldIntentTypesMessage` |   |

### FulfillmentText

    public string FulfillmentText { get; set; }

Optional. The text response message intended for the end-user.
It is recommended to use `fulfillment_messages.text.text[0]` instead.
When provided, Dialogflow uses this field to populate
\[QueryResult.fulfillment_text\]\[google.cloud.dialogflow.v2.QueryResult.fulfillment_text\]
sent to the integration or API caller.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### OutputContexts

    public RepeatedField<Context> OutputContexts { get; }

Optional. The collection of output contexts that will overwrite currently
active contexts for the session and reset their lifespans.
When provided, Dialogflow uses this field to populate
\[QueryResult.output_contexts\]\[google.cloud.dialogflow.v2.QueryResult.output_contexts\]
sent to the integration or API caller.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldContext` |   |

### Payload

    public Struct Payload { get; set; }

Optional. This field can be used to pass custom data from your webhook to
the integration or API caller. Arbitrary JSON objects are supported. When
provided, Dialogflow uses this field to populate
\[QueryResult.webhook_payload\]\[google.cloud.dialogflow.v2.QueryResult.webhook_payload\]
sent to the integration or API caller. This field is also used by the
[Google Assistant
integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
for rich response messages.
See the format definition at [Google Assistant Dialogflow webhook
format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Struct` |   |

### SessionEntityTypes

    public RepeatedField<SessionEntityType> SessionEntityTypes { get; }

Optional. Additional session entity types to replace or extend developer
entity types with. The entity synonyms apply to all languages and persist
for the session. Setting this data from a webhook overwrites
the session entity types that have been set using `detectIntent`,
`streamingDetectIntent` or
\[SessionEntityType\]\[google.cloud.dialogflow.v2.SessionEntityType\]
management methods.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldSessionEntityType` |   |

### Source

    public string Source { get; set; }

Optional. A custom field used to identify the webhook source.
Arbitrary strings are supported.
When provided, Dialogflow uses this field to populate
\[QueryResult.webhook_source\]\[google.cloud.dialogflow.v2.QueryResult.webhook_source\]
sent to the integration or API caller.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |