Class ReadObjectRequest.Builder (2.9.2)

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ReadObjectRequest build()
Returns
TypeDescription
ReadObjectRequest

buildPartial()

public ReadObjectRequest buildPartial()
Returns
TypeDescription
ReadObjectRequest

clear()

public ReadObjectRequest.Builder clear()
Returns
TypeDescription
ReadObjectRequest.Builder
Overrides

clearBucket()

public ReadObjectRequest.Builder clearBucket()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
TypeDescription
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
TypeDescription
ReadObjectRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearIfGenerationNotMatch()

public ReadObjectRequest.Builder clearIfGenerationNotMatch()

Makes the operation conditional on whether the object's live 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
TypeDescription
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
TypeDescription
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
TypeDescription
ReadObjectRequest.Builder

This builder for chaining.

clearObject()

public ReadObjectRequest.Builder clearObject()

The name of the object to read.

string object = 2;

Returns
TypeDescription
ReadObjectRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ReadObjectRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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 with magnitude larger than the size of the object will return the entire object.

int64 read_offset = 4;

Returns
TypeDescription
ReadObjectRequest.Builder

This builder for chaining.

clone()

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

getBucket()

public String getBucket()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
TypeDescription
String

The bucket.

getBucketBytes()

public ByteString getBucketBytes()

The name of the bucket containing the object to read.

string bucket = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CommonObjectRequestParamsOrBuilder

getDefaultInstanceForType()

public ReadObjectRequest getDefaultInstanceForType()
Returns
TypeDescription
ReadObjectRequest

getDescriptorForType()

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

The ifGenerationMatch.

getIfGenerationNotMatch()

public long getIfGenerationNotMatch()

Makes the operation conditional on whether the object's live 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
TypeDescription
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
TypeDescription
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
TypeDescription
long

The ifMetagenerationNotMatch.

getObject()

public String getObject()

The name of the object to read.

string object = 2;

Returns
TypeDescription
String

The object.

getObjectBytes()

public ByteString getObjectBytes()

The name of the object to read.

string object = 2;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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 with magnitude larger than the size of the object will return the entire object.

int64 read_offset = 4;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the commonObjectRequestParams 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
TypeDescription
boolean

Whether the ifGenerationMatch field is set.

hasIfGenerationNotMatch()

public boolean hasIfGenerationNotMatch()

Makes the operation conditional on whether the object's live 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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the readMask field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueCommonObjectRequestParams
Returns
TypeDescription
ReadObjectRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ReadObjectRequest other)

public ReadObjectRequest.Builder mergeFrom(ReadObjectRequest other)
Parameter
NameDescription
otherReadObjectRequest
Returns
TypeDescription
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
NameDescription
valueFieldMask
Returns
TypeDescription
ReadObjectRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The bucket to set.

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

The bytes for bucket to set.

Returns
TypeDescription
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
NameDescription
valueCommonObjectRequestParams
Returns
TypeDescription
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
NameDescription
builderForValueCommonObjectRequestParams.Builder
Returns
TypeDescription
ReadObjectRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

The generation to set.

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

The ifGenerationMatch to set.

Returns
TypeDescription
ReadObjectRequest.Builder

This builder for chaining.

setIfGenerationNotMatch(long value)

public ReadObjectRequest.Builder setIfGenerationNotMatch(long value)

Makes the operation conditional on whether the object's live 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
NameDescription
valuelong

The ifGenerationNotMatch to set.

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

The ifMetagenerationMatch to set.

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

The ifMetagenerationNotMatch to set.

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

The object to set.

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

The bytes for object to set.

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

The readLimit to set.

Returns
TypeDescription
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
NameDescription
valueFieldMask
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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 with magnitude larger than the size of the object will return the entire object.

int64 read_offset = 4;

Parameter
NameDescription
valuelong

The readOffset to set.

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

setUnknownFields(UnknownFieldSet unknownFields)

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