Class Session.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Session.Builder>
com.google.cloud.discoveryengine.v1beta.Session.Builder
All Implemented Interfaces:
SessionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Session

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.v1beta.Session
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>
    • clear

      public Session.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>
    • getDefaultInstanceForType

      public Session getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Session build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Session buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Session.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Session.Builder>
    • mergeFrom

      public Session.Builder mergeFrom(Session other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Session.Builder>
    • mergeFrom

      public Session.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Session.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Immutable. Fully qualified name
       `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface SessionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public 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];
      Specified by:
      getNameBytes in interface SessionOrBuilder
      Returns:
      The bytes for name.
    • setName

      public 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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      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];
      Returns:
      This builder for chaining.
    • setNameBytes

      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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      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];
      Specified by:
      getDisplayName in interface SessionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public 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];
      Specified by:
      getDisplayNameBytes in interface SessionOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public 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];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      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];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      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];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       The state of the session.
       
      .google.cloud.discoveryengine.v1beta.Session.State state = 2;
      Specified by:
      getStateValue in interface SessionOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Session.Builder setStateValue(int value)
       The state of the session.
       
      .google.cloud.discoveryengine.v1beta.Session.State state = 2;
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public Session.State getState()
       The state of the session.
       
      .google.cloud.discoveryengine.v1beta.Session.State state = 2;
      Specified by:
      getState in interface SessionOrBuilder
      Returns:
      The state.
    • setState

      public Session.Builder setState(Session.State value)
       The state of the session.
       
      .google.cloud.discoveryengine.v1beta.Session.State state = 2;
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Session.Builder clearState()
       The state of the session.
       
      .google.cloud.discoveryengine.v1beta.Session.State state = 2;
      Returns:
      This builder for chaining.
    • getUserPseudoId

      public String getUserPseudoId()
       A unique identifier for tracking users.
       
      string user_pseudo_id = 3;
      Specified by:
      getUserPseudoId in interface SessionOrBuilder
      Returns:
      The userPseudoId.
    • getUserPseudoIdBytes

      public com.google.protobuf.ByteString getUserPseudoIdBytes()
       A unique identifier for tracking users.
       
      string user_pseudo_id = 3;
      Specified by:
      getUserPseudoIdBytes in interface SessionOrBuilder
      Returns:
      The bytes for userPseudoId.
    • setUserPseudoId

      public Session.Builder setUserPseudoId(String value)
       A unique identifier for tracking users.
       
      string user_pseudo_id = 3;
      Parameters:
      value - The userPseudoId to set.
      Returns:
      This builder for chaining.
    • clearUserPseudoId

      public Session.Builder clearUserPseudoId()
       A unique identifier for tracking users.
       
      string user_pseudo_id = 3;
      Returns:
      This builder for chaining.
    • setUserPseudoIdBytes

      public Session.Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value)
       A unique identifier for tracking users.
       
      string user_pseudo_id = 3;
      Parameters:
      value - The bytes for userPseudoId to set.
      Returns:
      This builder for chaining.
    • getTurnsList

      public List<Session.Turn> getTurnsList()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
      Specified by:
      getTurnsList in interface SessionOrBuilder
    • getTurnsCount

      public int getTurnsCount()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
      Specified by:
      getTurnsCount in interface SessionOrBuilder
    • getTurns

      public Session.Turn getTurns(int index)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
      Specified by:
      getTurns in interface SessionOrBuilder
    • setTurns

      public Session.Builder setTurns(int index, Session.Turn value)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • setTurns

      public Session.Builder setTurns(int index, Session.Turn.Builder builderForValue)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addTurns

      public Session.Builder addTurns(Session.Turn value)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addTurns

      public Session.Builder addTurns(int index, Session.Turn value)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addTurns

      public Session.Builder addTurns(Session.Turn.Builder builderForValue)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addTurns

      public Session.Builder addTurns(int index, Session.Turn.Builder builderForValue)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addAllTurns

      public Session.Builder addAllTurns(Iterable<? extends Session.Turn> values)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • clearTurns

      public Session.Builder clearTurns()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • removeTurns

      public Session.Builder removeTurns(int index)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • getTurnsBuilder

      public Session.Turn.Builder getTurnsBuilder(int index)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • getTurnsOrBuilder

      public Session.TurnOrBuilder getTurnsOrBuilder(int index)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
      Specified by:
      getTurnsOrBuilder in interface SessionOrBuilder
    • getTurnsOrBuilderList

      public List<? extends Session.TurnOrBuilder> getTurnsOrBuilderList()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
      Specified by:
      getTurnsOrBuilderList in interface SessionOrBuilder
    • addTurnsBuilder

      public Session.Turn.Builder addTurnsBuilder()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • addTurnsBuilder

      public Session.Turn.Builder addTurnsBuilder(int index)
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • getTurnsBuilderList

      public List<Session.Turn.Builder> getTurnsBuilderList()
       Turns.
       
      repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4;
    • hasStartTime

      public boolean hasStartTime()
       Output only. The time the session started.
       
      .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasStartTime in interface SessionOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public com.google.protobuf.Timestamp getStartTime()
       Output only. The time the session started.
       
      .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStartTime in interface SessionOrBuilder
      Returns:
      The startTime.
    • setStartTime

      public 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];
    • setStartTime

      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];
    • mergeStartTime

      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];
    • clearStartTime

      public Session.Builder clearStartTime()
       Output only. The time the session started.
       
      .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getStartTimeBuilder

      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];
    • getStartTimeOrBuilder

      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];
      Specified by:
      getStartTimeOrBuilder in interface SessionOrBuilder
    • hasEndTime

      public boolean hasEndTime()
       Output only. The time the session finished.
       
      .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasEndTime in interface SessionOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       Output only. The time the session finished.
       
      .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getEndTime in interface SessionOrBuilder
      Returns:
      The endTime.
    • setEndTime

      public 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];
    • setEndTime

      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];
    • mergeEndTime

      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];
    • clearEndTime

      public Session.Builder clearEndTime()
       Output only. The time the session finished.
       
      .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getEndTimeBuilder

      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];
    • getEndTimeOrBuilder

      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];
      Specified by:
      getEndTimeOrBuilder in interface SessionOrBuilder
    • getIsPinned

      public 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];
      Specified by:
      getIsPinned in interface SessionOrBuilder
      Returns:
      The isPinned.
    • setIsPinned

      public 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];
      Parameters:
      value - The isPinned to set.
      Returns:
      This builder for chaining.
    • clearIsPinned

      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];
      Returns:
      This builder for chaining.