Class Session.Turn

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.Session.Turn
All Implemented Interfaces:
Session.TurnOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
Session

public static final class Session.Turn extends com.google.protobuf.GeneratedMessage implements Session.TurnOrBuilder
 Represents a turn, including a query from the user and a
 answer from service.
 
Protobuf type google.cloud.discoveryengine.v1beta.Session.Turn
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Represents a turn, including a query from the user and a answer from service.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Optional.
    boolean
     
    Optional.
    com.google.protobuf.ByteString
    Optional.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    Output only.
    Output only.
    com.google.protobuf.Parser<Session.Turn>
     
    Optional.
    Deprecated.
    int
    Optional.
    Optional.
    Optional.
    Optional.
    Optional.
    int
     
    boolean
    Output only.
    int
     
    boolean
    Optional.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Session.Turn>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • QUERY_FIELD_NUMBER

      public static final int QUERY_FIELD_NUMBER
      See Also:
    • ANSWER_FIELD_NUMBER

      public static final int ANSWER_FIELD_NUMBER
      See Also:
    • DETAILED_ANSWER_FIELD_NUMBER

      public static final int DETAILED_ANSWER_FIELD_NUMBER
      See Also:
    • QUERY_CONFIG_FIELD_NUMBER

      public static final int QUERY_CONFIG_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • hasQuery

      public boolean hasQuery()
       Optional. The user query. May not be set if this turn is merely
       regenerating an answer to a different turn
       
      .google.cloud.discoveryengine.v1beta.Query query = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasQuery in interface Session.TurnOrBuilder
      Returns:
      Whether the query field is set.
    • getQuery

      public Query getQuery()
       Optional. The user query. May not be set if this turn is merely
       regenerating an answer to a different turn
       
      .google.cloud.discoveryengine.v1beta.Query query = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQuery in interface Session.TurnOrBuilder
      Returns:
      The query.
    • getQueryOrBuilder

      public QueryOrBuilder getQueryOrBuilder()
       Optional. The user query. May not be set if this turn is merely
       regenerating an answer to a different turn
       
      .google.cloud.discoveryengine.v1beta.Query query = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQueryOrBuilder in interface Session.TurnOrBuilder
    • getAnswer

      public String getAnswer()
       Optional. The resource name of the answer to the user query.
      
       Only set if the answer generation (/answer API call) happened in this
       turn.
       
      string answer = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAnswer in interface Session.TurnOrBuilder
      Returns:
      The answer.
    • getAnswerBytes

      public com.google.protobuf.ByteString getAnswerBytes()
       Optional. The resource name of the answer to the user query.
      
       Only set if the answer generation (/answer API call) happened in this
       turn.
       
      string answer = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAnswerBytes in interface Session.TurnOrBuilder
      Returns:
      The bytes for answer.
    • hasDetailedAnswer

      public boolean hasDetailedAnswer()
       Output only. In
       [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
       API, if
       [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
       is set to true, this field will be populated when getting answer query
       session.
       
      .google.cloud.discoveryengine.v1beta.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasDetailedAnswer in interface Session.TurnOrBuilder
      Returns:
      Whether the detailedAnswer field is set.
    • getDetailedAnswer

      public Answer getDetailedAnswer()
       Output only. In
       [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
       API, if
       [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
       is set to true, this field will be populated when getting answer query
       session.
       
      .google.cloud.discoveryengine.v1beta.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDetailedAnswer in interface Session.TurnOrBuilder
      Returns:
      The detailedAnswer.
    • getDetailedAnswerOrBuilder

      public AnswerOrBuilder getDetailedAnswerOrBuilder()
       Output only. In
       [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
       API, if
       [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
       is set to true, this field will be populated when getting answer query
       session.
       
      .google.cloud.discoveryengine.v1beta.Answer detailed_answer = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDetailedAnswerOrBuilder in interface Session.TurnOrBuilder
    • getQueryConfigCount

      public int getQueryConfigCount()
      Description copied from interface: Session.TurnOrBuilder
       Optional. Represents metadata related to the query config, for example
       LLM model and version used, model parameters (temperature, grounding
       parameters, etc.). The prefix "google." is reserved for Google-developed
       functionality.
       
      map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQueryConfigCount in interface Session.TurnOrBuilder
    • containsQueryConfig

      public boolean containsQueryConfig(String key)
       Optional. Represents metadata related to the query config, for example
       LLM model and version used, model parameters (temperature, grounding
       parameters, etc.). The prefix "google." is reserved for Google-developed
       functionality.
       
      map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsQueryConfig in interface Session.TurnOrBuilder
    • getQueryConfig

      @Deprecated public Map<String,String> getQueryConfig()
      Deprecated.
      Use getQueryConfigMap() instead.
      Specified by:
      getQueryConfig in interface Session.TurnOrBuilder
    • getQueryConfigMap

      public Map<String,String> getQueryConfigMap()
       Optional. Represents metadata related to the query config, for example
       LLM model and version used, model parameters (temperature, grounding
       parameters, etc.). The prefix "google." is reserved for Google-developed
       functionality.
       
      map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQueryConfigMap in interface Session.TurnOrBuilder
    • getQueryConfigOrDefault

      public String getQueryConfigOrDefault(String key, String defaultValue)
       Optional. Represents metadata related to the query config, for example
       LLM model and version used, model parameters (temperature, grounding
       parameters, etc.). The prefix "google." is reserved for Google-developed
       functionality.
       
      map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQueryConfigOrDefault in interface Session.TurnOrBuilder
    • getQueryConfigOrThrow

      public String getQueryConfigOrThrow(String key)
       Optional. Represents metadata related to the query config, for example
       LLM model and version used, model parameters (temperature, grounding
       parameters, etc.). The prefix "google." is reserved for Google-developed
       functionality.
       
      map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getQueryConfigOrThrow in interface Session.TurnOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Session.Turn parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Session.Turn parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Session.Turn parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Session.Turn parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Session.Turn parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Session.Turn parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Session.Turn parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Session.Turn.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Session.Turn.Builder newBuilder()
    • newBuilder

      public static Session.Turn.Builder newBuilder(Session.Turn prototype)
    • toBuilder

      public Session.Turn.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Session.Turn.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Session.Turn getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Session.Turn> parser()
    • getParserForType

      public com.google.protobuf.Parser<Session.Turn> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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