Class Conversation.Builder (4.37.0)

public static final class Conversation.Builder extends GeneratedMessageV3.Builder<Conversation.Builder> implements ConversationOrBuilder

Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.

Protobuf type google.cloud.dialogflow.v2.Conversation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Conversation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Conversation.Builder
Overrides

build()

public Conversation build()
Returns
Type Description
Conversation

buildPartial()

public Conversation buildPartial()
Returns
Type Description
Conversation

clear()

public Conversation.Builder clear()
Returns
Type Description
Conversation.Builder
Overrides

clearConversationProfile()

public Conversation.Builder clearConversationProfile()

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
Conversation.Builder

This builder for chaining.

clearConversationStage()

public Conversation.Builder clearConversationStage()

The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.

If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.

If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.

.google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Returns
Type Description
Conversation.Builder

This builder for chaining.

clearEndTime()

public Conversation.Builder clearEndTime()

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.Builder

clearField(Descriptors.FieldDescriptor field)

public Conversation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Conversation.Builder
Overrides

clearLifecycleState()

public Conversation.Builder clearLifecycleState()

Output only. The current state of the Conversation.

.google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.Builder

This builder for chaining.

clearName()

public Conversation.Builder clearName()

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Conversation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Conversation.Builder
Overrides

clearPhoneNumber()

public Conversation.Builder clearPhoneNumber()

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.Builder

clearStartTime()

public Conversation.Builder clearStartTime()

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.Builder

clone()

public Conversation.Builder clone()
Returns
Type Description
Conversation.Builder
Overrides

getConversationProfile()

public String getConversationProfile()

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The conversationProfile.

getConversationProfileBytes()

public ByteString getConversationProfileBytes()

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for conversationProfile.

getConversationStage()

public Conversation.ConversationStage getConversationStage()

The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.

If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.

If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.

.google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Returns
Type Description
Conversation.ConversationStage

The conversationStage.

getConversationStageValue()

public int getConversationStageValue()

The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.

If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.

If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.

.google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Returns
Type Description
int

The enum numeric value on the wire for conversationStage.

getDefaultInstanceForType()

public Conversation getDefaultInstanceForType()
Returns
Type Description
Conversation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndTime()

public Timestamp getEndTime()

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getLifecycleState()

public Conversation.LifecycleState getLifecycleState()

Output only. The current state of the Conversation.

.google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Conversation.LifecycleState

The lifecycleState.

getLifecycleStateValue()

public int getLifecycleStateValue()

Output only. The current state of the Conversation.

.google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for lifecycleState.

getName()

public String getName()

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getPhoneNumber()

public ConversationPhoneNumber getPhoneNumber()

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ConversationPhoneNumber

The phoneNumber.

getPhoneNumberBuilder()

public ConversationPhoneNumber.Builder getPhoneNumberBuilder()

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ConversationPhoneNumber.Builder

getPhoneNumberOrBuilder()

public ConversationPhoneNumberOrBuilder getPhoneNumberOrBuilder()

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ConversationPhoneNumberOrBuilder

getStartTime()

public Timestamp getStartTime()

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasEndTime()

public boolean hasEndTime()

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the endTime field is set.

hasPhoneNumber()

public boolean hasPhoneNumber()

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the phoneNumber field is set.

hasStartTime()

public boolean hasStartTime()

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEndTime(Timestamp value)

public Conversation.Builder mergeEndTime(Timestamp value)

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Conversation.Builder

mergeFrom(Conversation other)

public Conversation.Builder mergeFrom(Conversation other)
Parameter
Name Description
other Conversation
Returns
Type Description
Conversation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Conversation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Conversation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Conversation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Conversation.Builder
Overrides

mergePhoneNumber(ConversationPhoneNumber value)

public Conversation.Builder mergePhoneNumber(ConversationPhoneNumber value)

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ConversationPhoneNumber
Returns
Type Description
Conversation.Builder

mergeStartTime(Timestamp value)

public Conversation.Builder mergeStartTime(Timestamp value)

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Conversation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Conversation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Conversation.Builder
Overrides

setConversationProfile(String value)

public Conversation.Builder setConversationProfile(String value)

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The conversationProfile to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setConversationProfileBytes(ByteString value)

public Conversation.Builder setConversationProfileBytes(ByteString value)

Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

string conversation_profile = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for conversationProfile to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setConversationStage(Conversation.ConversationStage value)

public Conversation.Builder setConversationStage(Conversation.ConversationStage value)

The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.

If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.

If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.

.google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Parameter
Name Description
value Conversation.ConversationStage

The conversationStage to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setConversationStageValue(int value)

public Conversation.Builder setConversationStageValue(int value)

The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.

If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE.

If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.

.google.cloud.dialogflow.v2.Conversation.ConversationStage conversation_stage = 7;

Parameter
Name Description
value int

The enum numeric value on the wire for conversationStage to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setEndTime(Timestamp value)

public Conversation.Builder setEndTime(Timestamp value)

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Conversation.Builder

setEndTime(Timestamp.Builder builderForValue)

public Conversation.Builder setEndTime(Timestamp.Builder builderForValue)

Output only. The time the conversation was finished.

.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Conversation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Conversation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Conversation.Builder
Overrides

setLifecycleState(Conversation.LifecycleState value)

public Conversation.Builder setLifecycleState(Conversation.LifecycleState value)

Output only. The current state of the Conversation.

.google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Conversation.LifecycleState

The lifecycleState to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setLifecycleStateValue(int value)

public Conversation.Builder setLifecycleStateValue(int value)

Output only. The current state of the Conversation.

.google.cloud.dialogflow.v2.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for lifecycleState to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setName(String value)

public Conversation.Builder setName(String value)

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Conversation.Builder setNameBytes(ByteString value)

Output only. The unique identifier of this conversation. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Conversation.Builder

This builder for chaining.

setPhoneNumber(ConversationPhoneNumber value)

public Conversation.Builder setPhoneNumber(ConversationPhoneNumber value)

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ConversationPhoneNumber
Returns
Type Description
Conversation.Builder

setPhoneNumber(ConversationPhoneNumber.Builder builderForValue)

public Conversation.Builder setPhoneNumber(ConversationPhoneNumber.Builder builderForValue)

Output only. It will not be empty if the conversation is to be connected over telephony.

.google.cloud.dialogflow.v2.ConversationPhoneNumber phone_number = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue ConversationPhoneNumber.Builder
Returns
Type Description
Conversation.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Conversation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Conversation.Builder
Overrides

setStartTime(Timestamp value)

public Conversation.Builder setStartTime(Timestamp value)

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Conversation.Builder

setStartTime(Timestamp.Builder builderForValue)

public Conversation.Builder setStartTime(Timestamp.Builder builderForValue)

Output only. The time the conversation was started.

.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Conversation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Conversation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Conversation.Builder
Overrides