Class RewriteResponse.Builder (2.9.0)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RewriteResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RewriteResponse.Builder
Overrides

build()

public RewriteResponse build()
Returns
TypeDescription
RewriteResponse

buildPartial()

public RewriteResponse buildPartial()
Returns
TypeDescription
RewriteResponse

clear()

public RewriteResponse.Builder clear()
Returns
TypeDescription
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
TypeDescription
RewriteResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public RewriteResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
RewriteResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public RewriteResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
RewriteResponse.Builder

This builder for chaining.

clone()

public RewriteResponse.Builder clone()
Returns
TypeDescription
RewriteResponse.Builder
Overrides

getDefaultInstanceForType()

public RewriteResponse getDefaultInstanceForType()
Returns
TypeDescription
RewriteResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the resource field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RewriteResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RewriteResponse.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RewriteResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RewriteResponse.Builder
Overrides

mergeFrom(RewriteResponse other)

public RewriteResponse.Builder mergeFrom(RewriteResponse other)
Parameter
NameDescription
otherRewriteResponse
Returns
TypeDescription
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
NameDescription
valueObject
Returns
TypeDescription
RewriteResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RewriteResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The done to set.

Returns
TypeDescription
RewriteResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public RewriteResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The objectSize to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueObject
Returns
TypeDescription
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
NameDescription
builderForValueObject.Builder
Returns
TypeDescription
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
NameDescription
valueString

The rewriteToken to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for rewriteToken to set.

Returns
TypeDescription
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
NameDescription
valuelong

The totalBytesRewritten to set.

Returns
TypeDescription
RewriteResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final RewriteResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RewriteResponse.Builder
Overrides