Class ReadRange.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<ReadRange.Builder> implements ReadRangeOrBuilder
 Describes a range of bytes to read in a BidiReadObjectRanges request.
 
Protobuf type google.storage.v2.ReadRange
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
    • clone

      public ReadRange.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • setField

      public ReadRange.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • clearField

      public ReadRange.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • clearOneof

      public ReadRange.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • setRepeatedField

      public ReadRange.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • addRepeatedField

      public ReadRange.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.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.GeneratedMessageV3.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 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_length = 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. A read_offset larger than the size of the object
       will result 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 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_length = 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. A read_offset larger than the size of the object
       will result 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 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_length = 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. A read_offset larger than the size of the object
       will result 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 will
       cause an 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 will
       cause an 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 will
       cause an 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 may 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 may 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 may 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.
    • setUnknownFields

      public final ReadRange.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>
    • mergeUnknownFields

      public final ReadRange.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ReadRange.Builder>