Class CheckGroundingRequest

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

@Generated public final class CheckGroundingRequest extends com.google.protobuf.GeneratedMessage implements CheckGroundingRequestOrBuilder
 Request message for
 [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding]
 method.
 
Protobuf type google.cloud.discoveryengine.v1beta.CheckGroundingRequest
See Also:
  • Field Details

    • GROUNDING_CONFIG_FIELD_NUMBER

      public static final int GROUNDING_CONFIG_FIELD_NUMBER
      See Also:
    • ANSWER_CANDIDATE_FIELD_NUMBER

      public static final int ANSWER_CANDIDATE_FIELD_NUMBER
      See Also:
    • FACTS_FIELD_NUMBER

      public static final int FACTS_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
    • getGroundingConfig

      public String getGroundingConfig()
       Required. The resource name of the grounding config, such as
       `projects/*/locations/global/groundingConfigs/default_grounding_config`.
       
      string grounding_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getGroundingConfig in interface CheckGroundingRequestOrBuilder
      Returns:
      The groundingConfig.
    • getGroundingConfigBytes

      public com.google.protobuf.ByteString getGroundingConfigBytes()
       Required. The resource name of the grounding config, such as
       `projects/*/locations/global/groundingConfigs/default_grounding_config`.
       
      string grounding_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getGroundingConfigBytes in interface CheckGroundingRequestOrBuilder
      Returns:
      The bytes for groundingConfig.
    • getAnswerCandidate

      public String getAnswerCandidate()
       Answer candidate to check. It can have a maximum length of 4096 tokens.
       
      string answer_candidate = 2;
      Specified by:
      getAnswerCandidate in interface CheckGroundingRequestOrBuilder
      Returns:
      The answerCandidate.
    • getAnswerCandidateBytes

      public com.google.protobuf.ByteString getAnswerCandidateBytes()
       Answer candidate to check. It can have a maximum length of 4096 tokens.
       
      string answer_candidate = 2;
      Specified by:
      getAnswerCandidateBytes in interface CheckGroundingRequestOrBuilder
      Returns:
      The bytes for answerCandidate.
    • getFactsList

      public List<GroundingFact> getFactsList()
       List of facts for the grounding check.
       We support up to 200 facts.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;
      Specified by:
      getFactsList in interface CheckGroundingRequestOrBuilder
    • getFactsOrBuilderList

      public List<? extends GroundingFactOrBuilder> getFactsOrBuilderList()
       List of facts for the grounding check.
       We support up to 200 facts.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;
      Specified by:
      getFactsOrBuilderList in interface CheckGroundingRequestOrBuilder
    • getFactsCount

      public int getFactsCount()
       List of facts for the grounding check.
       We support up to 200 facts.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;
      Specified by:
      getFactsCount in interface CheckGroundingRequestOrBuilder
    • getFacts

      public GroundingFact getFacts(int index)
       List of facts for the grounding check.
       We support up to 200 facts.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;
      Specified by:
      getFacts in interface CheckGroundingRequestOrBuilder
    • getFactsOrBuilder

      public GroundingFactOrBuilder getFactsOrBuilder(int index)
       List of facts for the grounding check.
       We support up to 200 facts.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;
      Specified by:
      getFactsOrBuilder in interface CheckGroundingRequestOrBuilder
    • hasGroundingSpec

      public boolean hasGroundingSpec()
       Configuration of the grounding check.
       
      .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;
      Specified by:
      hasGroundingSpec in interface CheckGroundingRequestOrBuilder
      Returns:
      Whether the groundingSpec field is set.
    • getGroundingSpec

      public CheckGroundingSpec getGroundingSpec()
       Configuration of the grounding check.
       
      .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;
      Specified by:
      getGroundingSpec in interface CheckGroundingRequestOrBuilder
      Returns:
      The groundingSpec.
    • getGroundingSpecOrBuilder

      public CheckGroundingSpecOrBuilder getGroundingSpecOrBuilder()
       Configuration of the grounding check.
       
      .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;
      Specified by:
      getGroundingSpecOrBuilder in interface CheckGroundingRequestOrBuilder
    • getUserLabelsCount

      public int getUserLabelsCount()
      Description copied from interface: CheckGroundingRequestOrBuilder
       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 = 5;
      Specified by:
      getUserLabelsCount in interface CheckGroundingRequestOrBuilder
    • 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 = 5;
      Specified by:
      containsUserLabels in interface CheckGroundingRequestOrBuilder
    • getUserLabels

      @Deprecated public Map<String,String> getUserLabels()
      Deprecated.
      Use getUserLabelsMap() instead.
      Specified by:
      getUserLabels in interface CheckGroundingRequestOrBuilder
    • 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 = 5;
      Specified by:
      getUserLabelsMap in interface CheckGroundingRequestOrBuilder
    • 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 = 5;
      Specified by:
      getUserLabelsOrDefault in interface CheckGroundingRequestOrBuilder
    • 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 = 5;
      Specified by:
      getUserLabelsOrThrow in interface CheckGroundingRequestOrBuilder
    • 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 CheckGroundingRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static CheckGroundingRequest.Builder newBuilder()
    • newBuilder

      public static CheckGroundingRequest.Builder newBuilder(CheckGroundingRequest prototype)
    • toBuilder

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

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

      public static CheckGroundingRequest getDefaultInstance()
    • parser

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

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