public abstract class AnswerRecordsClient
Reference documentation and code samples for the Google Cloud Dialogflow v2 API class AnswerRecordsClient.
AnswerRecords client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.V2Assembly
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 |
IReadOnlyList<String> |
The default AnswerRecords scopes are:
GrpcClient
public virtual AnswerRecords.AnswerRecordsClient GrpcClient { get; }
The underlying gRPC AnswerRecords client
Property Value | |
---|---|
Type | Description |
AnswerRecords.AnswerRecordsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient 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 using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AnswerRecordsClientBuilder.
Returns | |
---|---|
Type | Description |
AnswerRecordsClient | The created AnswerRecordsClient. |
CreateAsync(CancellationToken)
public static Task<AnswerRecordsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a AnswerRecordsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AnswerRecordsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<AnswerRecordsClient> | The task representing the created AnswerRecordsClient. |
ListAnswerRecords(LocationName, String, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable sequence of AnswerRecord resources. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable sequence of AnswerRecord resources. |
// 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 |
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable sequence of AnswerRecord resources. |
// Create client
AnswerRecordsClient answerRecordsClient = AnswerRecordsClient.Create();
// Initialize request argument(s)
ListAnswerRecordsRequest request = new ListAnswerRecordsRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable sequence of AnswerRecord resources. |
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable asynchronous sequence of AnswerRecord resources. |
// 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 response.ForEachAsync((AnswerRecord item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnswerRecordsResponse page) =>
{
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable asynchronous sequence of AnswerRecord resources. |
// 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 response.ForEachAsync((AnswerRecord item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnswerRecordsResponse page) =>
{
// 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 |
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable asynchronous sequence of AnswerRecord resources. |
// Create client
AnswerRecordsClient answerRecordsClient = await AnswerRecordsClient.CreateAsync();
// Initialize request argument(s)
ListAnswerRecordsRequest request = new ListAnswerRecordsRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> response = answerRecordsClient.ListAnswerRecordsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnswerRecord item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnswerRecordsResponse page) =>
{
// 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, Nullable<Int32>, 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: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAnswerRecordsResponse, AnswerRecord> | A pageable asynchronous sequence of AnswerRecord resources. |
// 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 response.ForEachAsync((AnswerRecord item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnswerRecordsResponse page) =>
{
// 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(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. |
// 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. |
// 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 |
Task<AnswerRecord> | A Task containing the RPC response. |
// 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 to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AnswerRecord> | A Task containing the RPC response. |
// 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 |
Task<AnswerRecord> | A Task containing the RPC response. |
// 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 to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AnswerRecord> | A Task containing the RPC response. |
// 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);