Class WriteObjectRequest

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

public final class WriteObjectRequest extends com.google.protobuf.GeneratedMessageV3 implements WriteObjectRequestOrBuilder
 Request message for WriteObject.
 
Protobuf type google.storage.v2.WriteObjectRequest
See Also:
  • Field Details

    • UPLOAD_ID_FIELD_NUMBER

      public static final int UPLOAD_ID_FIELD_NUMBER
      See Also:
    • WRITE_OBJECT_SPEC_FIELD_NUMBER

      public static final int WRITE_OBJECT_SPEC_FIELD_NUMBER
      See Also:
    • WRITE_OFFSET_FIELD_NUMBER

      public static final int WRITE_OFFSET_FIELD_NUMBER
      See Also:
    • CHECKSUMMED_DATA_FIELD_NUMBER

      public static final int CHECKSUMMED_DATA_FIELD_NUMBER
      See Also:
    • OBJECT_CHECKSUMS_FIELD_NUMBER

      public static final int OBJECT_CHECKSUMS_FIELD_NUMBER
      See Also:
    • FINISH_WRITE_FIELD_NUMBER

      public static final int FINISH_WRITE_FIELD_NUMBER
      See Also:
    • COMMON_OBJECT_REQUEST_PARAMS_FIELD_NUMBER

      public static final int COMMON_OBJECT_REQUEST_PARAMS_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
    • getFirstMessageCase

      public WriteObjectRequest.FirstMessageCase getFirstMessageCase()
      Specified by:
      getFirstMessageCase in interface WriteObjectRequestOrBuilder
    • getDataCase

      public WriteObjectRequest.DataCase getDataCase()
      Specified by:
      getDataCase in interface WriteObjectRequestOrBuilder
    • hasUploadId

      public boolean hasUploadId()
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Specified by:
      hasUploadId in interface WriteObjectRequestOrBuilder
      Returns:
      Whether the uploadId field is set.
    • getUploadId

      public String getUploadId()
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Specified by:
      getUploadId in interface WriteObjectRequestOrBuilder
      Returns:
      The uploadId.
    • getUploadIdBytes

      public com.google.protobuf.ByteString getUploadIdBytes()
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Specified by:
      getUploadIdBytes in interface WriteObjectRequestOrBuilder
      Returns:
      The bytes for uploadId.
    • hasWriteObjectSpec

      public boolean hasWriteObjectSpec()
       For non-resumable uploads. Describes the overall upload, including the
       destination bucket and object name, preconditions, etc.
       
      .google.storage.v2.WriteObjectSpec write_object_spec = 2;
      Specified by:
      hasWriteObjectSpec in interface WriteObjectRequestOrBuilder
      Returns:
      Whether the writeObjectSpec field is set.
    • getWriteObjectSpec

      public WriteObjectSpec getWriteObjectSpec()
       For non-resumable uploads. Describes the overall upload, including the
       destination bucket and object name, preconditions, etc.
       
      .google.storage.v2.WriteObjectSpec write_object_spec = 2;
      Specified by:
      getWriteObjectSpec in interface WriteObjectRequestOrBuilder
      Returns:
      The writeObjectSpec.
    • getWriteObjectSpecOrBuilder

      public WriteObjectSpecOrBuilder getWriteObjectSpecOrBuilder()
       For non-resumable uploads. Describes the overall upload, including the
       destination bucket and object name, preconditions, etc.
       
      .google.storage.v2.WriteObjectSpec write_object_spec = 2;
      Specified by:
      getWriteObjectSpecOrBuilder in interface WriteObjectRequestOrBuilder
    • getWriteOffset

      public long getWriteOffset()
       Required. The offset from the beginning of the object at which the data
       should be written.
      
       In the first `WriteObjectRequest` of a `WriteObject()` action, it
       indicates the initial offset for the `Write()` call. The value **must** be
       equal to the `persisted_size` that a call to `QueryWriteStatus()` would
       return (0 if this is the first write to the object).
      
       On subsequent calls, this value **must** be no larger than the sum of the
       first `write_offset` and the sizes of all `data` chunks sent previously on
       this stream.
      
       An incorrect value will cause an error.
       
      int64 write_offset = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getWriteOffset in interface WriteObjectRequestOrBuilder
      Returns:
      The writeOffset.
    • hasChecksummedData

      public boolean hasChecksummedData()
       The data to insert. If a crc32c checksum is provided that doesn't match
       the checksum computed by the service, the request will fail.
       
      .google.storage.v2.ChecksummedData checksummed_data = 4;
      Specified by:
      hasChecksummedData in interface WriteObjectRequestOrBuilder
      Returns:
      Whether the checksummedData field is set.
    • getChecksummedData

      public ChecksummedData getChecksummedData()
       The data to insert. If a crc32c checksum is provided that doesn't match
       the checksum computed by the service, the request will fail.
       
      .google.storage.v2.ChecksummedData checksummed_data = 4;
      Specified by:
      getChecksummedData in interface WriteObjectRequestOrBuilder
      Returns:
      The checksummedData.
    • getChecksummedDataOrBuilder

      public ChecksummedDataOrBuilder getChecksummedDataOrBuilder()
       The data to insert. If a crc32c checksum is provided that doesn't match
       the checksum computed by the service, the request will fail.
       
      .google.storage.v2.ChecksummedData checksummed_data = 4;
      Specified by:
      getChecksummedDataOrBuilder in interface WriteObjectRequestOrBuilder
    • hasObjectChecksums

      public boolean hasObjectChecksums()
       Checksums for the complete object. If the checksums computed by the service
       don't match the specified checksums the call will fail. May only be
       provided in the first or last request (either with first_message, or
       finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      hasObjectChecksums in interface WriteObjectRequestOrBuilder
      Returns:
      Whether the objectChecksums field is set.
    • getObjectChecksums

      public ObjectChecksums getObjectChecksums()
       Checksums for the complete object. If the checksums computed by the service
       don't match the specified checksums the call will fail. May only be
       provided in the first or last request (either with first_message, or
       finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      getObjectChecksums in interface WriteObjectRequestOrBuilder
      Returns:
      The objectChecksums.
    • getObjectChecksumsOrBuilder

      public ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder()
       Checksums for the complete object. If the checksums computed by the service
       don't match the specified checksums the call will fail. May only be
       provided in the first or last request (either with first_message, or
       finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      getObjectChecksumsOrBuilder in interface WriteObjectRequestOrBuilder
    • getFinishWrite

      public boolean getFinishWrite()
       If `true`, this indicates that the write is complete. Sending any
       `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
       will cause an error.
       For a non-resumable write (where the upload_id was not set in the first
       message), it is an error not to set this field in the final message of the
       stream.
       
      bool finish_write = 7;
      Specified by:
      getFinishWrite in interface WriteObjectRequestOrBuilder
      Returns:
      The finishWrite.
    • hasCommonObjectRequestParams

      public boolean hasCommonObjectRequestParams()
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
      Specified by:
      hasCommonObjectRequestParams in interface WriteObjectRequestOrBuilder
      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 = 8;
      Specified by:
      getCommonObjectRequestParams in interface WriteObjectRequestOrBuilder
      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 = 8;
      Specified by:
      getCommonObjectRequestParamsOrBuilder in interface WriteObjectRequestOrBuilder
    • 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 WriteObjectRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static WriteObjectRequest.Builder newBuilder()
    • newBuilder

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

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

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

      public static WriteObjectRequest getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<WriteObjectRequest> 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 WriteObjectRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder