Class ReadObjectRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.storage.v2.ReadObjectRequest
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ReadObjectRequestOrBuilder, Serializable

public final class ReadObjectRequest extends com.google.protobuf.GeneratedMessageV3 implements ReadObjectRequestOrBuilder
 Request message for ReadObject.
 
Protobuf type google.storage.v2.ReadObjectRequest
See Also:
  • Field Details

    • BUCKET_FIELD_NUMBER

      public static final int BUCKET_FIELD_NUMBER
      See Also:
    • OBJECT_FIELD_NUMBER

      public static final int OBJECT_FIELD_NUMBER
      See Also:
    • GENERATION_FIELD_NUMBER

      public static final int GENERATION_FIELD_NUMBER
      See Also:
    • READ_OFFSET_FIELD_NUMBER

      public static final int READ_OFFSET_FIELD_NUMBER
      See Also:
    • READ_LIMIT_FIELD_NUMBER

      public static final int READ_LIMIT_FIELD_NUMBER
      See Also:
    • IF_GENERATION_MATCH_FIELD_NUMBER

      public static final int IF_GENERATION_MATCH_FIELD_NUMBER
      See Also:
    • IF_GENERATION_NOT_MATCH_FIELD_NUMBER

      public static final int IF_GENERATION_NOT_MATCH_FIELD_NUMBER
      See Also:
    • IF_METAGENERATION_MATCH_FIELD_NUMBER

      public static final int IF_METAGENERATION_MATCH_FIELD_NUMBER
      See Also:
    • IF_METAGENERATION_NOT_MATCH_FIELD_NUMBER

      public static final int IF_METAGENERATION_NOT_MATCH_FIELD_NUMBER
      See Also:
    • COMMON_OBJECT_REQUEST_PARAMS_FIELD_NUMBER

      public static final int COMMON_OBJECT_REQUEST_PARAMS_FIELD_NUMBER
      See Also:
    • READ_MASK_FIELD_NUMBER

      public static final int READ_MASK_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getBucket

      public String getBucket()
       Required. The name of the bucket containing the object to read.
       
      string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getBucket in interface ReadObjectRequestOrBuilder
      Returns:
      The bucket.
    • getBucketBytes

      public com.google.protobuf.ByteString getBucketBytes()
       Required. The name of the bucket containing the object to read.
       
      string bucket = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getBucketBytes in interface ReadObjectRequestOrBuilder
      Returns:
      The bytes for bucket.
    • getObject

      public String getObject()
       Required. The name of the object to read.
       
      string object = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getObject in interface ReadObjectRequestOrBuilder
      Returns:
      The object.
    • getObjectBytes

      public com.google.protobuf.ByteString getObjectBytes()
       Required. The name of the object to read.
       
      string object = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getObjectBytes in interface ReadObjectRequestOrBuilder
      Returns:
      The bytes for object.
    • getGeneration

      public long getGeneration()
       If present, selects a specific revision of this object (as opposed
       to the latest version, the default).
       
      int64 generation = 3;
      Specified by:
      getGeneration in interface ReadObjectRequestOrBuilder
      Returns:
      The generation.
    • 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;
      Specified by:
      getReadOffset in interface ReadObjectRequestOrBuilder
      Returns:
      The readOffset.
    • 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;
      Specified by:
      getReadLimit in interface ReadObjectRequestOrBuilder
      Returns:
      The readLimit.
    • 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;
      Specified by:
      hasIfGenerationMatch in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the ifGenerationMatch field is set.
    • 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;
      Specified by:
      getIfGenerationMatch in interface ReadObjectRequestOrBuilder
      Returns:
      The ifGenerationMatch.
    • 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;
      Specified by:
      hasIfGenerationNotMatch in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the ifGenerationNotMatch field is set.
    • 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;
      Specified by:
      getIfGenerationNotMatch in interface ReadObjectRequestOrBuilder
      Returns:
      The ifGenerationNotMatch.
    • 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;
      Specified by:
      hasIfMetagenerationMatch in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the ifMetagenerationMatch field is set.
    • 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;
      Specified by:
      getIfMetagenerationMatch in interface ReadObjectRequestOrBuilder
      Returns:
      The ifMetagenerationMatch.
    • 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;
      Specified by:
      hasIfMetagenerationNotMatch in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the ifMetagenerationNotMatch field is set.
    • 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;
      Specified by:
      getIfMetagenerationNotMatch in interface ReadObjectRequestOrBuilder
      Returns:
      The ifMetagenerationNotMatch.
    • 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;
      Specified by:
      hasCommonObjectRequestParams in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the commonObjectRequestParams field is set.
    • 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;
      Specified by:
      getCommonObjectRequestParams in interface ReadObjectRequestOrBuilder
      Returns:
      The commonObjectRequestParams.
    • 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;
      Specified by:
      getCommonObjectRequestParamsOrBuilder in interface ReadObjectRequestOrBuilder
    • 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;
      Specified by:
      hasReadMask in interface ReadObjectRequestOrBuilder
      Returns:
      Whether the readMask field is set.
    • getReadMask

      public com.google.protobuf.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;
      Specified by:
      getReadMask in interface ReadObjectRequestOrBuilder
      Returns:
      The readMask.
    • getReadMaskOrBuilder

      public com.google.protobuf.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;
      Specified by:
      getReadMaskOrBuilder in interface ReadObjectRequestOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ReadObjectRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ReadObjectRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadObjectRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ReadObjectRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ReadObjectRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadObjectRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ReadObjectRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ReadObjectRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ReadObjectRequest.Builder newBuilder()
    • newBuilder

      public static ReadObjectRequest.Builder newBuilder(ReadObjectRequest prototype)
    • toBuilder

      public ReadObjectRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ReadObjectRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static ReadObjectRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ReadObjectRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<ReadObjectRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public ReadObjectRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder