Class CheckGroundingRequest (0.51.0)

public final class CheckGroundingRequest extends GeneratedMessageV3 implements CheckGroundingRequestOrBuilder

Request message for GroundedGenerationService.CheckGrounding method.

Protobuf type google.cloud.discoveryengine.v1.CheckGroundingRequest

Static Fields

ANSWER_CANDIDATE_FIELD_NUMBER

public static final int ANSWER_CANDIDATE_FIELD_NUMBER
Field Value
Type Description
int

FACTS_FIELD_NUMBER

public static final int FACTS_FIELD_NUMBER
Field Value
Type Description
int

GROUNDING_CONFIG_FIELD_NUMBER

public static final int GROUNDING_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

GROUNDING_SPEC_FIELD_NUMBER

public static final int GROUNDING_SPEC_FIELD_NUMBER
Field Value
Type Description
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CheckGroundingRequest getDefaultInstance()
Returns
Type Description
CheckGroundingRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CheckGroundingRequest.Builder newBuilder()
Returns
Type Description
CheckGroundingRequest.Builder

newBuilder(CheckGroundingRequest prototype)

public static CheckGroundingRequest.Builder newBuilder(CheckGroundingRequest prototype)
Parameter
Name Description
prototype CheckGroundingRequest
Returns
Type Description
CheckGroundingRequest.Builder

parseDelimitedFrom(InputStream input)

public static CheckGroundingRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CheckGroundingRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CheckGroundingRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CheckGroundingRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CheckGroundingRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CheckGroundingRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CheckGroundingRequest> parser()
Returns
Type Description
Parser<CheckGroundingRequest>

Methods

containsUserLabels(String key)

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 for more details.

map<string, string> user_labels = 5;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAnswerCandidate()

public String getAnswerCandidate()

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Returns
Type Description
String

The answerCandidate.

getAnswerCandidateBytes()

public ByteString getAnswerCandidateBytes()

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Returns
Type Description
ByteString

The bytes for answerCandidate.

getDefaultInstanceForType()

public CheckGroundingRequest getDefaultInstanceForType()
Returns
Type Description
CheckGroundingRequest

getFacts(int index)

public GroundingFact getFacts(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFact

getFactsCount()

public int getFactsCount()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1.GroundingFact facts = 3;

Returns
Type Description
int

getFactsList()

public List<GroundingFact> getFactsList()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1.GroundingFact facts = 3;

Returns
Type Description
List<GroundingFact>

getFactsOrBuilder(int index)

public GroundingFactOrBuilder getFactsOrBuilder(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFactOrBuilder

getFactsOrBuilderList()

public List<? extends GroundingFactOrBuilder> getFactsOrBuilderList()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1.GroundingFact facts = 3;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1.GroundingFactOrBuilder>

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) = { ... }

Returns
Type Description
String

The groundingConfig.

getGroundingConfigBytes()

public 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) = { ... }

Returns
Type Description
ByteString

The bytes for groundingConfig.

getGroundingSpec()

public CheckGroundingSpec getGroundingSpec()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpec

The groundingSpec.

getGroundingSpecOrBuilder()

public CheckGroundingSpecOrBuilder getGroundingSpecOrBuilder()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpecOrBuilder

getParserForType()

public Parser<CheckGroundingRequest> getParserForType()
Returns
Type Description
Parser<CheckGroundingRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

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 for more details.

map<string, string> user_labels = 5;

Returns
Type Description
int

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 for more details.

map<string, string> user_labels = 5;

Returns
Type Description
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

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 for more details.

map<string, string> user_labels = 5;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getUserLabelsOrThrow(String key)

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 for more details.

map<string, string> user_labels = 5;

Parameter
Name Description
key String
Returns
Type Description
String

hasGroundingSpec()

public boolean hasGroundingSpec()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
boolean

Whether the groundingSpec field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CheckGroundingRequest.Builder newBuilderForType()
Returns
Type Description
CheckGroundingRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CheckGroundingRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CheckGroundingRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CheckGroundingRequest.Builder toBuilder()
Returns
Type Description
CheckGroundingRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException