Class ReadObjectRequest.Builder (2.5.1)

public static final class ReadObjectRequest.Builder extends GeneratedMessageV3.Builder<ReadObjectRequest.Builder> implements ReadObjectRequestOrBuilder

Request message for ReadObject.

Protobuf type google.storage.v2.ReadObjectRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ReadObjectRequest build()
Returns
Type Description
ReadObjectRequest

buildPartial()

public ReadObjectRequest buildPartial()
Returns
Type Description
ReadObjectRequest

clear()

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

clearBucket()

public ReadObjectRequest.Builder clearBucket()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearCommonObjectRequestParams()

public ReadObjectRequest.Builder clearCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Returns
Type Description
ReadObjectRequest.Builder

clearCommonRequestParams()

public ReadObjectRequest.Builder clearCommonRequestParams()

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Returns
Type Description
ReadObjectRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGeneration()

public ReadObjectRequest.Builder clearGeneration()

If present, selects a specific revision of this object (as opposed to the latest version, the default).

int64 generation = 3;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearIfGenerationMatch()

public ReadObjectRequest.Builder clearIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 6;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearIfGenerationNotMatch()

public ReadObjectRequest.Builder clearIfGenerationNotMatch()

Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 7;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationMatch()

public ReadObjectRequest.Builder clearIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 8;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationNotMatch()

public ReadObjectRequest.Builder clearIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 9;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearObject()

public ReadObjectRequest.Builder clearObject()

The name of the object to read.

string object = 2;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReadLimit()

public ReadObjectRequest.Builder clearReadLimit()

The maximum number of data bytes the server is allowed to return in the sum of all Object messages. A read_limit of zero indicates that there is no limit, and a negative read_limit will cause an error. If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

int64 read_limit = 5;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clearReadMask()

public ReadObjectRequest.Builder clearReadMask()

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Returns
Type Description
ReadObjectRequest.Builder

clearReadOffset()

public ReadObjectRequest.Builder clearReadOffset()

The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value will be interpreted as the number of bytes back from the end of the object to be returned. For example, if an object's length is 15 bytes, a ReadObjectRequest with read_offset = -5 and read_limit = 3 would return bytes 10 through 12 of the object. Requesting a negative offset whose magnitude is larger than the size of the object will result in an error.

int64 read_offset = 4;

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

clone()

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

getBucket()

public String getBucket()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
Type Description
String

The bucket.

getBucketBytes()

public ByteString getBucketBytes()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
Type Description
ByteString

The bytes for bucket.

getCommonObjectRequestParams()

public CommonObjectRequestParams getCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Returns
Type Description
CommonObjectRequestParams

The commonObjectRequestParams.

getCommonObjectRequestParamsBuilder()

public CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Returns
Type Description
CommonObjectRequestParams.Builder

getCommonObjectRequestParamsOrBuilder()

public CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Returns
Type Description
CommonObjectRequestParamsOrBuilder

getCommonRequestParams()

public CommonRequestParams getCommonRequestParams()

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Returns
Type Description
CommonRequestParams

The commonRequestParams.

getCommonRequestParamsBuilder()

public CommonRequestParams.Builder getCommonRequestParamsBuilder()

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Returns
Type Description
CommonRequestParams.Builder

getCommonRequestParamsOrBuilder()

public CommonRequestParamsOrBuilder getCommonRequestParamsOrBuilder()

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Returns
Type Description
CommonRequestParamsOrBuilder

getDefaultInstanceForType()

public ReadObjectRequest getDefaultInstanceForType()
Returns
Type Description
ReadObjectRequest

getDescriptorForType()

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

getGeneration()

public long getGeneration()

If present, selects a specific revision of this object (as opposed to the latest version, the default).

int64 generation = 3;

Returns
Type Description
long

The generation.

getIfGenerationMatch()

public long getIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 6;

Returns
Type Description
long

The ifGenerationMatch.

getIfGenerationNotMatch()

public long getIfGenerationNotMatch()

Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 7;

Returns
Type Description
long

The ifGenerationNotMatch.

getIfMetagenerationMatch()

public long getIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 8;

Returns
Type Description
long

The ifMetagenerationMatch.

getIfMetagenerationNotMatch()

public long getIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 9;

Returns
Type Description
long

The ifMetagenerationNotMatch.

getObject()

public String getObject()

The name of the object to read.

string object = 2;

Returns
Type Description
String

The object.

getObjectBytes()

public ByteString getObjectBytes()

The name of the object to read.

string object = 2;

Returns
Type Description
ByteString

The bytes for object.

getReadLimit()

public long getReadLimit()

The maximum number of data bytes the server is allowed to return in the sum of all Object messages. A read_limit of zero indicates that there is no limit, and a negative read_limit will cause an error. If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

int64 read_limit = 5;

Returns
Type Description
long

The readLimit.

getReadMask()

public FieldMask getReadMask()

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Returns
Type Description
FieldMask

The readMask.

getReadMaskBuilder()

public FieldMask.Builder getReadMaskBuilder()

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Returns
Type Description
Builder

getReadMaskOrBuilder()

public FieldMaskOrBuilder getReadMaskOrBuilder()

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Returns
Type Description
FieldMaskOrBuilder

getReadOffset()

public long getReadOffset()

The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value will be interpreted as the number of bytes back from the end of the object to be returned. For example, if an object's length is 15 bytes, a ReadObjectRequest with read_offset = -5 and read_limit = 3 would return bytes 10 through 12 of the object. Requesting a negative offset whose magnitude is larger than the size of the object will result in an error.

int64 read_offset = 4;

Returns
Type Description
long

The readOffset.

hasCommonObjectRequestParams()

public boolean hasCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Returns
Type Description
boolean

Whether the commonObjectRequestParams field is set.

hasCommonRequestParams()

public boolean hasCommonRequestParams()

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Returns
Type Description
boolean

Whether the commonRequestParams field is set.

hasIfGenerationMatch()

public boolean hasIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 6;

Returns
Type Description
boolean

Whether the ifGenerationMatch field is set.

hasIfGenerationNotMatch()

public boolean hasIfGenerationNotMatch()

Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 7;

Returns
Type Description
boolean

Whether the ifGenerationNotMatch field is set.

hasIfMetagenerationMatch()

public boolean hasIfMetagenerationMatch()

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 8;

Returns
Type Description
boolean

Whether the ifMetagenerationMatch field is set.

hasIfMetagenerationNotMatch()

public boolean hasIfMetagenerationNotMatch()

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 9;

Returns
Type Description
boolean

Whether the ifMetagenerationNotMatch field is set.

hasReadMask()

public boolean hasReadMask()

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Returns
Type Description
boolean

Whether the readMask field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCommonObjectRequestParams(CommonObjectRequestParams value)

public ReadObjectRequest.Builder mergeCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Parameter
Name Description
value CommonObjectRequestParams
Returns
Type Description
ReadObjectRequest.Builder

mergeCommonRequestParams(CommonRequestParams value)

public ReadObjectRequest.Builder mergeCommonRequestParams(CommonRequestParams value)

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Parameter
Name Description
value CommonRequestParams
Returns
Type Description
ReadObjectRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ReadObjectRequest other)

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

mergeReadMask(FieldMask value)

public ReadObjectRequest.Builder mergeReadMask(FieldMask value)

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Parameter
Name Description
value FieldMask
Returns
Type Description
ReadObjectRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBucket(String value)

public ReadObjectRequest.Builder setBucket(String value)

The name of the bucket containing the object to read.

string bucket = 1;

Parameter
Name Description
value String

The bucket to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setBucketBytes(ByteString value)

public ReadObjectRequest.Builder setBucketBytes(ByteString value)

The name of the bucket containing the object to read.

string bucket = 1;

Parameter
Name Description
value ByteString

The bytes for bucket to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setCommonObjectRequestParams(CommonObjectRequestParams value)

public ReadObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Parameter
Name Description
value CommonObjectRequestParams
Returns
Type Description
ReadObjectRequest.Builder

setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

public ReadObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 10;

Parameter
Name Description
builderForValue CommonObjectRequestParams.Builder
Returns
Type Description
ReadObjectRequest.Builder

setCommonRequestParams(CommonRequestParams value)

public ReadObjectRequest.Builder setCommonRequestParams(CommonRequestParams value)

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Parameter
Name Description
value CommonRequestParams
Returns
Type Description
ReadObjectRequest.Builder

setCommonRequestParams(CommonRequestParams.Builder builderForValue)

public ReadObjectRequest.Builder setCommonRequestParams(CommonRequestParams.Builder builderForValue)

A set of parameters common to all Storage API requests.

.google.storage.v2.CommonRequestParams common_request_params = 11;

Parameter
Name Description
builderForValue CommonRequestParams.Builder
Returns
Type Description
ReadObjectRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeneration(long value)

public ReadObjectRequest.Builder setGeneration(long value)

If present, selects a specific revision of this object (as opposed to the latest version, the default).

int64 generation = 3;

Parameter
Name Description
value long

The generation to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setIfGenerationMatch(long value)

public ReadObjectRequest.Builder setIfGenerationMatch(long value)

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 6;

Parameter
Name Description
value long

The ifGenerationMatch to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setIfGenerationNotMatch(long value)

public ReadObjectRequest.Builder setIfGenerationNotMatch(long value)

Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 7;

Parameter
Name Description
value long

The ifGenerationNotMatch to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setIfMetagenerationMatch(long value)

public ReadObjectRequest.Builder setIfMetagenerationMatch(long value)

Makes the operation conditional on whether the object's current metageneration matches the given value.

optional int64 if_metageneration_match = 8;

Parameter
Name Description
value long

The ifMetagenerationMatch to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setIfMetagenerationNotMatch(long value)

public ReadObjectRequest.Builder setIfMetagenerationNotMatch(long value)

Makes the operation conditional on whether the object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 9;

Parameter
Name Description
value long

The ifMetagenerationNotMatch to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setObject(String value)

public ReadObjectRequest.Builder setObject(String value)

The name of the object to read.

string object = 2;

Parameter
Name Description
value String

The object to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setObjectBytes(ByteString value)

public ReadObjectRequest.Builder setObjectBytes(ByteString value)

The name of the object to read.

string object = 2;

Parameter
Name Description
value ByteString

The bytes for object to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setReadLimit(long value)

public ReadObjectRequest.Builder setReadLimit(long value)

The maximum number of data bytes the server is allowed to return in the sum of all Object messages. A read_limit of zero indicates that there is no limit, and a negative read_limit will cause an error. If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

int64 read_limit = 5;

Parameter
Name Description
value long

The readLimit to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

setReadMask(FieldMask value)

public ReadObjectRequest.Builder setReadMask(FieldMask value)

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Parameter
Name Description
value FieldMask
Returns
Type Description
ReadObjectRequest.Builder

setReadMask(FieldMask.Builder builderForValue)

public ReadObjectRequest.Builder setReadMask(FieldMask.Builder builderForValue)

Mask specifying which fields to read. The checksummed_data field and its children will always be present. If no mask is specified, will default to all fields except metadata.owner and metadata.acl.

  • may be used to mean "all fields".

optional .google.protobuf.FieldMask read_mask = 12;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ReadObjectRequest.Builder

setReadOffset(long value)

public ReadObjectRequest.Builder setReadOffset(long value)

The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value will be interpreted as the number of bytes back from the end of the object to be returned. For example, if an object's length is 15 bytes, a ReadObjectRequest with read_offset = -5 and read_limit = 3 would return bytes 10 through 12 of the object. Requesting a negative offset whose magnitude is larger than the size of the object will result in an error.

int64 read_offset = 4;

Parameter
Name Description
value long

The readOffset to set.

Returns
Type Description
ReadObjectRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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