Class Chunk (0.36.0)

public final class Chunk extends GeneratedMessageV3 implements ChunkOrBuilder

Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.

Protobuf type google.cloud.discoveryengine.v1alpha.Chunk

Implements

ChunkOrBuilder

Static Fields

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

DERIVED_STRUCT_DATA_FIELD_NUMBER

public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER
Field Value
TypeDescription
int

DOCUMENT_METADATA_FIELD_NUMBER

public static final int DOCUMENT_METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Chunk getDefaultInstance()
Returns
TypeDescription
Chunk

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Chunk.Builder newBuilder()
Returns
TypeDescription
Chunk.Builder

newBuilder(Chunk prototype)

public static Chunk.Builder newBuilder(Chunk prototype)
Parameter
NameDescription
prototypeChunk
Returns
TypeDescription
Chunk.Builder

parseDelimitedFrom(InputStream input)

public static Chunk parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Chunk parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Chunk parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Chunk parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Chunk parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Chunk parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Chunk parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Chunk parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Chunk parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Chunk parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Chunk parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Chunk parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Chunk
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Chunk> parser()
Returns
TypeDescription
Parser<Chunk>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getContent()

public String getContent()

Content is a string from a document (parsed content).

string content = 3;

Returns
TypeDescription
String

The content.

getContentBytes()

public ByteString getContentBytes()

Content is a string from a document (parsed content).

string content = 3;

Returns
TypeDescription
ByteString

The bytes for content.

getDefaultInstanceForType()

public Chunk getDefaultInstanceForType()
Returns
TypeDescription
Chunk

getDerivedStructData()

public Struct getDerivedStructData()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Struct

The derivedStructData.

getDerivedStructDataOrBuilder()

public StructOrBuilder getDerivedStructDataOrBuilder()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StructOrBuilder

getDocumentMetadata()

public Chunk.DocumentMetadata getDocumentMetadata()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.DocumentMetadata

The documentMetadata.

getDocumentMetadataOrBuilder()

public Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.DocumentMetadataOrBuilder

getId()

public String getId()

Unique chunk id of the current chunk.

string id = 2;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Unique chunk id of the current chunk.

string id = 2;

Returns
TypeDescription
ByteString

The bytes for id.

getName()

public String getName()

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Chunk> getParserForType()
Returns
TypeDescription
Parser<Chunk>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDerivedStructData()

public boolean hasDerivedStructData()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the derivedStructData field is set.

hasDocumentMetadata()

public boolean hasDocumentMetadata()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
boolean

Whether the documentMetadata field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Chunk.Builder newBuilderForType()
Returns
TypeDescription
Chunk.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Chunk.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Chunk.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Chunk.Builder toBuilder()
Returns
TypeDescription
Chunk.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException