Package com.google.storage.v2
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 Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The data to insert.Optional.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Optional.Optional.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) For resumable uploads.For non-resumable uploads.Required.clone()The data to insert.The data to insert.The data to insert.Optional.Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanOptional.Optional.Optional.Optional.For resumable uploads.com.google.protobuf.ByteStringFor resumable uploads.For non-resumable uploads.For non-resumable uploads.For non-resumable uploads.longRequired.booleanThe data to insert.booleanOptional.booleanOptional.booleanFor resumable uploads.booleanFor non-resumable uploads.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanThe data to insert.Optional.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(WriteObjectRequest other) Optional.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) For non-resumable uploads.The data to insert.setChecksummedData(ChecksummedData.Builder builderForValue) The data to insert.Optional.setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue) Optional.setFinishWrite(boolean value) Optional.Optional.setObjectChecksums(ObjectChecksums.Builder builderForValue) Optional.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setUploadId(String value) For resumable uploads.setUploadIdBytes(com.google.protobuf.ByteString value) For resumable uploads.For non-resumable uploads.setWriteObjectSpec(WriteObjectSpec.Builder builderForValue) For non-resumable uploads.setWriteOffset(long value) Required.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
setField
public WriteObjectRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
setRepeatedField
public WriteObjectRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
addRepeatedField
public WriteObjectRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WriteObjectRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WriteObjectRequest.Builder>- Throws:
IOException
-
getFirstMessageCase
- Specified by:
getFirstMessageCasein interfaceWriteObjectRequestOrBuilder
-
clearFirstMessage
-
getDataCase
- Specified by:
getDataCasein interfaceWriteObjectRequestOrBuilder
-
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:
hasUploadIdin interfaceWriteObjectRequestOrBuilder- Returns:
- Whether the uploadId field is set.
-
getUploadId
For resumable uploads. This should be the `upload_id` returned from a call to `StartResumableWriteResponse`.
string upload_id = 1;- Specified by:
getUploadIdin interfaceWriteObjectRequestOrBuilder- 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:
getUploadIdBytesin interfaceWriteObjectRequestOrBuilder- Returns:
- The bytes for uploadId.
-
setUploadId
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
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
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:
hasWriteObjectSpecin interfaceWriteObjectRequestOrBuilder- Returns:
- Whether the writeObjectSpec field is set.
-
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:
getWriteObjectSpecin interfaceWriteObjectRequestOrBuilder- Returns:
- The writeObjectSpec.
-
setWriteObjectSpec
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
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
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
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
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
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:
getWriteObjectSpecOrBuilderin interfaceWriteObjectRequestOrBuilder
-
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:
getWriteOffsetin interfaceWriteObjectRequestOrBuilder- Returns:
- The writeOffset.
-
setWriteOffset
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
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:
hasChecksummedDatain interfaceWriteObjectRequestOrBuilder- Returns:
- Whether the checksummedData field is set.
-
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:
getChecksummedDatain interfaceWriteObjectRequestOrBuilder- Returns:
- The checksummedData.
-
setChecksummedData
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
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
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
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
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
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:
getChecksummedDataOrBuilderin interfaceWriteObjectRequestOrBuilder
-
hasObjectChecksums
public boolean hasObjectChecksums()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasObjectChecksumsin interfaceWriteObjectRequestOrBuilder- Returns:
- Whether the objectChecksums field is set.
-
getObjectChecksums
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getObjectChecksumsin interfaceWriteObjectRequestOrBuilder- Returns:
- The objectChecksums.
-
setObjectChecksums
Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; -
setObjectChecksums
Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; -
mergeObjectChecksums
Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; -
clearObjectChecksums
Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; -
getObjectChecksumsBuilder
Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; -
getObjectChecksumsOrBuilder
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getObjectChecksumsOrBuilderin interfaceWriteObjectRequestOrBuilder
-
getFinishWrite
public boolean getFinishWrite()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getFinishWritein interfaceWriteObjectRequestOrBuilder- Returns:
- The finishWrite.
-
setFinishWrite
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The finishWrite to set.- Returns:
- This builder for chaining.
-
clearFinishWrite
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
hasCommonObjectRequestParams
public boolean hasCommonObjectRequestParams()Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasCommonObjectRequestParamsin interfaceWriteObjectRequestOrBuilder- Returns:
- Whether the commonObjectRequestParams field is set.
-
getCommonObjectRequestParams
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCommonObjectRequestParamsin interfaceWriteObjectRequestOrBuilder- Returns:
- The commonObjectRequestParams.
-
setCommonObjectRequestParams
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; -
setCommonObjectRequestParams
public WriteObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue) Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; -
mergeCommonObjectRequestParams
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; -
clearCommonObjectRequestParams
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getCommonObjectRequestParamsBuilder
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getCommonObjectRequestParamsOrBuilder
Optional. A set of parameters common to Storage API requests concerning an object.
.google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCommonObjectRequestParamsOrBuilderin interfaceWriteObjectRequestOrBuilder
-
setUnknownFields
public final WriteObjectRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-
mergeUnknownFields
public final WriteObjectRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectRequest.Builder>
-