Google Cloud Dialogflow v2 API - Class ParticipantsClient (4.22.0)

public abstract class ParticipantsClient

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

Participants client wrapper, for convenient use.

Inheritance

object > ParticipantsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing [Participants][google.cloud.dialogflow.v2.Participant].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual Participants.ParticipantsClient GrpcClient { get; }

The underlying gRPC Participants client

Property Value
Type Description
ParticipantsParticipantsClient

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

AnalyzeContent(AnalyzeContentRequest, CallSettings)

public virtual AnalyzeContentResponse AnalyzeContent(AnalyzeContentRequest request, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
request AnalyzeContentRequest

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
AnalyzeContentResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
AnalyzeContentRequest request = new AnalyzeContentRequest
{
    ParticipantAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    ReplyAudioConfig = new OutputAudioConfig(),
    TextInput = new TextInput(),
    QueryParams = new QueryParameters(),
    RequestId = "",
    AssistQueryParams = new AssistQueryParameters(),
    CxParameters = new Struct(),
};
// Make the request
AnalyzeContentResponse response = participantsClient.AnalyzeContent(request);

AnalyzeContent(ParticipantName, EventInput, CallSettings)

public virtual AnalyzeContentResponse AnalyzeContent(ParticipantName participant, EventInput eventInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzeContentResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, eventInput);

AnalyzeContent(ParticipantName, TextInput, CallSettings)

public virtual AnalyzeContentResponse AnalyzeContent(ParticipantName participant, TextInput textInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzeContentResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, textInput);

AnalyzeContent(string, EventInput, CallSettings)

public virtual AnalyzeContentResponse AnalyzeContent(string participant, EventInput eventInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzeContentResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, eventInput);

AnalyzeContent(string, TextInput, CallSettings)

public virtual AnalyzeContentResponse AnalyzeContent(string participant, TextInput textInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnalyzeContentResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, textInput);

AnalyzeContentAsync(AnalyzeContentRequest, CallSettings)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(AnalyzeContentRequest request, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
request AnalyzeContentRequest

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
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
AnalyzeContentRequest request = new AnalyzeContentRequest
{
    ParticipantAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    ReplyAudioConfig = new OutputAudioConfig(),
    TextInput = new TextInput(),
    QueryParams = new QueryParameters(),
    RequestId = "",
    AssistQueryParams = new AssistQueryParameters(),
    CxParameters = new Struct(),
};
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(request);

AnalyzeContentAsync(AnalyzeContentRequest, CancellationToken)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(AnalyzeContentRequest request, CancellationToken cancellationToken)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
request AnalyzeContentRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
AnalyzeContentRequest request = new AnalyzeContentRequest
{
    ParticipantAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    ReplyAudioConfig = new OutputAudioConfig(),
    TextInput = new TextInput(),
    QueryParams = new QueryParameters(),
    RequestId = "",
    AssistQueryParams = new AssistQueryParameters(),
    CxParameters = new Struct(),
};
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(request);

AnalyzeContentAsync(ParticipantName, EventInput, CallSettings)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(ParticipantName participant, EventInput eventInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput);

AnalyzeContentAsync(ParticipantName, EventInput, CancellationToken)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(ParticipantName participant, EventInput eventInput, CancellationToken cancellationToken)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput);

AnalyzeContentAsync(ParticipantName, TextInput, CallSettings)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(ParticipantName participant, TextInput textInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, textInput);

AnalyzeContentAsync(ParticipantName, TextInput, CancellationToken)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(ParticipantName participant, TextInput textInput, CancellationToken cancellationToken)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant ParticipantName

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, textInput);

AnalyzeContentAsync(string, EventInput, CallSettings)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(string participant, EventInput eventInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput);

AnalyzeContentAsync(string, EventInput, CancellationToken)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(string participant, EventInput eventInput, CancellationToken cancellationToken)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

eventInput EventInput

An input event to send to Dialogflow.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
EventInput eventInput = new EventInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput);

AnalyzeContentAsync(string, TextInput, CallSettings)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(string participant, TextInput textInput, CallSettings callSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, textInput);

AnalyzeContentAsync(string, TextInput, CancellationToken)

public virtual Task<AnalyzeContentResponse> AnalyzeContentAsync(string participant, TextInput textInput, CancellationToken cancellationToken)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
participant string

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

textInput TextInput

The natural language text to be processed.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAnalyzeContentResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
TextInput textInput = new TextInput();
// Make the request
AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, textInput);

Create()

public static ParticipantsClient Create()

Synchronously creates a ParticipantsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ParticipantsClientBuilder.

Returns
Type Description
ParticipantsClient

The created ParticipantsClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a ParticipantsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ParticipantsClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskParticipantsClient

The task representing the created ParticipantsClient.

CreateParticipant(ConversationName, Participant, CallSettings)

public virtual Participant CreateParticipant(ConversationName parent, Participant participant, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
parent ConversationName

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
Participant participant = new Participant();
// Make the request
Participant response = participantsClient.CreateParticipant(parent, participant);

CreateParticipant(CreateParticipantRequest, CallSettings)

public virtual Participant CreateParticipant(CreateParticipantRequest request, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
request CreateParticipantRequest

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
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
CreateParticipantRequest request = new CreateParticipantRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    Participant = new Participant(),
};
// Make the request
Participant response = participantsClient.CreateParticipant(request);

CreateParticipant(string, Participant, CallSettings)

public virtual Participant CreateParticipant(string parent, Participant participant, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
parent string

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
Participant participant = new Participant();
// Make the request
Participant response = participantsClient.CreateParticipant(parent, participant);

CreateParticipantAsync(ConversationName, Participant, CallSettings)

public virtual Task<Participant> CreateParticipantAsync(ConversationName parent, Participant participant, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
parent ConversationName

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
Participant participant = new Participant();
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(parent, participant);

CreateParticipantAsync(ConversationName, Participant, CancellationToken)

public virtual Task<Participant> CreateParticipantAsync(ConversationName parent, Participant participant, CancellationToken cancellationToken)

Creates a new participant in a conversation.

Parameters
Name Description
parent ConversationName

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
Participant participant = new Participant();
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(parent, participant);

CreateParticipantAsync(CreateParticipantRequest, CallSettings)

public virtual Task<Participant> CreateParticipantAsync(CreateParticipantRequest request, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
request CreateParticipantRequest

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
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
CreateParticipantRequest request = new CreateParticipantRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    Participant = new Participant(),
};
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(request);

CreateParticipantAsync(CreateParticipantRequest, CancellationToken)

public virtual Task<Participant> CreateParticipantAsync(CreateParticipantRequest request, CancellationToken cancellationToken)

Creates a new participant in a conversation.

Parameters
Name Description
request CreateParticipantRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
CreateParticipantRequest request = new CreateParticipantRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
    Participant = new Participant(),
};
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(request);

CreateParticipantAsync(string, Participant, CallSettings)

public virtual Task<Participant> CreateParticipantAsync(string parent, Participant participant, CallSettings callSettings = null)

Creates a new participant in a conversation.

Parameters
Name Description
parent string

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
Participant participant = new Participant();
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(parent, participant);

CreateParticipantAsync(string, Participant, CancellationToken)

public virtual Task<Participant> CreateParticipantAsync(string parent, Participant participant, CancellationToken cancellationToken)

Creates a new participant in a conversation.

Parameters
Name Description
parent string

Required. Resource identifier of the conversation adding the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

participant Participant

Required. The participant to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
Participant participant = new Participant();
// Make the request
Participant response = await participantsClient.CreateParticipantAsync(parent, participant);

GetParticipant(GetParticipantRequest, CallSettings)

public virtual Participant GetParticipant(GetParticipantRequest request, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
request GetParticipantRequest

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
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
GetParticipantRequest request = new GetParticipantRequest
{
    ParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
};
// Make the request
Participant response = participantsClient.GetParticipant(request);

GetParticipant(ParticipantName, CallSettings)

public virtual Participant GetParticipant(ParticipantName name, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
name ParticipantName

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName name = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
Participant response = participantsClient.GetParticipant(name);

GetParticipant(string, CallSettings)

public virtual Participant GetParticipant(string name, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
name string

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
Participant response = participantsClient.GetParticipant(name);

GetParticipantAsync(GetParticipantRequest, CallSettings)

public virtual Task<Participant> GetParticipantAsync(GetParticipantRequest request, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
request GetParticipantRequest

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
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
GetParticipantRequest request = new GetParticipantRequest
{
    ParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
};
// Make the request
Participant response = await participantsClient.GetParticipantAsync(request);

GetParticipantAsync(GetParticipantRequest, CancellationToken)

public virtual Task<Participant> GetParticipantAsync(GetParticipantRequest request, CancellationToken cancellationToken)

Retrieves a conversation participant.

Parameters
Name Description
request GetParticipantRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
GetParticipantRequest request = new GetParticipantRequest
{
    ParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
};
// Make the request
Participant response = await participantsClient.GetParticipantAsync(request);

GetParticipantAsync(ParticipantName, CallSettings)

public virtual Task<Participant> GetParticipantAsync(ParticipantName name, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
name ParticipantName

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName name = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
Participant response = await participantsClient.GetParticipantAsync(name);

GetParticipantAsync(ParticipantName, CancellationToken)

public virtual Task<Participant> GetParticipantAsync(ParticipantName name, CancellationToken cancellationToken)

Retrieves a conversation participant.

Parameters
Name Description
name ParticipantName

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName name = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
Participant response = await participantsClient.GetParticipantAsync(name);

GetParticipantAsync(string, CallSettings)

public virtual Task<Participant> GetParticipantAsync(string name, CallSettings callSettings = null)

Retrieves a conversation participant.

Parameters
Name Description
name string

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
Participant response = await participantsClient.GetParticipantAsync(name);

GetParticipantAsync(string, CancellationToken)

public virtual Task<Participant> GetParticipantAsync(string name, CancellationToken cancellationToken)

Retrieves a conversation participant.

Parameters
Name Description
name string

Required. The name of the participant. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
Participant response = await participantsClient.GetParticipantAsync(name);

ListParticipants(ConversationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListParticipantsResponse, Participant> ListParticipants(ConversationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
parent ConversationName

Required. The conversation to list all participants from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation 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
PagedEnumerableListParticipantsResponseParticipant

A pageable sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
PagedEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipants(parent);

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

ListParticipants(ListParticipantsRequest, CallSettings)

public virtual PagedEnumerable<ListParticipantsResponse, Participant> ListParticipants(ListParticipantsRequest request, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
request ListParticipantsRequest

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
PagedEnumerableListParticipantsResponseParticipant

A pageable sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ListParticipantsRequest request = new ListParticipantsRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
PagedEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipants(request);

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

ListParticipants(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListParticipantsResponse, Participant> ListParticipants(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
parent string

Required. The conversation to list all participants from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation 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
PagedEnumerableListParticipantsResponseParticipant

A pageable sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
PagedEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipants(parent);

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

ListParticipantsAsync(ConversationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListParticipantsResponse, Participant> ListParticipantsAsync(ConversationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
parent ConversationName

Required. The conversation to list all participants from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation 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
PagedAsyncEnumerableListParticipantsResponseParticipant

A pageable asynchronous sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
// Make the request
PagedAsyncEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipantsAsync(parent);

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

ListParticipantsAsync(ListParticipantsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListParticipantsResponse, Participant> ListParticipantsAsync(ListParticipantsRequest request, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
request ListParticipantsRequest

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
PagedAsyncEnumerableListParticipantsResponseParticipant

A pageable asynchronous sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ListParticipantsRequest request = new ListParticipantsRequest
{
    ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
};
// Make the request
PagedAsyncEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipantsAsync(request);

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

ListParticipantsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListParticipantsResponse, Participant> ListParticipantsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all participants in the specified conversation.

Parameters
Name Description
parent string

Required. The conversation to list all participants from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation 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
PagedAsyncEnumerableListParticipantsResponseParticipant

A pageable asynchronous sequence of Participant resources.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]";
// Make the request
PagedAsyncEnumerable<ListParticipantsResponse, Participant> response = participantsClient.ListParticipantsAsync(parent);

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

Remarks

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.

StreamingAnalyzeContent(CallSettings, BidirectionalStreamingSettings)

public virtual ParticipantsClient.StreamingAnalyzeContentStream StreamingAnalyzeContent(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)

Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: This method is only available through the gRPC API (not REST).

The top-level message sent to the client by the server is StreamingAnalyzeContentResponse. Multiple response messages can be returned in order. The first one or more messages contain the recognition_result field. Each result represents a more complete transcript of what the user said. The next message contains the reply_text field and potentially the reply_audio field. The message can also contain the automated_agent_reply field.

Note: Always use agent versions for production traffic sent to virtual agents. See Versions and environments.

Parameters
Name Description
callSettings CallSettings

If not null, applies overrides to this RPC call.

streamingSettings BidirectionalStreamingSettings

If not null, applies streaming overrides to this RPC call.

Returns
Type Description
ParticipantsClientStreamingAnalyzeContentStream

The client-server stream.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize streaming call, retrieving the stream object
using ParticipantsClient.StreamingAnalyzeContentStream response = participantsClient.StreamingAnalyzeContent();

// Sending requests and retrieving responses can be arbitrarily interleaved
// Exact sequence will depend on client/server behavior

// Create task to do something with responses from server
Task responseHandlerTask = Task.Run(async () =>
{
    // Note that C# 8 code can use await foreach
    AsyncResponseStream<StreamingAnalyzeContentResponse> responseStream = response.GetResponseStream();
    while (await responseStream.MoveNextAsync())
    {
        StreamingAnalyzeContentResponse responseItem = responseStream.Current;
        // Do something with streamed response
    }
    // The response stream has completed
});

// Send requests to the server
bool done = false;
while (!done)
{
    // Initialize a request
    StreamingAnalyzeContentRequest request = new StreamingAnalyzeContentRequest
    {
        ParticipantAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
        AudioConfig = new InputAudioConfig(),
        ReplyAudioConfig = new OutputAudioConfig(),
        InputAudio = ByteString.Empty,
        QueryParams = new QueryParameters(),
        AssistQueryParams = new AssistQueryParameters(),
        EnableExtendedStreaming = false,
        EnablePartialAutomatedAgentReply = false,
        CxParameters = new Struct(),
        EnableDebuggingInfo = false,
    };
    // Stream a request to the server
    await response.WriteAsync(request);
    // Set "done" to true when sending requests is complete
}

// Complete writing requests to the stream
await response.WriteCompleteAsync();
// Await the response handler
// This will complete once all server responses have been processed
await responseHandlerTask;

SuggestArticles(ParticipantName, CallSettings)

public virtual SuggestArticlesResponse SuggestArticles(ParticipantName parent, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestArticlesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestArticlesResponse response = participantsClient.SuggestArticles(parent);

SuggestArticles(SuggestArticlesRequest, CallSettings)

public virtual SuggestArticlesResponse SuggestArticles(SuggestArticlesRequest request, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
request SuggestArticlesRequest

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
SuggestArticlesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
SuggestArticlesRequest request = new SuggestArticlesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestArticlesResponse response = participantsClient.SuggestArticles(request);

SuggestArticles(string, CallSettings)

public virtual SuggestArticlesResponse SuggestArticles(string parent, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestArticlesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestArticlesResponse response = participantsClient.SuggestArticles(parent);

SuggestArticlesAsync(ParticipantName, CallSettings)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(ParticipantName parent, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(parent);

SuggestArticlesAsync(ParticipantName, CancellationToken)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(ParticipantName parent, CancellationToken cancellationToken)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(parent);

SuggestArticlesAsync(SuggestArticlesRequest, CallSettings)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(SuggestArticlesRequest request, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
request SuggestArticlesRequest

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
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestArticlesRequest request = new SuggestArticlesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(request);

SuggestArticlesAsync(SuggestArticlesRequest, CancellationToken)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(SuggestArticlesRequest request, CancellationToken cancellationToken)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
request SuggestArticlesRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestArticlesRequest request = new SuggestArticlesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(request);

SuggestArticlesAsync(string, CallSettings)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(string parent, CallSettings callSettings = null)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(parent);

SuggestArticlesAsync(string, CancellationToken)

public virtual Task<SuggestArticlesResponse> SuggestArticlesAsync(string parent, CancellationToken cancellationToken)

Gets suggested articles for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestArticlesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(parent);

SuggestFaqAnswers(ParticipantName, CallSettings)

public virtual SuggestFaqAnswersResponse SuggestFaqAnswers(ParticipantName parent, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestFaqAnswersResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(parent);

SuggestFaqAnswers(SuggestFaqAnswersRequest, CallSettings)

public virtual SuggestFaqAnswersResponse SuggestFaqAnswers(SuggestFaqAnswersRequest request, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
request SuggestFaqAnswersRequest

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
SuggestFaqAnswersResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
SuggestFaqAnswersRequest request = new SuggestFaqAnswersRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(request);

SuggestFaqAnswers(string, CallSettings)

public virtual SuggestFaqAnswersResponse SuggestFaqAnswers(string parent, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestFaqAnswersResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(parent);

SuggestFaqAnswersAsync(ParticipantName, CallSettings)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(ParticipantName parent, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent);

SuggestFaqAnswersAsync(ParticipantName, CancellationToken)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(ParticipantName parent, CancellationToken cancellationToken)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent);

SuggestFaqAnswersAsync(SuggestFaqAnswersRequest, CallSettings)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(SuggestFaqAnswersRequest request, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
request SuggestFaqAnswersRequest

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
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestFaqAnswersRequest request = new SuggestFaqAnswersRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(request);

SuggestFaqAnswersAsync(SuggestFaqAnswersRequest, CancellationToken)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(SuggestFaqAnswersRequest request, CancellationToken cancellationToken)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
request SuggestFaqAnswersRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestFaqAnswersRequest request = new SuggestFaqAnswersRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    AssistQueryParams = new AssistQueryParameters(),
};
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(request);

SuggestFaqAnswersAsync(string, CallSettings)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(string parent, CallSettings callSettings = null)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent);

SuggestFaqAnswersAsync(string, CancellationToken)

public virtual Task<SuggestFaqAnswersResponse> SuggestFaqAnswersAsync(string parent, CancellationToken cancellationToken)

Gets suggested faq answers for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestFaqAnswersResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent);

SuggestKnowledgeAssist(SuggestKnowledgeAssistRequest, CallSettings)

public virtual SuggestKnowledgeAssistResponse SuggestKnowledgeAssist(SuggestKnowledgeAssistRequest request, CallSettings callSettings = null)

Gets knowledge assist suggestions based on historical messages.

Parameters
Name Description
request SuggestKnowledgeAssistRequest

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
SuggestKnowledgeAssistResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
SuggestKnowledgeAssistRequest request = new SuggestKnowledgeAssistRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    PreviousSuggestedQuery = "",
};
// Make the request
SuggestKnowledgeAssistResponse response = participantsClient.SuggestKnowledgeAssist(request);

SuggestKnowledgeAssistAsync(SuggestKnowledgeAssistRequest, CallSettings)

public virtual Task<SuggestKnowledgeAssistResponse> SuggestKnowledgeAssistAsync(SuggestKnowledgeAssistRequest request, CallSettings callSettings = null)

Gets knowledge assist suggestions based on historical messages.

Parameters
Name Description
request SuggestKnowledgeAssistRequest

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
TaskSuggestKnowledgeAssistResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestKnowledgeAssistRequest request = new SuggestKnowledgeAssistRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    PreviousSuggestedQuery = "",
};
// Make the request
SuggestKnowledgeAssistResponse response = await participantsClient.SuggestKnowledgeAssistAsync(request);

SuggestKnowledgeAssistAsync(SuggestKnowledgeAssistRequest, CancellationToken)

public virtual Task<SuggestKnowledgeAssistResponse> SuggestKnowledgeAssistAsync(SuggestKnowledgeAssistRequest request, CancellationToken cancellationToken)

Gets knowledge assist suggestions based on historical messages.

Parameters
Name Description
request SuggestKnowledgeAssistRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestKnowledgeAssistResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestKnowledgeAssistRequest request = new SuggestKnowledgeAssistRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    PreviousSuggestedQuery = "",
};
// Make the request
SuggestKnowledgeAssistResponse response = await participantsClient.SuggestKnowledgeAssistAsync(request);

SuggestSmartReplies(ParticipantName, CallSettings)

public virtual SuggestSmartRepliesResponse SuggestSmartReplies(ParticipantName parent, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestSmartRepliesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestSmartRepliesResponse response = participantsClient.SuggestSmartReplies(parent);

SuggestSmartReplies(SuggestSmartRepliesRequest, CallSettings)

public virtual SuggestSmartRepliesResponse SuggestSmartReplies(SuggestSmartRepliesRequest request, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
request SuggestSmartRepliesRequest

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
SuggestSmartRepliesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
SuggestSmartRepliesRequest request = new SuggestSmartRepliesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    CurrentTextInput = new TextInput(),
};
// Make the request
SuggestSmartRepliesResponse response = participantsClient.SuggestSmartReplies(request);

SuggestSmartReplies(string, CallSettings)

public virtual SuggestSmartRepliesResponse SuggestSmartReplies(string parent, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SuggestSmartRepliesResponse

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestSmartRepliesResponse response = participantsClient.SuggestSmartReplies(parent);

SuggestSmartRepliesAsync(ParticipantName, CallSettings)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(ParticipantName parent, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(parent);

SuggestSmartRepliesAsync(ParticipantName, CancellationToken)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(ParticipantName parent, CancellationToken cancellationToken)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent ParticipantName

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]");
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(parent);

SuggestSmartRepliesAsync(SuggestSmartRepliesRequest, CallSettings)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(SuggestSmartRepliesRequest request, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
request SuggestSmartRepliesRequest

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
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestSmartRepliesRequest request = new SuggestSmartRepliesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    CurrentTextInput = new TextInput(),
};
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(request);

SuggestSmartRepliesAsync(SuggestSmartRepliesRequest, CancellationToken)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(SuggestSmartRepliesRequest request, CancellationToken cancellationToken)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
request SuggestSmartRepliesRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
SuggestSmartRepliesRequest request = new SuggestSmartRepliesRequest
{
    ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"),
    LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
    ContextSize = 0,
    CurrentTextInput = new TextInput(),
};
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(request);

SuggestSmartRepliesAsync(string, CallSettings)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(string parent, CallSettings callSettings = null)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(parent);

SuggestSmartRepliesAsync(string, CancellationToken)

public virtual Task<SuggestSmartRepliesResponse> SuggestSmartRepliesAsync(string parent, CancellationToken cancellationToken)

Gets smart replies for a participant based on specific historical messages.

Parameters
Name Description
parent string

Required. The name of the participant to fetch suggestion for. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSuggestSmartRepliesResponse

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]";
// Make the request
SuggestSmartRepliesResponse response = await participantsClient.SuggestSmartRepliesAsync(parent);

UpdateParticipant(Participant, FieldMask, CallSettings)

public virtual Participant UpdateParticipant(Participant participant, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified participant.

Parameters
Name Description
participant Participant

Required. The participant to update.

updateMask FieldMask

Required. The mask to specify which fields to update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
Participant participant = new Participant();
FieldMask updateMask = new FieldMask();
// Make the request
Participant response = participantsClient.UpdateParticipant(participant, updateMask);

UpdateParticipant(UpdateParticipantRequest, CallSettings)

public virtual Participant UpdateParticipant(UpdateParticipantRequest request, CallSettings callSettings = null)

Updates the specified participant.

Parameters
Name Description
request UpdateParticipantRequest

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
Participant

The RPC response.

Example
// Create client
ParticipantsClient participantsClient = ParticipantsClient.Create();
// Initialize request argument(s)
UpdateParticipantRequest request = new UpdateParticipantRequest
{
    Participant = new Participant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Participant response = participantsClient.UpdateParticipant(request);

UpdateParticipantAsync(Participant, FieldMask, CallSettings)

public virtual Task<Participant> UpdateParticipantAsync(Participant participant, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified participant.

Parameters
Name Description
participant Participant

Required. The participant to update.

updateMask FieldMask

Required. The mask to specify which fields to update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
Participant participant = new Participant();
FieldMask updateMask = new FieldMask();
// Make the request
Participant response = await participantsClient.UpdateParticipantAsync(participant, updateMask);

UpdateParticipantAsync(Participant, FieldMask, CancellationToken)

public virtual Task<Participant> UpdateParticipantAsync(Participant participant, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified participant.

Parameters
Name Description
participant Participant

Required. The participant to update.

updateMask FieldMask

Required. The mask to specify which fields to update.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
Participant participant = new Participant();
FieldMask updateMask = new FieldMask();
// Make the request
Participant response = await participantsClient.UpdateParticipantAsync(participant, updateMask);

UpdateParticipantAsync(UpdateParticipantRequest, CallSettings)

public virtual Task<Participant> UpdateParticipantAsync(UpdateParticipantRequest request, CallSettings callSettings = null)

Updates the specified participant.

Parameters
Name Description
request UpdateParticipantRequest

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
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
UpdateParticipantRequest request = new UpdateParticipantRequest
{
    Participant = new Participant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Participant response = await participantsClient.UpdateParticipantAsync(request);

UpdateParticipantAsync(UpdateParticipantRequest, CancellationToken)

public virtual Task<Participant> UpdateParticipantAsync(UpdateParticipantRequest request, CancellationToken cancellationToken)

Updates the specified participant.

Parameters
Name Description
request UpdateParticipantRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskParticipant

A Task containing the RPC response.

Example
// Create client
ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync();
// Initialize request argument(s)
UpdateParticipantRequest request = new UpdateParticipantRequest
{
    Participant = new Participant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Participant response = await participantsClient.UpdateParticipantAsync(request);