Package com.google.bytestream
Class ByteStreamProto.ReadRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<ByteStreamProto.ReadRequest,ByteStreamProto.ReadRequest.Builder>
com.google.bytestream.ByteStreamProto.ReadRequest.Builder
- All Implemented Interfaces:
ByteStreamProto.ReadRequestOrBuilder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,Cloneable
- Enclosing class:
- ByteStreamProto.ReadRequest
public static final class ByteStreamProto.ReadRequest.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ByteStreamProto.ReadRequest,ByteStreamProto.ReadRequest.Builder>
implements ByteStreamProto.ReadRequestOrBuilder
Request object for ByteStream.Read.Protobuf type
google.bytestream.ReadRequest
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionThe maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages.The offset for the first byte to return in the read, relative to the start of the resource.The name of the resource to read.long
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages.long
The offset for the first byte to return in the read, relative to the start of the resource.The name of the resource to read.com.google.protobuf.ByteString
The name of the resource to read.setReadLimit
(long value) The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages.setReadOffset
(long value) The offset for the first byte to return in the read, relative to the start of the resource.setResourceName
(String value) The name of the resource to read.setResourceNameBytes
(com.google.protobuf.ByteString value) The name of the resource to read.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getResourceName
The name of the resource to read.
string resource_name = 1 [json_name = "resourceName"];
- Specified by:
getResourceName
in interfaceByteStreamProto.ReadRequestOrBuilder
- Returns:
- The resourceName.
-
getResourceNameBytes
public com.google.protobuf.ByteString getResourceNameBytes()The name of the resource to read.
string resource_name = 1 [json_name = "resourceName"];
- Specified by:
getResourceNameBytes
in interfaceByteStreamProto.ReadRequestOrBuilder
- Returns:
- The bytes for resourceName.
-
setResourceName
The name of the resource to read.
string resource_name = 1 [json_name = "resourceName"];
- Parameters:
value
- The resourceName to set.- Returns:
- This builder for chaining.
-
clearResourceName
The name of the resource to read.
string resource_name = 1 [json_name = "resourceName"];
- Returns:
- This builder for chaining.
-
setResourceNameBytes
public ByteStreamProto.ReadRequest.Builder setResourceNameBytes(com.google.protobuf.ByteString value) The name of the resource to read.
string resource_name = 1 [json_name = "resourceName"];
- Parameters:
value
- The bytes for resourceName to set.- Returns:
- This builder for chaining.
-
getReadOffset
public long getReadOffset()The offset for the first byte to return in the read, relative to the start of the resource. A `read_offset` that is negative or greater than the size of the resource will cause an `OUT_OF_RANGE` error.
int64 read_offset = 2 [json_name = "readOffset"];
- Specified by:
getReadOffset
in interfaceByteStreamProto.ReadRequestOrBuilder
- Returns:
- The readOffset.
-
setReadOffset
The offset for the first byte to return in the read, relative to the start of the resource. A `read_offset` that is negative or greater than the size of the resource will cause an `OUT_OF_RANGE` error.
int64 read_offset = 2 [json_name = "readOffset"];
- Parameters:
value
- The readOffset to set.- Returns:
- This builder for chaining.
-
clearReadOffset
The offset for the first byte to return in the read, relative to the start of the resource. A `read_offset` that is negative or greater than the size of the resource will cause an `OUT_OF_RANGE` error.
int64 read_offset = 2 [json_name = "readOffset"];
- Returns:
- This builder for chaining.
-
getReadLimit
public long getReadLimit()The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` 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 = 3 [json_name = "readLimit"];
- Specified by:
getReadLimit
in interfaceByteStreamProto.ReadRequestOrBuilder
- Returns:
- The readLimit.
-
setReadLimit
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` 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 = 3 [json_name = "readLimit"];
- Parameters:
value
- The readLimit to set.- Returns:
- This builder for chaining.
-
clearReadLimit
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` 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 = 3 [json_name = "readLimit"];
- Returns:
- This builder for chaining.
-