Class GenerateGroundedContentRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest
All Implemented Interfaces:
GenerateGroundedContentRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class GenerateGroundedContentRequest extends com.google.protobuf.GeneratedMessage implements GenerateGroundedContentRequestOrBuilder
 Top-level message sent by the client for the `GenerateGroundedContent`
 method.
 
Protobuf type google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest
See Also:
  • Field Details

    • LOCATION_FIELD_NUMBER

      public static final int LOCATION_FIELD_NUMBER
      See Also:
    • SYSTEM_INSTRUCTION_FIELD_NUMBER

      public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER
      See Also:
    • CONTENTS_FIELD_NUMBER

      public static final int CONTENTS_FIELD_NUMBER
      See Also:
    • GENERATION_SPEC_FIELD_NUMBER

      public static final int GENERATION_SPEC_FIELD_NUMBER
      See Also:
    • GROUNDING_SPEC_FIELD_NUMBER

      public static final int GROUNDING_SPEC_FIELD_NUMBER
      See Also:
    • USER_LABELS_FIELD_NUMBER

      public static final int USER_LABELS_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
    • getLocation

      public String getLocation()
       Required. Location resource.
      
       Format: `projects/{project}/locations/{location}`.
       
      string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getLocation in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       Required. Location resource.
      
       Format: `projects/{project}/locations/{location}`.
       
      string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getLocationBytes in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      The bytes for location.
    • hasSystemInstruction

      public boolean hasSystemInstruction()
       Content of the system instruction for the current API.
      
       These instructions will take priority over any other prompt instructions
       if the selected model is supporting them.
       
      .google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;
      Specified by:
      hasSystemInstruction in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      Whether the systemInstruction field is set.
    • getSystemInstruction

      public GroundedGenerationContent getSystemInstruction()
       Content of the system instruction for the current API.
      
       These instructions will take priority over any other prompt instructions
       if the selected model is supporting them.
       
      .google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;
      Specified by:
      getSystemInstruction in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      The systemInstruction.
    • getSystemInstructionOrBuilder

      public GroundedGenerationContentOrBuilder getSystemInstructionOrBuilder()
       Content of the system instruction for the current API.
      
       These instructions will take priority over any other prompt instructions
       if the selected model is supporting them.
       
      .google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;
      Specified by:
      getSystemInstructionOrBuilder in interface GenerateGroundedContentRequestOrBuilder
    • getContentsList

      public List<GroundedGenerationContent> getContentsList()
       Content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;
      Specified by:
      getContentsList in interface GenerateGroundedContentRequestOrBuilder
    • getContentsOrBuilderList

      public List<? extends GroundedGenerationContentOrBuilder> getContentsOrBuilderList()
       Content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;
      Specified by:
      getContentsOrBuilderList in interface GenerateGroundedContentRequestOrBuilder
    • getContentsCount

      public int getContentsCount()
       Content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;
      Specified by:
      getContentsCount in interface GenerateGroundedContentRequestOrBuilder
    • getContents

      public GroundedGenerationContent getContents(int index)
       Content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;
      Specified by:
      getContents in interface GenerateGroundedContentRequestOrBuilder
    • getContentsOrBuilder

      public GroundedGenerationContentOrBuilder getContentsOrBuilder(int index)
       Content of the current conversation with the model.
      
       For single-turn queries, this is a single instance. For multi-turn queries,
       this is a repeated field that contains conversation history + latest
       request.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;
      Specified by:
      getContentsOrBuilder in interface GenerateGroundedContentRequestOrBuilder
    • hasGenerationSpec

      public boolean hasGenerationSpec()
       Content generation specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;
      Specified by:
      hasGenerationSpec in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      Whether the generationSpec field is set.
    • getGenerationSpec

       Content generation specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;
      Specified by:
      getGenerationSpec in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      The generationSpec.
    • getGenerationSpecOrBuilder

      public GenerateGroundedContentRequest.GenerationSpecOrBuilder getGenerationSpecOrBuilder()
       Content generation specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;
      Specified by:
      getGenerationSpecOrBuilder in interface GenerateGroundedContentRequestOrBuilder
    • hasGroundingSpec

      public boolean hasGroundingSpec()
       Grounding specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;
      Specified by:
      hasGroundingSpec in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      Whether the groundingSpec field is set.
    • getGroundingSpec

       Grounding specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;
      Specified by:
      getGroundingSpec in interface GenerateGroundedContentRequestOrBuilder
      Returns:
      The groundingSpec.
    • getGroundingSpecOrBuilder

      public GenerateGroundedContentRequest.GroundingSpecOrBuilder getGroundingSpecOrBuilder()
       Grounding specification.
       
      .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;
      Specified by:
      getGroundingSpecOrBuilder in interface GenerateGroundedContentRequestOrBuilder
    • getUserLabelsCount

      public int getUserLabelsCount()
      Description copied from interface: GenerateGroundedContentRequestOrBuilder
       The user labels applied to a resource must meet the following requirements:
      
       * Each resource can have multiple labels, up to a maximum of 64.
       * Each label must be a key-value pair.
       * Keys have a minimum length of 1 character and a maximum length of 63
       characters and cannot be empty. Values can be empty and have a maximum
       length of 63 characters.
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes. All characters must use UTF-8 encoding, and
       international characters are allowed.
       * The key portion of a label must be unique. However, you can use the same
       key with multiple resources.
       * Keys must start with a lowercase letter or international character.
      
       See [Google Cloud
       Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 6;
      Specified by:
      getUserLabelsCount in interface GenerateGroundedContentRequestOrBuilder
    • containsUserLabels

      public boolean containsUserLabels(String key)
       The user labels applied to a resource must meet the following requirements:
      
       * Each resource can have multiple labels, up to a maximum of 64.
       * Each label must be a key-value pair.
       * Keys have a minimum length of 1 character and a maximum length of 63
       characters and cannot be empty. Values can be empty and have a maximum
       length of 63 characters.
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes. All characters must use UTF-8 encoding, and
       international characters are allowed.
       * The key portion of a label must be unique. However, you can use the same
       key with multiple resources.
       * Keys must start with a lowercase letter or international character.
      
       See [Google Cloud
       Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 6;
      Specified by:
      containsUserLabels in interface GenerateGroundedContentRequestOrBuilder
    • getUserLabels

      @Deprecated public Map<String,String> getUserLabels()
      Deprecated.
      Use getUserLabelsMap() instead.
      Specified by:
      getUserLabels in interface GenerateGroundedContentRequestOrBuilder
    • getUserLabelsMap

      public Map<String,String> getUserLabelsMap()
       The user labels applied to a resource must meet the following requirements:
      
       * Each resource can have multiple labels, up to a maximum of 64.
       * Each label must be a key-value pair.
       * Keys have a minimum length of 1 character and a maximum length of 63
       characters and cannot be empty. Values can be empty and have a maximum
       length of 63 characters.
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes. All characters must use UTF-8 encoding, and
       international characters are allowed.
       * The key portion of a label must be unique. However, you can use the same
       key with multiple resources.
       * Keys must start with a lowercase letter or international character.
      
       See [Google Cloud
       Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 6;
      Specified by:
      getUserLabelsMap in interface GenerateGroundedContentRequestOrBuilder
    • getUserLabelsOrDefault

      public String getUserLabelsOrDefault(String key, String defaultValue)
       The user labels applied to a resource must meet the following requirements:
      
       * Each resource can have multiple labels, up to a maximum of 64.
       * Each label must be a key-value pair.
       * Keys have a minimum length of 1 character and a maximum length of 63
       characters and cannot be empty. Values can be empty and have a maximum
       length of 63 characters.
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes. All characters must use UTF-8 encoding, and
       international characters are allowed.
       * The key portion of a label must be unique. However, you can use the same
       key with multiple resources.
       * Keys must start with a lowercase letter or international character.
      
       See [Google Cloud
       Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 6;
      Specified by:
      getUserLabelsOrDefault in interface GenerateGroundedContentRequestOrBuilder
    • getUserLabelsOrThrow

      public String getUserLabelsOrThrow(String key)
       The user labels applied to a resource must meet the following requirements:
      
       * Each resource can have multiple labels, up to a maximum of 64.
       * Each label must be a key-value pair.
       * Keys have a minimum length of 1 character and a maximum length of 63
       characters and cannot be empty. Values can be empty and have a maximum
       length of 63 characters.
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes. All characters must use UTF-8 encoding, and
       international characters are allowed.
       * The key portion of a label must be unique. However, you can use the same
       key with multiple resources.
       * Keys must start with a lowercase letter or international character.
      
       See [Google Cloud
       Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
       for more details.
       
      map<string, string> user_labels = 6;
      Specified by:
      getUserLabelsOrThrow in interface GenerateGroundedContentRequestOrBuilder
    • 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 GenerateGroundedContentRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static GenerateGroundedContentRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static GenerateGroundedContentRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

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

      public static GenerateGroundedContentRequest.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static GenerateGroundedContentRequest getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<GenerateGroundedContentRequest> 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 GenerateGroundedContentRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder