Class Conversation.Builder (4.3.1)

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.v2beta1.Conversation

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Conversation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Conversation.Builder
Overrides

build()

public Conversation build()
Returns
TypeDescription
Conversation

buildPartial()

public Conversation buildPartial()
Returns
TypeDescription
Conversation

clear()

public Conversation.Builder clear()
Returns
TypeDescription
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
TypeDescription
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.v2beta1.Conversation.ConversationStage conversation_stage = 7;

Returns
TypeDescription
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
TypeDescription
Conversation.Builder

clearField(Descriptors.FieldDescriptor field)

public Conversation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Conversation.Builder
Overrides

clearLifecycleState()

public Conversation.Builder clearLifecycleState()

Output only. The current state of the Conversation.

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

Returns
TypeDescription
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
TypeDescription
Conversation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Conversation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Conversation.Builder
Overrides

clearPhoneNumber()

public Conversation.Builder clearPhoneNumber()

Output only. Required if the conversation is to be connected over telephony.

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

Returns
TypeDescription
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
TypeDescription
Conversation.Builder

clone()

public Conversation.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.v2beta1.Conversation.ConversationStage conversation_stage = 7;

Returns
TypeDescription
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.v2beta1.Conversation.ConversationStage conversation_stage = 7;

Returns
TypeDescription
int

The enum numeric value on the wire for conversationStage.

getDefaultInstanceForType()

public Conversation getDefaultInstanceForType()
Returns
TypeDescription
Conversation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getLifecycleState()

public Conversation.LifecycleState getLifecycleState()

Output only. The current state of the Conversation.

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

Returns
TypeDescription
Conversation.LifecycleState

The lifecycleState.

getLifecycleStateValue()

public int getLifecycleStateValue()

Output only. The current state of the Conversation.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getPhoneNumber()

public ConversationPhoneNumber getPhoneNumber()

Output only. Required if the conversation is to be connected over telephony.

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

Returns
TypeDescription
ConversationPhoneNumber

The phoneNumber.

getPhoneNumberBuilder()

public ConversationPhoneNumber.Builder getPhoneNumberBuilder()

Output only. Required if the conversation is to be connected over telephony.

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

Returns
TypeDescription
ConversationPhoneNumber.Builder

getPhoneNumberOrBuilder()

public ConversationPhoneNumberOrBuilder getPhoneNumberOrBuilder()

Output only. Required if the conversation is to be connected over telephony.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the endTime field is set.

hasPhoneNumber()

public boolean hasPhoneNumber()

Output only. Required if the conversation is to be connected over telephony.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Conversation.Builder

mergeFrom(Conversation other)

public Conversation.Builder mergeFrom(Conversation other)
Parameter
NameDescription
otherConversation
Returns
TypeDescription
Conversation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Conversation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Conversation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Conversation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Conversation.Builder
Overrides

mergePhoneNumber(ConversationPhoneNumber value)

public Conversation.Builder mergePhoneNumber(ConversationPhoneNumber value)

Output only. Required if the conversation is to be connected over telephony.

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

Parameter
NameDescription
valueConversationPhoneNumber
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Conversation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Conversation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The conversationProfile to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for conversationProfile to set.

Returns
TypeDescription
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.v2beta1.Conversation.ConversationStage conversation_stage = 7;

Parameter
NameDescription
valueConversation.ConversationStage

The conversationStage to set.

Returns
TypeDescription
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.v2beta1.Conversation.ConversationStage conversation_stage = 7;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Conversation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Conversation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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.v2beta1.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueConversation.LifecycleState

The lifecycleState to set.

Returns
TypeDescription
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.v2beta1.Conversation.LifecycleState lifecycle_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Conversation.Builder

This builder for chaining.

setPhoneNumber(ConversationPhoneNumber value)

public Conversation.Builder setPhoneNumber(ConversationPhoneNumber value)

Output only. Required if the conversation is to be connected over telephony.

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

Parameter
NameDescription
valueConversationPhoneNumber
Returns
TypeDescription
Conversation.Builder

setPhoneNumber(ConversationPhoneNumber.Builder builderForValue)

public Conversation.Builder setPhoneNumber(ConversationPhoneNumber.Builder builderForValue)

Output only. Required if the conversation is to be connected over telephony.

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

Parameter
NameDescription
builderForValueConversationPhoneNumber.Builder
Returns
TypeDescription
Conversation.Builder

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

public Conversation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Conversation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Conversation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Conversation.Builder
Overrides