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

    public abstract class AnswerRecordsClient

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

AnswerRecords client wrapper, for convenient use.

## Inheritance

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

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

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

## Namespace

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

## Assembly

Google.Cloud.Dialogflow.V2.dll

## Remarks

Service for managing
\[AnswerRecords\]\[google.cloud.dialogflow.v2.AnswerRecord\].

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

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

**Remarks** The default AnswerRecords scopes are:

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

### GrpcClient

    public virtual AnswerRecords.AnswerRecordsClient GrpcClient { get; }

The underlying gRPC AnswerRecords client

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

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

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

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

### CreateAsync(CancellationToken)

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

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

### ListAnswerRecords(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecords(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecords(parent);

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

### ListAnswerRecords(ProjectName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecords(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `ProjectName` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecords(parent);

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

### ListAnswerRecords(ListAnswerRecordsRequest, CallSettings)

    public virtual PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecords(ListAnswerRecordsRequest request, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

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

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
ListAnswerRecordsRequest request = new ListAnswerRecordsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecords(request);

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

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

    public virtual PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecords(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecords(parent);

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

### ListAnswerRecordsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecordsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedAsyncEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable asynchronous sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecordsAsync(parent);

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

### ListAnswerRecordsAsync(ProjectName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecordsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `ProjectName` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedAsyncEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable asynchronous sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecordsAsync(parent);

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

### ListAnswerRecordsAsync(ListAnswerRecordsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecordsAsync(ListAnswerRecordsRequest request, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

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

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
ListAnswerRecordsRequest request = new ListAnswerRecordsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecordsAsync(request);

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

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

    public virtual PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> ListAnswerRecordsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all answer records in the specified project in reverse
chronological order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`. |
| `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** |
| `PagedAsyncEnumerableListAnswerRecordsResponseAnswerRecord` | A pageable asynchronous sequence of [AnswerRecord](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.AnswerRecord.md.txt) resources. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecordsAsync(parent);

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

### UpdateAnswerRecord(AnswerRecord, FieldMask, CallSettings)

    public virtual AnswerRecord UpdateAnswerRecord(AnswerRecord answerRecord, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified answer record.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `answerRecord` | `AnswerRecord` Required. Answer record 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** |
| `AnswerRecord` | The RPC response. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
AnswerRecord answerRecord = new AnswerRecord();
FieldMask updateMask = new FieldMask();
// Make the request
AnswerRecord response = answerRecordsClient.UpdateAnswerRecord(answerRecord, updateMask);
```

### UpdateAnswerRecord(UpdateAnswerRecordRequest, CallSettings)

    public virtual AnswerRecord UpdateAnswerRecord(UpdateAnswerRecordRequest request, CallSettings callSettings = null)

Updates the specified answer record.

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

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
UpdateAnswerRecordRequest request = new UpdateAnswerRecordRequest
{
    AnswerRecord = new AnswerRecord(),
    UpdateMask = new FieldMask(),
};
// Make the request
AnswerRecord response = answerRecordsClient.UpdateAnswerRecord(request);
```

### UpdateAnswerRecordAsync(AnswerRecord, FieldMask, CallSettings)

    public virtual Task<AnswerRecord> UpdateAnswerRecordAsync(AnswerRecord answerRecord, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified answer record.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `answerRecord` | `AnswerRecord` Required. Answer record 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** |
| `TaskAnswerRecord` | A Task containing the RPC response. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
AnswerRecord answerRecord = new AnswerRecord();
FieldMask updateMask = new FieldMask();
// Make the request
AnswerRecord response = await answerRecordsClient.UpdateAnswerRecordAsync(answerRecord, updateMask);
```

### UpdateAnswerRecordAsync(AnswerRecord, FieldMask, CancellationToken)

    public virtual Task<AnswerRecord> UpdateAnswerRecordAsync(AnswerRecord answerRecord, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified answer record.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `answerRecord` | `AnswerRecord` Required. Answer record 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** |
| `TaskAnswerRecord` | A Task containing the RPC response. |

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
AnswerRecord answerRecord = new AnswerRecord();
FieldMask updateMask = new FieldMask();
// Make the request
AnswerRecord response = await answerRecordsClient.UpdateAnswerRecordAsync(answerRecord, updateMask);
```

### UpdateAnswerRecordAsync(UpdateAnswerRecordRequest, CallSettings)

    public virtual Task<AnswerRecord> UpdateAnswerRecordAsync(UpdateAnswerRecordRequest request, CallSettings callSettings = null)

Updates the specified answer record.

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

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
UpdateAnswerRecordRequest request = new UpdateAnswerRecordRequest
{
    AnswerRecord = new AnswerRecord(),
    UpdateMask = new FieldMask(),
};
// Make the request
AnswerRecord response = await answerRecordsClient.UpdateAnswerRecordAsync(request);
```

### UpdateAnswerRecordAsync(UpdateAnswerRecordRequest, CancellationToken)

    public virtual Task<AnswerRecord> UpdateAnswerRecordAsync(UpdateAnswerRecordRequest request, CancellationToken cancellationToken)

Updates the specified answer record.

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

**Example**

```cs
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
UpdateAnswerRecordRequest request = new UpdateAnswerRecordRequest
{
    AnswerRecord = new AnswerRecord(),
    UpdateMask = new FieldMask(),
};
// Make the request
AnswerRecord response = await answerRecordsClient.UpdateAnswerRecordAsync(request);
```