public static final class Session.Builder extends com.google.protobuf.GeneratedMessage.Builder<Session.Builder> implements SessionOrBuilder
External session proto definition.Protobuf type
google.cloud.discoveryengine.v1.Session| Modifier and Type | Method and Description |
|---|---|
Session.Builder |
addAllLabels(Iterable<String> values)
Optional.
|
Session.Builder |
addAllTurns(Iterable<? extends Session.Turn> values)
Turns.
|
Session.Builder |
addLabels(String value)
Optional.
|
Session.Builder |
addLabelsBytes(com.google.protobuf.ByteString value)
Optional.
|
Session.Builder |
addTurns(int index,
Session.Turn.Builder builderForValue)
Turns.
|
Session.Builder |
addTurns(int index,
Session.Turn value)
Turns.
|
Session.Builder |
addTurns(Session.Turn.Builder builderForValue)
Turns.
|
Session.Builder |
addTurns(Session.Turn value)
Turns.
|
Session.Turn.Builder |
addTurnsBuilder()
Turns.
|
Session.Turn.Builder |
addTurnsBuilder(int index)
Turns.
|
Session |
build() |
Session |
buildPartial() |
Session.Builder |
clear() |
Session.Builder |
clearDisplayName()
Optional.
|
Session.Builder |
clearEndTime()
Output only.
|
Session.Builder |
clearIsPinned()
Optional.
|
Session.Builder |
clearLabels()
Optional.
|
Session.Builder |
clearName()
Immutable.
|
Session.Builder |
clearStartTime()
Output only.
|
Session.Builder |
clearState()
The state of the session.
|
Session.Builder |
clearTurns()
Turns.
|
Session.Builder |
clearUserPseudoId()
A unique identifier for tracking users.
|
Session |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getDisplayName()
Optional.
|
com.google.protobuf.ByteString |
getDisplayNameBytes()
Optional.
|
com.google.protobuf.Timestamp |
getEndTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getEndTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getEndTimeOrBuilder()
Output only.
|
boolean |
getIsPinned()
Optional.
|
String |
getLabels(int index)
Optional.
|
com.google.protobuf.ByteString |
getLabelsBytes(int index)
Optional.
|
int |
getLabelsCount()
Optional.
|
com.google.protobuf.ProtocolStringList |
getLabelsList()
Optional.
|
String |
getName()
Immutable.
|
com.google.protobuf.ByteString |
getNameBytes()
Immutable.
|
com.google.protobuf.Timestamp |
getStartTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getStartTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getStartTimeOrBuilder()
Output only.
|
Session.State |
getState()
The state of the session.
|
int |
getStateValue()
The state of the session.
|
Session.Turn |
getTurns(int index)
Turns.
|
Session.Turn.Builder |
getTurnsBuilder(int index)
Turns.
|
List<Session.Turn.Builder> |
getTurnsBuilderList()
Turns.
|
int |
getTurnsCount()
Turns.
|
List<Session.Turn> |
getTurnsList()
Turns.
|
Session.TurnOrBuilder |
getTurnsOrBuilder(int index)
Turns.
|
List<? extends Session.TurnOrBuilder> |
getTurnsOrBuilderList()
Turns.
|
String |
getUserPseudoId()
A unique identifier for tracking users.
|
com.google.protobuf.ByteString |
getUserPseudoIdBytes()
A unique identifier for tracking users.
|
boolean |
hasEndTime()
Output only.
|
boolean |
hasStartTime()
Output only.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Session.Builder |
mergeEndTime(com.google.protobuf.Timestamp value)
Output only.
|
Session.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Session.Builder |
mergeFrom(com.google.protobuf.Message other) |
Session.Builder |
mergeFrom(Session other) |
Session.Builder |
mergeStartTime(com.google.protobuf.Timestamp value)
Output only.
|
Session.Builder |
removeTurns(int index)
Turns.
|
Session.Builder |
setDisplayName(String value)
Optional.
|
Session.Builder |
setDisplayNameBytes(com.google.protobuf.ByteString value)
Optional.
|
Session.Builder |
setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
Session.Builder |
setEndTime(com.google.protobuf.Timestamp value)
Output only.
|
Session.Builder |
setIsPinned(boolean value)
Optional.
|
Session.Builder |
setLabels(int index,
String value)
Optional.
|
Session.Builder |
setName(String value)
Immutable.
|
Session.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Immutable.
|
Session.Builder |
setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
Session.Builder |
setStartTime(com.google.protobuf.Timestamp value)
Output only.
|
Session.Builder |
setState(Session.State value)
The state of the session.
|
Session.Builder |
setStateValue(int value)
The state of the session.
|
Session.Builder |
setTurns(int index,
Session.Turn.Builder builderForValue)
Turns.
|
Session.Builder |
setTurns(int index,
Session.Turn value)
Turns.
|
Session.Builder |
setUserPseudoId(String value)
A unique identifier for tracking users.
|
Session.Builder |
setUserPseudoIdBytes(com.google.protobuf.ByteString value)
A unique identifier for tracking users.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>public Session.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>public Session getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Session build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Session buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Session.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Session.Builder>public Session.Builder mergeFrom(Session other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>public Session.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Session.Builder>IOExceptionpublic String getName()
Immutable. Fully qualified name
`projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];getName in interface SessionOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Immutable. Fully qualified name
`projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];getNameBytes in interface SessionOrBuilderpublic Session.Builder setName(String value)
Immutable. Fully qualified name
`projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];value - The name to set.public Session.Builder clearName()
Immutable. Fully qualified name
`projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];public Session.Builder setNameBytes(com.google.protobuf.ByteString value)
Immutable. Fully qualified name
`projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];value - The bytes for name to set.public String getDisplayName()
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];getDisplayName in interface SessionOrBuilderpublic com.google.protobuf.ByteString getDisplayNameBytes()
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];getDisplayNameBytes in interface SessionOrBuilderpublic Session.Builder setDisplayName(String value)
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];value - The displayName to set.public Session.Builder clearDisplayName()
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];public Session.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
string display_name = 7 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for displayName to set.public int getStateValue()
The state of the session.
.google.cloud.discoveryengine.v1.Session.State state = 2;getStateValue in interface SessionOrBuilderpublic Session.Builder setStateValue(int value)
The state of the session.
.google.cloud.discoveryengine.v1.Session.State state = 2;value - The enum numeric value on the wire for state to set.public Session.State getState()
The state of the session.
.google.cloud.discoveryengine.v1.Session.State state = 2;getState in interface SessionOrBuilderpublic Session.Builder setState(Session.State value)
The state of the session.
.google.cloud.discoveryengine.v1.Session.State state = 2;value - The state to set.public Session.Builder clearState()
The state of the session.
.google.cloud.discoveryengine.v1.Session.State state = 2;public String getUserPseudoId()
A unique identifier for tracking users.
string user_pseudo_id = 3;getUserPseudoId in interface SessionOrBuilderpublic com.google.protobuf.ByteString getUserPseudoIdBytes()
A unique identifier for tracking users.
string user_pseudo_id = 3;getUserPseudoIdBytes in interface SessionOrBuilderpublic Session.Builder setUserPseudoId(String value)
A unique identifier for tracking users.
string user_pseudo_id = 3;value - The userPseudoId to set.public Session.Builder clearUserPseudoId()
A unique identifier for tracking users.
string user_pseudo_id = 3;public Session.Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value)
A unique identifier for tracking users.
string user_pseudo_id = 3;value - The bytes for userPseudoId to set.public List<Session.Turn> getTurnsList()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;getTurnsList in interface SessionOrBuilderpublic int getTurnsCount()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;getTurnsCount in interface SessionOrBuilderpublic Session.Turn getTurns(int index)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;getTurns in interface SessionOrBuilderpublic Session.Builder setTurns(int index, Session.Turn value)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder setTurns(int index, Session.Turn.Builder builderForValue)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder addTurns(Session.Turn value)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder addTurns(int index, Session.Turn value)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder addTurns(Session.Turn.Builder builderForValue)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder addTurns(int index, Session.Turn.Builder builderForValue)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder addAllTurns(Iterable<? extends Session.Turn> values)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder clearTurns()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Builder removeTurns(int index)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Turn.Builder getTurnsBuilder(int index)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.TurnOrBuilder getTurnsOrBuilder(int index)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;getTurnsOrBuilder in interface SessionOrBuilderpublic List<? extends Session.TurnOrBuilder> getTurnsOrBuilderList()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;getTurnsOrBuilderList in interface SessionOrBuilderpublic Session.Turn.Builder addTurnsBuilder()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public Session.Turn.Builder addTurnsBuilder(int index)
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public List<Session.Turn.Builder> getTurnsBuilderList()
Turns.
repeated .google.cloud.discoveryengine.v1.Session.Turn turns = 4;public com.google.protobuf.ProtocolStringList getLabelsList()
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];getLabelsList in interface SessionOrBuilderpublic int getLabelsCount()
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];getLabelsCount in interface SessionOrBuilderpublic String getLabels(int index)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];getLabels in interface SessionOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getLabelsBytes(int index)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];getLabelsBytes in interface SessionOrBuilderindex - The index of the value to return.public Session.Builder setLabels(int index, String value)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];index - The index to set the value at.value - The labels to set.public Session.Builder addLabels(String value)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];value - The labels to add.public Session.Builder addAllLabels(Iterable<String> values)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];values - The labels to add.public Session.Builder clearLabels()
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];public Session.Builder addLabelsBytes(com.google.protobuf.ByteString value)
Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL];value - The bytes of the labels to add.public boolean hasStartTime()
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasStartTime in interface SessionOrBuilderpublic com.google.protobuf.Timestamp getStartTime()
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
getStartTime in interface SessionOrBuilderpublic Session.Builder setStartTime(com.google.protobuf.Timestamp value)
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder mergeStartTime(com.google.protobuf.Timestamp value)
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder clearStartTime()
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
Output only. The time the session started.
.google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
getStartTimeOrBuilder in interface SessionOrBuilderpublic boolean hasEndTime()
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasEndTime in interface SessionOrBuilderpublic com.google.protobuf.Timestamp getEndTime()
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getEndTime in interface SessionOrBuilderpublic Session.Builder setEndTime(com.google.protobuf.Timestamp value)
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder mergeEndTime(com.google.protobuf.Timestamp value)
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Session.Builder clearEndTime()
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
Output only. The time the session finished.
.google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getEndTimeOrBuilder in interface SessionOrBuilderpublic boolean getIsPinned()
Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
bool is_pinned = 8 [(.google.api.field_behavior) = OPTIONAL];getIsPinned in interface SessionOrBuilderpublic Session.Builder setIsPinned(boolean value)
Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
bool is_pinned = 8 [(.google.api.field_behavior) = OPTIONAL];value - The isPinned to set.public Session.Builder clearIsPinned()
Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
bool is_pinned = 8 [(.google.api.field_behavior) = OPTIONAL];Copyright © 2026 Google LLC. All rights reserved.