Class RewriteResponse.Builder (2.13.1)

public static final class RewriteResponse.Builder extends GeneratedMessageV3.Builder<RewriteResponse.Builder> implements RewriteResponseOrBuilder

A rewrite response.

Protobuf type google.storage.v2.RewriteResponse

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RewriteResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RewriteResponse.Builder
Overrides

build()

public RewriteResponse build()
Returns
Type Description
RewriteResponse

buildPartial()

public RewriteResponse buildPartial()
Returns
Type Description
RewriteResponse

clear()

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

clearDone()

public RewriteResponse.Builder clearDone()

true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.

bool done = 3;

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public RewriteResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
RewriteResponse.Builder
Overrides

clearObjectSize()

public RewriteResponse.Builder clearObjectSize()

The total size of the object being copied in bytes. This property is always present in the response.

int64 object_size = 2;

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public RewriteResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RewriteResponse.Builder
Overrides

clearResource()

public RewriteResponse.Builder clearResource()

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Returns
Type Description
RewriteResponse.Builder

clearRewriteToken()

public RewriteResponse.Builder clearRewriteToken()

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.

string rewrite_token = 4;

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

clearTotalBytesRewritten()

public RewriteResponse.Builder clearTotalBytesRewritten()

The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.

int64 total_bytes_rewritten = 1;

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

clone()

public RewriteResponse.Builder clone()
Returns
Type Description
RewriteResponse.Builder
Overrides

getDefaultInstanceForType()

public RewriteResponse getDefaultInstanceForType()
Returns
Type Description
RewriteResponse

getDescriptorForType()

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

getDone()

public boolean getDone()

true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.

bool done = 3;

Returns
Type Description
boolean

The done.

getObjectSize()

public long getObjectSize()

The total size of the object being copied in bytes. This property is always present in the response.

int64 object_size = 2;

Returns
Type Description
long

The objectSize.

getResource()

public Object getResource()

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Returns
Type Description
Object

The resource.

getResourceBuilder()

public Object.Builder getResourceBuilder()

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Returns
Type Description
Object.Builder

getResourceOrBuilder()

public ObjectOrBuilder getResourceOrBuilder()

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Returns
Type Description
ObjectOrBuilder

getRewriteToken()

public String getRewriteToken()

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.

string rewrite_token = 4;

Returns
Type Description
String

The rewriteToken.

getRewriteTokenBytes()

public ByteString getRewriteTokenBytes()

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.

string rewrite_token = 4;

Returns
Type Description
ByteString

The bytes for rewriteToken.

getTotalBytesRewritten()

public long getTotalBytesRewritten()

The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.

int64 total_bytes_rewritten = 1;

Returns
Type Description
long

The totalBytesRewritten.

hasResource()

public boolean hasResource()

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Returns
Type Description
boolean

Whether the resource field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(RewriteResponse other)

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

mergeResource(Object value)

public RewriteResponse.Builder mergeResource(Object value)

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Parameter
Name Description
value Object
Returns
Type Description
RewriteResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RewriteResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RewriteResponse.Builder
Overrides

setDone(boolean value)

public RewriteResponse.Builder setDone(boolean value)

true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.

bool done = 3;

Parameter
Name Description
value boolean

The done to set.

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public RewriteResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RewriteResponse.Builder
Overrides

setObjectSize(long value)

public RewriteResponse.Builder setObjectSize(long value)

The total size of the object being copied in bytes. This property is always present in the response.

int64 object_size = 2;

Parameter
Name Description
value long

The objectSize to set.

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RewriteResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RewriteResponse.Builder
Overrides

setResource(Object value)

public RewriteResponse.Builder setResource(Object value)

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Parameter
Name Description
value Object
Returns
Type Description
RewriteResponse.Builder

setResource(Object.Builder builderForValue)

public RewriteResponse.Builder setResource(Object.Builder builderForValue)

A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.

.google.storage.v2.Object resource = 5;

Parameter
Name Description
builderForValue Object.Builder
Returns
Type Description
RewriteResponse.Builder

setRewriteToken(String value)

public RewriteResponse.Builder setRewriteToken(String value)

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.

string rewrite_token = 4;

Parameter
Name Description
value String

The rewriteToken to set.

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

setRewriteTokenBytes(ByteString value)

public RewriteResponse.Builder setRewriteTokenBytes(ByteString value)

A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.

string rewrite_token = 4;

Parameter
Name Description
value ByteString

The bytes for rewriteToken to set.

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

setTotalBytesRewritten(long value)

public RewriteResponse.Builder setTotalBytesRewritten(long value)

The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.

int64 total_bytes_rewritten = 1;

Parameter
Name Description
value long

The totalBytesRewritten to set.

Returns
Type Description
RewriteResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final RewriteResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RewriteResponse.Builder
Overrides