Package com.google.storage.v2
Class ReadRange.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
com.google.storage.v2.ReadRange.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ReadRangeOrBuilder,Cloneable
- Enclosing class:
- ReadRange
public static final class ReadRange.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
implements ReadRangeOrBuilder
Describes a range of bytes to read in a `BidiReadObjectRanges` request.Protobuf type
google.storage.v2.ReadRange-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Required.Optional.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongRequired.longOptional.longRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setReadId(long value) Required.setReadLength(long value) Optional.setReadOffset(long value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ReadRange.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
-
mergeFrom
public ReadRange.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ReadRange.Builder>- Throws:
IOException
-
getReadOffset
public long getReadOffset()Required. The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value is 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_length` = 3 would return bytes 10 through 12 of the object. Requesting a negative offset with magnitude larger than the size of the object is equivalent to `read_offset` = 0. A `read_offset` larger than the size of the object results in an `OutOfRange` error.
int64 read_offset = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getReadOffsetin interfaceReadRangeOrBuilder- Returns:
- The readOffset.
-
setReadOffset
Required. The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value is 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_length` = 3 would return bytes 10 through 12 of the object. Requesting a negative offset with magnitude larger than the size of the object is equivalent to `read_offset` = 0. A `read_offset` larger than the size of the object results in an `OutOfRange` error.
int64 read_offset = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The readOffset to set.- Returns:
- This builder for chaining.
-
clearReadOffset
Required. The offset for the first byte to return in the read, relative to the start of the object. A negative read_offset value is 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_length` = 3 would return bytes 10 through 12 of the object. Requesting a negative offset with magnitude larger than the size of the object is equivalent to `read_offset` = 0. A `read_offset` larger than the size of the object results in an `OutOfRange` error.
int64 read_offset = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getReadLength
public long getReadLength()Optional. The maximum number of data bytes the server is allowed to return across all response messages with the same `read_id`. A `read_length` of zero indicates to read until the resource end, and a negative `read_length` causes an `OutOfRange` error. If the stream returns fewer bytes than allowed by the `read_length` and no error occurred, the stream includes all data from the `read_offset` to the resource end.
int64 read_length = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getReadLengthin interfaceReadRangeOrBuilder- Returns:
- The readLength.
-
setReadLength
Optional. The maximum number of data bytes the server is allowed to return across all response messages with the same `read_id`. A `read_length` of zero indicates to read until the resource end, and a negative `read_length` causes an `OutOfRange` error. If the stream returns fewer bytes than allowed by the `read_length` and no error occurred, the stream includes all data from the `read_offset` to the resource end.
int64 read_length = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The readLength to set.- Returns:
- This builder for chaining.
-
clearReadLength
Optional. The maximum number of data bytes the server is allowed to return across all response messages with the same `read_id`. A `read_length` of zero indicates to read until the resource end, and a negative `read_length` causes an `OutOfRange` error. If the stream returns fewer bytes than allowed by the `read_length` and no error occurred, the stream includes all data from the `read_offset` to the resource end.
int64 read_length = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
getReadId
public long getReadId()Required. Read identifier provided by the client. When the client issues more than one outstanding `ReadRange` on the same stream, responses can be mapped back to their corresponding requests using this value. Clients must ensure that all outstanding requests have different read_id values. The server might close the stream with an error if this condition is not met.
int64 read_id = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getReadIdin interfaceReadRangeOrBuilder- Returns:
- The readId.
-
setReadId
Required. Read identifier provided by the client. When the client issues more than one outstanding `ReadRange` on the same stream, responses can be mapped back to their corresponding requests using this value. Clients must ensure that all outstanding requests have different read_id values. The server might close the stream with an error if this condition is not met.
int64 read_id = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The readId to set.- Returns:
- This builder for chaining.
-
clearReadId
Required. Read identifier provided by the client. When the client issues more than one outstanding `ReadRange` on the same stream, responses can be mapped back to their corresponding requests using this value. Clients must ensure that all outstanding requests have different read_id values. The server might close the stream with an error if this condition is not met.
int64 read_id = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-