Class GroundingFact.Builder (0.79.0)

public static final class GroundingFact.Builder extends GeneratedMessage.Builder<GroundingFact.Builder> implements GroundingFactOrBuilder

Grounding Fact.

Protobuf type google.cloud.discoveryengine.v1beta.GroundingFact

Static Methods

getDescriptor()

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

Methods

build()

public GroundingFact build()
Returns
Type Description
GroundingFact

buildPartial()

public GroundingFact buildPartial()
Returns
Type Description
GroundingFact

clear()

public GroundingFact.Builder clear()
Returns
Type Description
GroundingFact.Builder
Overrides

clearAttributes()

public GroundingFact.Builder clearAttributes()
Returns
Type Description
GroundingFact.Builder

clearFactText()

public GroundingFact.Builder clearFactText()

Text content of the fact. Can be at most 10K characters long.

string fact_text = 1;

Returns
Type Description
GroundingFact.Builder

This builder for chaining.

containsAttributes(String key)

public boolean containsAttributes(String key)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAttributes() (deprecated)

public Map<String,String> getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
Map<String,String>

getAttributesCount()

public int getAttributesCount()

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Returns
Type Description
int

getAttributesMap()

public Map<String,String> getAttributesMap()

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Returns
Type Description
Map<String,String>

getAttributesOrDefault(String key, String defaultValue)

public String getAttributesOrDefault(String key, String defaultValue)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAttributesOrThrow(String key)

public String getAttributesOrThrow(String key)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameter
Name Description
key String
Returns
Type Description
String

getDefaultInstanceForType()

public GroundingFact getDefaultInstanceForType()
Returns
Type Description
GroundingFact

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFactText()

public String getFactText()

Text content of the fact. Can be at most 10K characters long.

string fact_text = 1;

Returns
Type Description
String

The factText.

getFactTextBytes()

public ByteString getFactTextBytes()

Text content of the fact. Can be at most 10K characters long.

string fact_text = 1;

Returns
Type Description
ByteString

The bytes for factText.

getMutableAttributes() (deprecated)

public Map<String,String> getMutableAttributes()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessage.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.GeneratedMessage.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GroundingFact other)

public GroundingFact.Builder mergeFrom(GroundingFact other)
Parameter
Name Description
other GroundingFact
Returns
Type Description
GroundingFact.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GroundingFact.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GroundingFact.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GroundingFact.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GroundingFact.Builder
Overrides

putAllAttributes(Map<String,String> values)

public GroundingFact.Builder putAllAttributes(Map<String,String> values)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
GroundingFact.Builder

putAttributes(String key, String value)

public GroundingFact.Builder putAttributes(String key, String value)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameters
Name Description
key String
value String
Returns
Type Description
GroundingFact.Builder

removeAttributes(String key)

public GroundingFact.Builder removeAttributes(String key)

Attributes associated with the fact. Common attributes include source (indicating where the fact was sourced from), author (indicating the author of the fact), and so on.

map<string, string> attributes = 2;

Parameter
Name Description
key String
Returns
Type Description
GroundingFact.Builder

setFactText(String value)

public GroundingFact.Builder setFactText(String value)

Text content of the fact. Can be at most 10K characters long.

string fact_text = 1;

Parameter
Name Description
value String

The factText to set.

Returns
Type Description
GroundingFact.Builder

This builder for chaining.

setFactTextBytes(ByteString value)

public GroundingFact.Builder setFactTextBytes(ByteString value)

Text content of the fact. Can be at most 10K characters long.

string fact_text = 1;

Parameter
Name Description
value ByteString

The bytes for factText to set.

Returns
Type Description
GroundingFact.Builder

This builder for chaining.