Class CitedSource.Snippet (0.67.0)

public static final class CitedSource.Snippet extends GeneratedMessage implements CitedSource.SnippetOrBuilder

A snippet object representing an excerpt from a larger corpus.

Protobuf type google.chat.v1.CitedSource.Snippet

Static Fields

IMAGE_PREVIEW_FIELD_NUMBER

public static final int IMAGE_PREVIEW_FIELD_NUMBER
Field Value
Type Description
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CitedSource.Snippet getDefaultInstance()
Returns
Type Description
CitedSource.Snippet

getDescriptor()

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

newBuilder()

public static CitedSource.Snippet.Builder newBuilder()
Returns
Type Description
CitedSource.Snippet.Builder

newBuilder(CitedSource.Snippet prototype)

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

parseDelimitedFrom(InputStream input)

public static CitedSource.Snippet parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CitedSource.Snippet
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static CitedSource.Snippet parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CitedSource.Snippet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static CitedSource.Snippet parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CitedSource.Snippet
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static CitedSource.Snippet parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CitedSource.Snippet
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static CitedSource.Snippet parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CitedSource.Snippet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<CitedSource.Snippet> parser()
Returns
Type Description
Parser<Snippet>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public CitedSource.Snippet getDefaultInstanceForType()
Returns
Type Description
CitedSource.Snippet

getImagePreview()

public ElementsImage getImagePreview()

Optional. Image preview of the snippet provided as an input when creating the citation.

.google.chat.v1.ElementsImage image_preview = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ElementsImage

The imagePreview.

getImagePreviewOrBuilder()

public ElementsImageOrBuilder getImagePreviewOrBuilder()

Optional. Image preview of the snippet provided as an input when creating the citation.

.google.chat.v1.ElementsImage image_preview = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ElementsImageOrBuilder

getParserForType()

public Parser<CitedSource.Snippet> getParserForType()
Returns
Type Description
Parser<Snippet>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getText()

public String getText()

Optional. A short plaintext excerpt directly from the corpus that is rendered in the citation hover card or source preview. When footer sources are automatically populated from inline citations (because Elements.cited_sources is not set), snippets are omitted from the deduplicated footer sources. Does not support markdown format, and must not exceed 1,000 characters.

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Optional. A short plaintext excerpt directly from the corpus that is rendered in the citation hover card or source preview. When footer sources are automatically populated from inline citations (because Elements.cited_sources is not set), snippets are omitted from the deduplicated footer sources. Does not support markdown format, and must not exceed 1,000 characters.

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for text.

hasImagePreview()

public boolean hasImagePreview()

Optional. Image preview of the snippet provided as an input when creating the citation.

.google.chat.v1.ElementsImage image_preview = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the imagePreview field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CitedSource.Snippet.Builder newBuilderForType()
Returns
Type Description
CitedSource.Snippet.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected CitedSource.Snippet.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CitedSource.Snippet.Builder
Overrides

toBuilder()

public CitedSource.Snippet.Builder toBuilder()
Returns
Type Description
CitedSource.Snippet.Builder

writeTo(CodedOutputStream output)

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