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 ExperimentsClient

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

Experiments client wrapper, for convenient use.

## Inheritance

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

## 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

[ExperimentsClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClientImpl.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 \[Experiments\]\[google.cloud.dialogflow.cx.v3.Experiment\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Experiments 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 Experiments scopes.

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

**Remarks** The default Experiments scopes are:

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

### GrpcClient

    public virtual Experiments.ExperimentsClient GrpcClient { get; }

The underlying gRPC Experiments client

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

### 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 ExperimentsClient Create()

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

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

### CreateAsync(CancellationToken)

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

Asynchronously creates a [ExperimentsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ExperimentsClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClientBuilder.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** |
| `TaskExperimentsClient` | The task representing the created [ExperimentsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClient.md.txt). |

### CreateExperiment(CreateExperimentRequest, CallSettings)

    public virtual Experiment CreateExperiment(CreateExperimentRequest request, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateExperimentRequest` 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** |
| `Experiment` | The RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
CreateExperimentRequest request = new CreateExperimentRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    Experiment = new Experiment(),
};
// Make the request
Experiment response = experimentsClient.CreateExperiment(request);
```

### CreateExperiment(EnvironmentName, Experiment, CallSettings)

    public virtual Experiment CreateExperiment(EnvironmentName parent, Experiment experiment, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `EnvironmentName` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
Experiment experiment = new Experiment();
// Make the request
Experiment response = experimentsClient.CreateExperiment(parent, experiment);
```

### CreateExperiment(string, Experiment, CallSettings)

    public virtual Experiment CreateExperiment(string parent, Experiment experiment, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
Experiment experiment = new Experiment();
// Make the request
Experiment response = experimentsClient.CreateExperiment(parent, experiment);
```

### CreateExperimentAsync(CreateExperimentRequest, CallSettings)

    public virtual Task<Experiment> CreateExperimentAsync(CreateExperimentRequest request, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
CreateExperimentRequest request = new CreateExperimentRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    Experiment = new Experiment(),
};
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(request);
```

### CreateExperimentAsync(CreateExperimentRequest, CancellationToken)

    public virtual Task<Experiment> CreateExperimentAsync(CreateExperimentRequest request, CancellationToken cancellationToken)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
CreateExperimentRequest request = new CreateExperimentRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
    Experiment = new Experiment(),
};
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(request);
```

### CreateExperimentAsync(EnvironmentName, Experiment, CallSettings)

    public virtual Task<Experiment> CreateExperimentAsync(EnvironmentName parent, Experiment experiment, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `EnvironmentName` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
Experiment experiment = new Experiment();
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);
```

### CreateExperimentAsync(EnvironmentName, Experiment, CancellationToken)

    public virtual Task<Experiment> CreateExperimentAsync(EnvironmentName parent, Experiment experiment, CancellationToken cancellationToken)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `EnvironmentName` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
Experiment experiment = new Experiment();
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);
```

### CreateExperimentAsync(string, Experiment, CallSettings)

    public virtual Task<Experiment> CreateExperimentAsync(string parent, Experiment experiment, CallSettings callSettings = null)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
Experiment experiment = new Experiment();
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);
```

### CreateExperimentAsync(string, Experiment, CancellationToken)

    public virtual Task<Experiment> CreateExperimentAsync(string parent, Experiment experiment, CancellationToken cancellationToken)

Creates an \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\] in the
specified \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The \[Agent\]\[google.cloud.dialogflow.cx.v3.Agent\] to create an \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `experiment` | `Experiment` Required. The experiment to create. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
Experiment experiment = new Experiment();
// Make the request
Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);
```

### DeleteExperiment(DeleteExperimentRequest, CallSettings)

    public virtual void DeleteExperiment(DeleteExperimentRequest request, CallSettings callSettings = null)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteExperimentRequest` 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
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
DeleteExperimentRequest request = new DeleteExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
experimentsClient.DeleteExperiment(request);
```

### DeleteExperiment(ExperimentName, CallSettings)

    public virtual void DeleteExperiment(ExperimentName name, CallSettings callSettings = null)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
experimentsClient.DeleteExperiment(name);
```

### DeleteExperiment(string, CallSettings)

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

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
experimentsClient.DeleteExperiment(name);
```

### DeleteExperimentAsync(DeleteExperimentRequest, CallSettings)

    public virtual Task DeleteExperimentAsync(DeleteExperimentRequest request, CallSettings callSettings = null)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteExperimentRequest` 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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
DeleteExperimentRequest request = new DeleteExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
await experimentsClient.DeleteExperimentAsync(request);
```

### DeleteExperimentAsync(DeleteExperimentRequest, CancellationToken)

    public virtual Task DeleteExperimentAsync(DeleteExperimentRequest request, CancellationToken cancellationToken)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteExperimentRequest` 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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
DeleteExperimentRequest request = new DeleteExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
await experimentsClient.DeleteExperimentAsync(request);
```

### DeleteExperimentAsync(ExperimentName, CallSettings)

    public virtual Task DeleteExperimentAsync(ExperimentName name, CallSettings callSettings = null)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
await experimentsClient.DeleteExperimentAsync(name);
```

### DeleteExperimentAsync(ExperimentName, CancellationToken)

    public virtual Task DeleteExperimentAsync(ExperimentName name, CancellationToken cancellationToken)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
await experimentsClient.DeleteExperimentAsync(name);
```

### DeleteExperimentAsync(string, CallSettings)

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

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
await experimentsClient.DeleteExperimentAsync(name);
```

### DeleteExperimentAsync(string, CancellationToken)

    public virtual Task DeleteExperimentAsync(string name, CancellationToken cancellationToken)

Deletes the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `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
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
await experimentsClient.DeleteExperimentAsync(name);
```

### GetExperiment(ExperimentName, CallSettings)

    public virtual Experiment GetExperiment(ExperimentName name, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = experimentsClient.GetExperiment(name);
```

### GetExperiment(GetExperimentRequest, CallSettings)

    public virtual Experiment GetExperiment(GetExperimentRequest request, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetExperimentRequest` 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** |
| `Experiment` | The RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
GetExperimentRequest request = new GetExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = experimentsClient.GetExperiment(request);
```

### GetExperiment(string, CallSettings)

    public virtual Experiment GetExperiment(string name, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = experimentsClient.GetExperiment(name);
```

### GetExperimentAsync(ExperimentName, CallSettings)

    public virtual Task<Experiment> GetExperimentAsync(ExperimentName name, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(name);
```

### GetExperimentAsync(ExperimentName, CancellationToken)

    public virtual Task<Experiment> GetExperimentAsync(ExperimentName name, CancellationToken cancellationToken)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(name);
```

### GetExperimentAsync(GetExperimentRequest, CallSettings)

    public virtual Task<Experiment> GetExperimentAsync(GetExperimentRequest request, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
GetExperimentRequest request = new GetExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(request);
```

### GetExperimentAsync(GetExperimentRequest, CancellationToken)

    public virtual Task<Experiment> GetExperimentAsync(GetExperimentRequest request, CancellationToken cancellationToken)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
GetExperimentRequest request = new GetExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(request);
```

### GetExperimentAsync(string, CallSettings)

    public virtual Task<Experiment> GetExperimentAsync(string name, CallSettings callSettings = null)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(name);
```

### GetExperimentAsync(string, CancellationToken)

    public virtual Task<Experiment> GetExperimentAsync(string name, CancellationToken cancellationToken)

Retrieves the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The name of the \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\]. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.GetExperimentAsync(name);
```

### ListExperiments(EnvironmentName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListExperimentsResponse, Experiment> ListExperiments(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `EnvironmentName` Required. The \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to list all environments for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `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** |
| `PagedEnumerableListExperimentsResponseExperiment` | A pageable sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperiments(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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;
```

### ListExperiments(ListExperimentsRequest, CallSettings)

    public virtual PagedEnumerable<ListExperimentsResponse, Experiment> ListExperiments(ListExperimentsRequest request, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListExperimentsRequest` 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** |
| `PagedEnumerableListExperimentsResponseExperiment` | A pageable sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
ListExperimentsRequest request = new ListExperimentsRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperiments(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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;
```

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

    public virtual PagedEnumerable<ListExperimentsResponse, Experiment> ListExperiments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to list all environments for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `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** |
| `PagedEnumerableListExperimentsResponseExperiment` | A pageable sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperiments(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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;
```

### ListExperimentsAsync(EnvironmentName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListExperimentsResponse, Experiment> ListExperimentsAsync(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `EnvironmentName` Required. The \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to list all environments for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `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** |
| `PagedAsyncEnumerableListExperimentsResponseExperiment` | A pageable asynchronous sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedAsyncEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperimentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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;
```

### ListExperimentsAsync(ListExperimentsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListExperimentsResponse, Experiment> ListExperimentsAsync(ListExperimentsRequest request, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListExperimentsRequest` 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** |
| `PagedAsyncEnumerableListExperimentsResponseExperiment` | A pageable asynchronous sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ListExperimentsRequest request = new ListExperimentsRequest
{
    ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedAsyncEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperimentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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;
```

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

    public virtual PagedAsyncEnumerable<ListExperimentsResponse, Experiment> ListExperimentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all experiments in the specified
\[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The \[Environment\]\[google.cloud.dialogflow.cx.v3.Environment\] to list all environments for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`. |
| `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** |
| `PagedAsyncEnumerableListExperimentsResponseExperiment` | A pageable asynchronous sequence of [Experiment](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.Experiment.md.txt) resources. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedAsyncEnumerable<ListExperimentsResponse, Experiment> response = experimentsClient.ListExperimentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Experiment 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 (ListExperimentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Experiment 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<Experiment> 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 (Experiment 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.ExperimentsClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_ExperimentsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_ExperimentsClient_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.ExperimentsClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_ExperimentsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.Cx.V3/latest/Google.Cloud.Dialogflow.Cx.V3.ExperimentsClient.md.txt#Google_Cloud_Dialogflow_Cx_V3_ExperimentsClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### StartExperiment(ExperimentName, CallSettings)

    public virtual Experiment StartExperiment(ExperimentName name, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to start. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = experimentsClient.StartExperiment(name);
```

### StartExperiment(StartExperimentRequest, CallSettings)

    public virtual Experiment StartExperiment(StartExperimentRequest request, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StartExperimentRequest` 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** |
| `Experiment` | The RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
StartExperimentRequest request = new StartExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = experimentsClient.StartExperiment(request);
```

### StartExperiment(string, CallSettings)

    public virtual Experiment StartExperiment(string name, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Resource name of the experiment to start. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = experimentsClient.StartExperiment(name);
```

### StartExperimentAsync(ExperimentName, CallSettings)

    public virtual Task<Experiment> StartExperimentAsync(ExperimentName name, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to start. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(name);
```

### StartExperimentAsync(ExperimentName, CancellationToken)

    public virtual Task<Experiment> StartExperimentAsync(ExperimentName name, CancellationToken cancellationToken)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to start. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(name);
```

### StartExperimentAsync(StartExperimentRequest, CallSettings)

    public virtual Task<Experiment> StartExperimentAsync(StartExperimentRequest request, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StartExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
StartExperimentRequest request = new StartExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(request);
```

### StartExperimentAsync(StartExperimentRequest, CancellationToken)

    public virtual Task<Experiment> StartExperimentAsync(StartExperimentRequest request, CancellationToken cancellationToken)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StartExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
StartExperimentRequest request = new StartExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(request);
```

### StartExperimentAsync(string, CallSettings)

    public virtual Task<Experiment> StartExperimentAsync(string name, CallSettings callSettings = null)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Resource name of the experiment to start. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(name);
```

### StartExperimentAsync(string, CancellationToken)

    public virtual Task<Experiment> StartExperimentAsync(string name, CancellationToken cancellationToken)

Starts the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\]. This rpc only
changes the state of experiment from PENDING to RUNNING.

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

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.StartExperimentAsync(name);
```

### StopExperiment(ExperimentName, CallSettings)

    public virtual Experiment StopExperiment(ExperimentName name, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to stop. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = experimentsClient.StopExperiment(name);
```

### StopExperiment(StopExperimentRequest, CallSettings)

    public virtual Experiment StopExperiment(StopExperimentRequest request, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StopExperimentRequest` 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** |
| `Experiment` | The RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
StopExperimentRequest request = new StopExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = experimentsClient.StopExperiment(request);
```

### StopExperiment(string, CallSettings)

    public virtual Experiment StopExperiment(string name, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Resource name of the experiment to stop. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = experimentsClient.StopExperiment(name);
```

### StopExperimentAsync(ExperimentName, CallSettings)

    public virtual Task<Experiment> StopExperimentAsync(ExperimentName name, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to stop. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(name);
```

### StopExperimentAsync(ExperimentName, CancellationToken)

    public virtual Task<Experiment> StopExperimentAsync(ExperimentName name, CancellationToken cancellationToken)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ExperimentName` Required. Resource name of the experiment to stop. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
ExperimentName name = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]");
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(name);
```

### StopExperimentAsync(StopExperimentRequest, CallSettings)

    public virtual Task<Experiment> StopExperimentAsync(StopExperimentRequest request, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StopExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
StopExperimentRequest request = new StopExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(request);
```

### StopExperimentAsync(StopExperimentRequest, CancellationToken)

    public virtual Task<Experiment> StopExperimentAsync(StopExperimentRequest request, CancellationToken cancellationToken)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `StopExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
StopExperimentRequest request = new StopExperimentRequest
{
    ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"),
};
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(request);
```

### StopExperimentAsync(string, CallSettings)

    public virtual Task<Experiment> StopExperimentAsync(string name, CallSettings callSettings = null)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Resource name of the experiment to stop. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/experiments/<ExperimentID>`. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(name);
```

### StopExperimentAsync(string, CancellationToken)

    public virtual Task<Experiment> StopExperimentAsync(string name, CancellationToken cancellationToken)

Stops the specified \[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].
This rpc only changes the state of experiment from RUNNING to DONE.

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

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/experiments/[EXPERIMENT]";
// Make the request
Experiment response = await experimentsClient.StopExperimentAsync(name);
```

### UpdateExperiment(Experiment, FieldMask, CallSettings)

    public virtual Experiment UpdateExperiment(Experiment experiment, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `experiment` | `Experiment` Required. The experiment to update. |
| `updateMask` | `FieldMask` Required. The mask to control which fields get updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
Experiment experiment = new Experiment();
FieldMask updateMask = new FieldMask();
// Make the request
Experiment response = experimentsClient.UpdateExperiment(experiment, updateMask);
```

### UpdateExperiment(UpdateExperimentRequest, CallSettings)

    public virtual Experiment UpdateExperiment(UpdateExperimentRequest request, CallSettings callSettings = null)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateExperimentRequest` 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** |
| `Experiment` | The RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = ExperimentsClient.Create();
// Initialize request argument(s)
UpdateExperimentRequest request = new UpdateExperimentRequest
{
    Experiment = new Experiment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Experiment response = experimentsClient.UpdateExperiment(request);
```

### UpdateExperimentAsync(Experiment, FieldMask, CallSettings)

    public virtual Task<Experiment> UpdateExperimentAsync(Experiment experiment, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `experiment` | `Experiment` Required. The experiment to update. |
| `updateMask` | `FieldMask` Required. The mask to control which fields get updated. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
Experiment experiment = new Experiment();
FieldMask updateMask = new FieldMask();
// Make the request
Experiment response = await experimentsClient.UpdateExperimentAsync(experiment, updateMask);
```

### UpdateExperimentAsync(Experiment, FieldMask, CancellationToken)

    public virtual Task<Experiment> UpdateExperimentAsync(Experiment experiment, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `experiment` | `Experiment` Required. The experiment to update. |
| `updateMask` | `FieldMask` Required. The mask to control which fields get updated. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
Experiment experiment = new Experiment();
FieldMask updateMask = new FieldMask();
// Make the request
Experiment response = await experimentsClient.UpdateExperimentAsync(experiment, updateMask);
```

### UpdateExperimentAsync(UpdateExperimentRequest, CallSettings)

    public virtual Task<Experiment> UpdateExperimentAsync(UpdateExperimentRequest request, CallSettings callSettings = null)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
UpdateExperimentRequest request = new UpdateExperimentRequest
{
    Experiment = new Experiment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Experiment response = await experimentsClient.UpdateExperimentAsync(request);
```

### UpdateExperimentAsync(UpdateExperimentRequest, CancellationToken)

    public virtual Task<Experiment> UpdateExperimentAsync(UpdateExperimentRequest request, CancellationToken cancellationToken)

Updates the specified
\[Experiment\]\[google.cloud.dialogflow.cx.v3.Experiment\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `UpdateExperimentRequest` 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** |
| `TaskExperiment` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();
// Initialize request argument(s)
UpdateExperimentRequest request = new UpdateExperimentRequest
{
    Experiment = new Experiment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Experiment response = await experimentsClient.UpdateExperimentAsync(request);
```