Class ArtifactChunk.Builder (0.19.0)

public static final class ArtifactChunk.Builder extends GeneratedMessage.Builder<ArtifactChunk.Builder> implements ArtifactChunkOrBuilder

A streamed fragment of a document artifact (e.g. a markdown TDD) that the assistant is generating. Content deltas stream while the document is being written so clients can render a live preview; the FINALIZED chunk carries the GCS URI once the file has been persisted.

Protobuf type google.cloud.ces.v1beta.ArtifactChunk

Static Methods

getDescriptor()

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

Methods

build()

public ArtifactChunk build()
Returns
Type Description
ArtifactChunk

buildPartial()

public ArtifactChunk buildPartial()
Returns
Type Description
ArtifactChunk

clear()

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

clearArtifactId()

public ArtifactChunk.Builder clearArtifactId()

Identifier of the artifact, stable across all chunks of one artifact within the stream.

string artifact_id = 1;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

clearContentDelta()

public ArtifactChunk.Builder clearContentDelta()

Incremental artifact content. Set on DELTA chunks.

string content_delta = 4;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

clearDisplayName()

public ArtifactChunk.Builder clearDisplayName()

The file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).

string display_name = 2;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

clearGcsUri()

public ArtifactChunk.Builder clearGcsUri()

The GCS object the artifact was persisted to. Set on FINALIZED chunks.

string gcs_uri = 5;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

clearMimeType()

public ArtifactChunk.Builder clearMimeType()

The IANA media type of the artifact content, e.g. "text/markdown".

string mime_type = 3;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

clearState()

public ArtifactChunk.Builder clearState()

Lifecycle position of this chunk.

.google.cloud.ces.v1beta.ArtifactChunk.State state = 6;

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

getArtifactId()

public String getArtifactId()

Identifier of the artifact, stable across all chunks of one artifact within the stream.

string artifact_id = 1;

Returns
Type Description
String

The artifactId.

getArtifactIdBytes()

public ByteString getArtifactIdBytes()

Identifier of the artifact, stable across all chunks of one artifact within the stream.

string artifact_id = 1;

Returns
Type Description
ByteString

The bytes for artifactId.

getContentDelta()

public String getContentDelta()

Incremental artifact content. Set on DELTA chunks.

string content_delta = 4;

Returns
Type Description
String

The contentDelta.

getContentDeltaBytes()

public ByteString getContentDeltaBytes()

Incremental artifact content. Set on DELTA chunks.

string content_delta = 4;

Returns
Type Description
ByteString

The bytes for contentDelta.

getDefaultInstanceForType()

public ArtifactChunk getDefaultInstanceForType()
Returns
Type Description
ArtifactChunk

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

The file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).

string display_name = 2;

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).

string display_name = 2;

Returns
Type Description
ByteString

The bytes for displayName.

getGcsUri()

public String getGcsUri()

The GCS object the artifact was persisted to. Set on FINALIZED chunks.

string gcs_uri = 5;

Returns
Type Description
String

The gcsUri.

getGcsUriBytes()

public ByteString getGcsUriBytes()

The GCS object the artifact was persisted to. Set on FINALIZED chunks.

string gcs_uri = 5;

Returns
Type Description
ByteString

The bytes for gcsUri.

getMimeType()

public String getMimeType()

The IANA media type of the artifact content, e.g. "text/markdown".

string mime_type = 3;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

The IANA media type of the artifact content, e.g. "text/markdown".

string mime_type = 3;

Returns
Type Description
ByteString

The bytes for mimeType.

getState()

public ArtifactChunk.State getState()

Lifecycle position of this chunk.

.google.cloud.ces.v1beta.ArtifactChunk.State state = 6;

Returns
Type Description
ArtifactChunk.State

The state.

getStateValue()

public int getStateValue()

Lifecycle position of this chunk.

.google.cloud.ces.v1beta.ArtifactChunk.State state = 6;

Returns
Type Description
int

The enum numeric value on the wire for state.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ArtifactChunk other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setArtifactId(String value)

public ArtifactChunk.Builder setArtifactId(String value)

Identifier of the artifact, stable across all chunks of one artifact within the stream.

string artifact_id = 1;

Parameter
Name Description
value String

The artifactId to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setArtifactIdBytes(ByteString value)

public ArtifactChunk.Builder setArtifactIdBytes(ByteString value)

Identifier of the artifact, stable across all chunks of one artifact within the stream.

string artifact_id = 1;

Parameter
Name Description
value ByteString

The bytes for artifactId to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setContentDelta(String value)

public ArtifactChunk.Builder setContentDelta(String value)

Incremental artifact content. Set on DELTA chunks.

string content_delta = 4;

Parameter
Name Description
value String

The contentDelta to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setContentDeltaBytes(ByteString value)

public ArtifactChunk.Builder setContentDeltaBytes(ByteString value)

Incremental artifact content. Set on DELTA chunks.

string content_delta = 4;

Parameter
Name Description
value ByteString

The bytes for contentDelta to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setDisplayName(String value)

public ArtifactChunk.Builder setDisplayName(String value)

The file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).

string display_name = 2;

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public ArtifactChunk.Builder setDisplayNameBytes(ByteString value)

The file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).

string display_name = 2;

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setGcsUri(String value)

public ArtifactChunk.Builder setGcsUri(String value)

The GCS object the artifact was persisted to. Set on FINALIZED chunks.

string gcs_uri = 5;

Parameter
Name Description
value String

The gcsUri to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setGcsUriBytes(ByteString value)

public ArtifactChunk.Builder setGcsUriBytes(ByteString value)

The GCS object the artifact was persisted to. Set on FINALIZED chunks.

string gcs_uri = 5;

Parameter
Name Description
value ByteString

The bytes for gcsUri to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setMimeType(String value)

public ArtifactChunk.Builder setMimeType(String value)

The IANA media type of the artifact content, e.g. "text/markdown".

string mime_type = 3;

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public ArtifactChunk.Builder setMimeTypeBytes(ByteString value)

The IANA media type of the artifact content, e.g. "text/markdown".

string mime_type = 3;

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setState(ArtifactChunk.State value)

public ArtifactChunk.Builder setState(ArtifactChunk.State value)

Lifecycle position of this chunk.

.google.cloud.ces.v1beta.ArtifactChunk.State state = 6;

Parameter
Name Description
value ArtifactChunk.State

The state to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.

setStateValue(int value)

public ArtifactChunk.Builder setStateValue(int value)

Lifecycle position of this chunk.

.google.cloud.ces.v1beta.ArtifactChunk.State state = 6;

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
ArtifactChunk.Builder

This builder for chaining.