Class WriteObjectRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
com.google.storage.v2.WriteObjectRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, WriteObjectRequestOrBuilder, Cloneable
Enclosing class:
WriteObjectRequest

public static final class WriteObjectRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder> implements WriteObjectRequestOrBuilder
 Request message for WriteObject.
 
Protobuf type google.storage.v2.WriteObjectRequest
  • 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<WriteObjectRequest.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<WriteObjectRequest.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<WriteObjectRequest.Builder>
    • getDefaultInstanceForType

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

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

      public WriteObjectRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<WriteObjectRequest.Builder>
    • setField

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • clearField

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • clearOneof

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • setRepeatedField

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • addRepeatedField

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • mergeFrom

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
    • mergeFrom

      public WriteObjectRequest.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<WriteObjectRequest.Builder>
      Throws:
      IOException
    • getFirstMessageCase

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

      public WriteObjectRequest.Builder clearFirstMessage()
    • getDataCase

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

      public WriteObjectRequest.Builder clearData()
    • 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.
    • setUploadId

      public WriteObjectRequest.Builder setUploadId(String value)
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Parameters:
      value - The uploadId to set.
      Returns:
      This builder for chaining.
    • clearUploadId

      public WriteObjectRequest.Builder clearUploadId()
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Returns:
      This builder for chaining.
    • setUploadIdBytes

      public WriteObjectRequest.Builder setUploadIdBytes(com.google.protobuf.ByteString value)
       For resumable uploads. This should be the `upload_id` returned from a
       call to `StartResumableWriteResponse`.
       
      string upload_id = 1;
      Parameters:
      value - The bytes for uploadId to set.
      Returns:
      This builder for chaining.
    • 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.
    • setWriteObjectSpec

      public WriteObjectRequest.Builder setWriteObjectSpec(WriteObjectSpec value)
       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;
    • setWriteObjectSpec

      public WriteObjectRequest.Builder setWriteObjectSpec(WriteObjectSpec.Builder builderForValue)
       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;
    • mergeWriteObjectSpec

      public WriteObjectRequest.Builder mergeWriteObjectSpec(WriteObjectSpec value)
       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;
    • clearWriteObjectSpec

      public WriteObjectRequest.Builder clearWriteObjectSpec()
       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;
    • getWriteObjectSpecBuilder

      public WriteObjectSpec.Builder getWriteObjectSpecBuilder()
       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;
    • 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.
    • setWriteOffset

      public WriteObjectRequest.Builder setWriteOffset(long value)
       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];
      Parameters:
      value - The writeOffset to set.
      Returns:
      This builder for chaining.
    • clearWriteOffset

      public WriteObjectRequest.Builder clearWriteOffset()
       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];
      Returns:
      This builder for chaining.
    • 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.
    • setChecksummedData

      public WriteObjectRequest.Builder setChecksummedData(ChecksummedData value)
       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;
    • setChecksummedData

      public WriteObjectRequest.Builder setChecksummedData(ChecksummedData.Builder builderForValue)
       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;
    • mergeChecksummedData

      public WriteObjectRequest.Builder mergeChecksummedData(ChecksummedData value)
       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;
    • clearChecksummedData

      public WriteObjectRequest.Builder clearChecksummedData()
       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;
    • getChecksummedDataBuilder

      public ChecksummedData.Builder getChecksummedDataBuilder()
       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;
    • 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.
    • setObjectChecksums

      public WriteObjectRequest.Builder setObjectChecksums(ObjectChecksums value)
       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;
    • setObjectChecksums

      public WriteObjectRequest.Builder setObjectChecksums(ObjectChecksums.Builder builderForValue)
       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;
    • mergeObjectChecksums

      public WriteObjectRequest.Builder mergeObjectChecksums(ObjectChecksums value)
       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;
    • clearObjectChecksums

      public WriteObjectRequest.Builder clearObjectChecksums()
       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;
    • getObjectChecksumsBuilder

      public ObjectChecksums.Builder getObjectChecksumsBuilder()
       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;
    • 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.
    • setFinishWrite

      public WriteObjectRequest.Builder setFinishWrite(boolean value)
       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;
      Parameters:
      value - The finishWrite to set.
      Returns:
      This builder for chaining.
    • clearFinishWrite

      public WriteObjectRequest.Builder clearFinishWrite()
       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;
      Returns:
      This builder for chaining.
    • 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.
    • setCommonObjectRequestParams

      public WriteObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams value)
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
    • setCommonObjectRequestParams

      public WriteObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
    • mergeCommonObjectRequestParams

      public WriteObjectRequest.Builder mergeCommonObjectRequestParams(CommonObjectRequestParams value)
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
    • clearCommonObjectRequestParams

      public WriteObjectRequest.Builder clearCommonObjectRequestParams()
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
    • getCommonObjectRequestParamsBuilder

      public CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder()
       A set of parameters common to Storage API requests concerning an object.
       
      .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8;
    • 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
    • setUnknownFields

      public final WriteObjectRequest.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<WriteObjectRequest.Builder>
    • mergeUnknownFields

      public final WriteObjectRequest.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<WriteObjectRequest.Builder>