Class BidiWriteObjectRequest

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

public final class BidiWriteObjectRequest extends com.google.protobuf.GeneratedMessageV3 implements BidiWriteObjectRequestOrBuilder
 Request message for BidiWriteObject.
 
Protobuf type google.storage.v2.BidiWriteObjectRequest
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:
    • STATE_LOOKUP_FIELD_NUMBER

      public static final int STATE_LOOKUP_FIELD_NUMBER
      See Also:
    • FLUSH_FIELD_NUMBER

      public static final int FLUSH_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 BidiWriteObjectRequest.FirstMessageCase getFirstMessageCase()
      Specified by:
      getFirstMessageCase in interface BidiWriteObjectRequestOrBuilder
    • getDataCase

      public BidiWriteObjectRequest.DataCase getDataCase()
      Specified by:
      getDataCase in interface BidiWriteObjectRequestOrBuilder
    • 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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
    • 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 invalid value will cause an error.
       
      int64 write_offset = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getWriteOffset in interface BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
    • 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 last request (with finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      hasObjectChecksums in interface BidiWriteObjectRequestOrBuilder
      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 last request (with finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      getObjectChecksums in interface BidiWriteObjectRequestOrBuilder
      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 last request (with finish_write set).
       
      .google.storage.v2.ObjectChecksums object_checksums = 6;
      Specified by:
      getObjectChecksumsOrBuilder in interface BidiWriteObjectRequestOrBuilder
    • getStateLookup

      public boolean getStateLookup()
       For each BidiWriteObjectRequest where state_lookup is `true` or the client
       closes the stream, the service will send a BidiWriteObjectResponse
       containing the current persisted size. The persisted size sent in responses
       covers all the bytes the server has persisted thus far and can be used to
       decide what data is safe for the client to drop. Note that the object's
       current size reported by the BidiWriteObjectResponse may lag behind the
       number of bytes written by the client. This field is ignored if
       `finish_write` is set to true.
       
      bool state_lookup = 7;
      Specified by:
      getStateLookup in interface BidiWriteObjectRequestOrBuilder
      Returns:
      The stateLookup.
    • getFlush

      public boolean getFlush()
       Persists data written on the stream, up to and including the current
       message, to permanent storage. This option should be used sparingly as it
       may reduce performance. Ongoing writes will periodically be persisted on
       the server even when `flush` is not set. This field is ignored if
       `finish_write` is set to true since there's no need to checkpoint or flush
       if this message completes the write.
       
      bool flush = 8;
      Specified by:
      getFlush in interface BidiWriteObjectRequestOrBuilder
      Returns:
      The flush.
    • 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 = 9;
      Specified by:
      getFinishWrite in interface BidiWriteObjectRequestOrBuilder
      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 = 10;
      Specified by:
      hasCommonObjectRequestParams in interface BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
      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 BidiWriteObjectRequestOrBuilder
    • 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 BidiWriteObjectRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static BidiWriteObjectRequest.Builder newBuilder()
    • newBuilder

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

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

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

      public static BidiWriteObjectRequest getDefaultInstance()
    • parser

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

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