3.2.0 (latest) 3.1.0 3.0.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public abstract class WebhooksClient

Reference documentation and code samples for the Dialogflow v3 API class WebhooksClient.

Webhooks client wrapper, for convenient use.

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

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

## Namespace

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

## Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

## Remarks

Service for managing \[Webhooks\]\[google.cloud.dialogflow.cx.v3.Webhook\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Webhooks service, which is a host of "dialogflow.googleapis.com" and a port of
443.

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

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default Webhooks scopes.

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

**Remarks** The default Webhooks scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/dialogflow>

### GrpcClient

    public virtual Webhooks.WebhooksClient GrpcClient { get; }

The underlying gRPC Webhooks client

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

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.md.txt) associated with this client.

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

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

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

## Methods

### Create()

    public static WebhooksClient Create()

Synchronously creates a [WebhooksClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [WebhooksClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `WebhooksClient` | The created [WebhooksClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt). |

### CreateAsync(CancellationToken)

    public static Task<WebhooksClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [WebhooksClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [WebhooksClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClientBuilder.md.txt).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `CancellationToken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhooksClient` | The task representing the created [WebhooksClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt). |

### CreateWebhook(AgentName, Webhook, CallSettings)

    public virtual Webhook CreateWebhook(AgentName parent, Webhook webhook, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Webhook webhook = new Webhook();
// Make the request
Webhook response = webhooksClient.CreateWebhook(parent, webhook);
```

### CreateWebhook(CreateWebhookRequest, CallSettings)

    public virtual Webhook CreateWebhook(CreateWebhookRequest request, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
CreateWebhookRequest request = new CreateWebhookRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Webhook = new Webhook(),
};
// Make the request
Webhook response = webhooksClient.CreateWebhook(request);
```

### CreateWebhook(string, Webhook, CallSettings)

    public virtual Webhook CreateWebhook(string parent, Webhook webhook, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Webhook webhook = new Webhook();
// Make the request
Webhook response = webhooksClient.CreateWebhook(parent, webhook);
```

### CreateWebhookAsync(AgentName, Webhook, CallSettings)

    public virtual Task<Webhook> CreateWebhookAsync(AgentName parent, Webhook webhook, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Webhook webhook = new Webhook();
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(parent, webhook);
```

### CreateWebhookAsync(AgentName, Webhook, CancellationToken)

    public virtual Task<Webhook> CreateWebhookAsync(AgentName parent, Webhook webhook, CancellationToken cancellationToken)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Webhook webhook = new Webhook();
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(parent, webhook);
```

### CreateWebhookAsync(CreateWebhookRequest, CallSettings)

    public virtual Task<Webhook> CreateWebhookAsync(CreateWebhookRequest request, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
CreateWebhookRequest request = new CreateWebhookRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Webhook = new Webhook(),
};
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(request);
```

### CreateWebhookAsync(CreateWebhookRequest, CancellationToken)

    public virtual Task<Webhook> CreateWebhookAsync(CreateWebhookRequest request, CancellationToken cancellationToken)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateWebhookRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
CreateWebhookRequest request = new CreateWebhookRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Webhook = new Webhook(),
};
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(request);
```

### CreateWebhookAsync(string, Webhook, CallSettings)

    public virtual Task<Webhook> CreateWebhookAsync(string parent, Webhook webhook, CallSettings callSettings = null)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Webhook webhook = new Webhook();
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(parent, webhook);
```

### CreateWebhookAsync(string, Webhook, CancellationToken)

    public virtual Task<Webhook> CreateWebhookAsync(string parent, Webhook webhook, CancellationToken cancellationToken)

Creates a webhook in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `webhook` | `Webhook` Required. The webhook to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Webhook webhook = new Webhook();
// Make the request
Webhook response = await webhooksClient.CreateWebhookAsync(parent, webhook);
```

### DeleteWebhook(DeleteWebhookRequest, CallSettings)

    public virtual void DeleteWebhook(DeleteWebhookRequest request, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
DeleteWebhookRequest request = new DeleteWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
    Force = false,
};
// Make the request
webhooksClient.DeleteWebhook(request);
```

### DeleteWebhook(WebhookName, CallSettings)

    public virtual void DeleteWebhook(WebhookName name, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
webhooksClient.DeleteWebhook(name);
```

### DeleteWebhook(string, CallSettings)

    public virtual void DeleteWebhook(string name, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
webhooksClient.DeleteWebhook(name);
```

### DeleteWebhookAsync(DeleteWebhookRequest, CallSettings)

    public virtual Task DeleteWebhookAsync(DeleteWebhookRequest request, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
DeleteWebhookRequest request = new DeleteWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
    Force = false,
};
// Make the request
await webhooksClient.DeleteWebhookAsync(request);
```

### DeleteWebhookAsync(DeleteWebhookRequest, CancellationToken)

    public virtual Task DeleteWebhookAsync(DeleteWebhookRequest request, CancellationToken cancellationToken)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteWebhookRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
DeleteWebhookRequest request = new DeleteWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
    Force = false,
};
// Make the request
await webhooksClient.DeleteWebhookAsync(request);
```

### DeleteWebhookAsync(WebhookName, CallSettings)

    public virtual Task DeleteWebhookAsync(WebhookName name, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
await webhooksClient.DeleteWebhookAsync(name);
```

### DeleteWebhookAsync(WebhookName, CancellationToken)

    public virtual Task DeleteWebhookAsync(WebhookName name, CancellationToken cancellationToken)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
await webhooksClient.DeleteWebhookAsync(name);
```

### DeleteWebhookAsync(string, CallSettings)

    public virtual Task DeleteWebhookAsync(string name, CallSettings callSettings = null)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
await webhooksClient.DeleteWebhookAsync(name);
```

### DeleteWebhookAsync(string, CancellationToken)

    public virtual Task DeleteWebhookAsync(string name, CancellationToken cancellationToken)

Deletes the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
await webhooksClient.DeleteWebhookAsync(name);
```

### GetWebhook(GetWebhookRequest, CallSettings)

    public virtual Webhook GetWebhook(GetWebhookRequest request, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
GetWebhookRequest request = new GetWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
};
// Make the request
Webhook response = webhooksClient.GetWebhook(request);
```

### GetWebhook(WebhookName, CallSettings)

    public virtual Webhook GetWebhook(WebhookName name, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
Webhook response = webhooksClient.GetWebhook(name);
```

### GetWebhook(string, CallSettings)

    public virtual Webhook GetWebhook(string name, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
Webhook response = webhooksClient.GetWebhook(name);
```

### GetWebhookAsync(GetWebhookRequest, CallSettings)

    public virtual Task<Webhook> GetWebhookAsync(GetWebhookRequest request, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
GetWebhookRequest request = new GetWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
};
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(request);
```

### GetWebhookAsync(GetWebhookRequest, CancellationToken)

    public virtual Task<Webhook> GetWebhookAsync(GetWebhookRequest request, CancellationToken cancellationToken)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetWebhookRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
GetWebhookRequest request = new GetWebhookRequest
{
    WebhookName = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]"),
};
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(request);
```

### GetWebhookAsync(WebhookName, CallSettings)

    public virtual Task<Webhook> GetWebhookAsync(WebhookName name, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(name);
```

### GetWebhookAsync(WebhookName, CancellationToken)

    public virtual Task<Webhook> GetWebhookAsync(WebhookName name, CancellationToken cancellationToken)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `WebhookName` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
WebhookName name = WebhookName.FromProjectLocationAgentWebhook("[PROJECT]", "[LOCATION]", "[AGENT]", "[WEBHOOK]");
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(name);
```

### GetWebhookAsync(string, CallSettings)

    public virtual Task<Webhook> GetWebhookAsync(string name, CallSettings callSettings = null)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(name);
```

### GetWebhookAsync(string, CancellationToken)

    public virtual Task<Webhook> GetWebhookAsync(string name, CancellationToken cancellationToken)

Retrieves the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/webhooks/[WEBHOOK]";
// Make the request
Webhook response = await webhooksClient.GetWebhookAsync(name);
```

### ListWebhooks(AgentName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListWebhooksResponse, Webhook> ListWebhooks(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to list all webhooks for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListWebhooksResponseWebhook` | A pageable sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooks(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ListWebhooks(ListWebhooksRequest, CallSettings)

    public virtual PagedEnumerable<ListWebhooksResponse, Webhook> ListWebhooks(ListWebhooksRequest request, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListWebhooksRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListWebhooksResponseWebhook` | A pageable sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
ListWebhooksRequest request = new ListWebhooksRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
PagedEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooks(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ListWebhooks(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListWebhooksResponse, Webhook> ListWebhooks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to list all webhooks for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListWebhooksResponseWebhook` | A pageable sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooks(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ListWebhooksAsync(AgentName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListWebhooksResponse, Webhook> ListWebhooksAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `AgentName` Required. The agent to list all webhooks for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListWebhooksResponseWebhook` | A pageable asynchronous sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedAsyncEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooksAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ListWebhooksAsync(ListWebhooksRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListWebhooksResponse, Webhook> ListWebhooksAsync(ListWebhooksRequest request, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListWebhooksRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListWebhooksResponseWebhook` | A pageable asynchronous sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
ListWebhooksRequest request = new ListWebhooksRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
PagedAsyncEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooksAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ListWebhooksAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListWebhooksResponse, Webhook> ListWebhooksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all webhooks in the specified agent.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The agent to list all webhooks for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListWebhooksResponseWebhook` | A pageable asynchronous sequence of [Webhook](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Webhook.md.txt) resources. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedAsyncEnumerable<ListWebhooksResponse, Webhook> response = webhooksClient.ListWebhooksAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Webhook item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListWebhooksResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Webhook item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Webhook> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Webhook item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
```

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_WebhooksClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_WebhooksClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_WebhooksClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.WebhooksClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_WebhooksClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateWebhook(UpdateWebhookRequest, CallSettings)

    public virtual Webhook UpdateWebhook(UpdateWebhookRequest request, CallSettings callSettings = null)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
UpdateWebhookRequest request = new UpdateWebhookRequest
{
    Webhook = new Webhook(),
    UpdateMask = new FieldMask(),
};
// Make the request
Webhook response = webhooksClient.UpdateWebhook(request);
```

### UpdateWebhook(Webhook, FieldMask, CallSettings)

    public virtual Webhook UpdateWebhook(Webhook webhook, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `webhook` | `Webhook` Required. The webhook to update. |
| `updateMask` | `FieldMask` The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Webhook` | The RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = WebhooksClient.Create();
// Initialize request argument(s)
Webhook webhook = new Webhook();
FieldMask updateMask = new FieldMask();
// Make the request
Webhook response = webhooksClient.UpdateWebhook(webhook, updateMask);
```

### UpdateWebhookAsync(UpdateWebhookRequest, CallSettings)

    public virtual Task<Webhook> UpdateWebhookAsync(UpdateWebhookRequest request, CallSettings callSettings = null)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateWebhookRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
UpdateWebhookRequest request = new UpdateWebhookRequest
{
    Webhook = new Webhook(),
    UpdateMask = new FieldMask(),
};
// Make the request
Webhook response = await webhooksClient.UpdateWebhookAsync(request);
```

### UpdateWebhookAsync(UpdateWebhookRequest, CancellationToken)

    public virtual Task<Webhook> UpdateWebhookAsync(UpdateWebhookRequest request, CancellationToken cancellationToken)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateWebhookRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
UpdateWebhookRequest request = new UpdateWebhookRequest
{
    Webhook = new Webhook(),
    UpdateMask = new FieldMask(),
};
// Make the request
Webhook response = await webhooksClient.UpdateWebhookAsync(request);
```

### UpdateWebhookAsync(Webhook, FieldMask, CallSettings)

    public virtual Task<Webhook> UpdateWebhookAsync(Webhook webhook, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `webhook` | `Webhook` Required. The webhook to update. |
| `updateMask` | `FieldMask` The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
Webhook webhook = new Webhook();
FieldMask updateMask = new FieldMask();
// Make the request
Webhook response = await webhooksClient.UpdateWebhookAsync(webhook, updateMask);
```

### UpdateWebhookAsync(Webhook, FieldMask, CancellationToken)

    public virtual Task<Webhook> UpdateWebhookAsync(Webhook webhook, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified webhook.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `webhook` | `Webhook` Required. The webhook to update. |
| `updateMask` | `FieldMask` The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskWebhook` | A Task containing the RPC response. |

**Example**

```cs
// Create client
WebhooksClient webhooksClient = await WebhooksClient.CreateAsync();
// Initialize request argument(s)
Webhook webhook = new Webhook();
FieldMask updateMask = new FieldMask();
// Make the request
Webhook response = await webhooksClient.UpdateWebhookAsync(webhook, updateMask);
```