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 Type
    Method
    Description
     
     
     
    Required.
    Optional.
    Required.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    long
    Required.
    long
    Optional.
    long
    Required.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
    • clear

      public ReadRange.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ReadRange.Builder>
    • getDefaultInstanceForType

      public ReadRange getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ReadRange build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ReadRange buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ReadRange.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ReadRange.Builder>
    • mergeFrom

      public ReadRange.Builder mergeFrom(ReadRange other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      getReadOffset in interface ReadRangeOrBuilder
      Returns:
      The readOffset.
    • setReadOffset

      public ReadRange.Builder setReadOffset(long value)
       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

      public ReadRange.Builder 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:
      getReadLength in interface ReadRangeOrBuilder
      Returns:
      The readLength.
    • setReadLength

      public ReadRange.Builder setReadLength(long value)
       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

      public ReadRange.Builder 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:
      getReadId in interface ReadRangeOrBuilder
      Returns:
      The readId.
    • setReadId

      public ReadRange.Builder setReadId(long value)
       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

      public ReadRange.Builder 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.