Package com.google.storage.v2
Class WriteObjectSpec.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
com.google.storage.v2.WriteObjectSpec.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,WriteObjectSpecOrBuilder,Cloneable
- Enclosing class:
- WriteObjectSpec
public static final class WriteObjectSpec.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
implements WriteObjectSpecOrBuilder
Describes an attempt to insert an object, possibly over multiple requests.Protobuf type
google.storage.v2.WriteObjectSpec-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()If true, the object will be created in appendable mode.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Makes the operation conditional on whether the object's current generation matches the given value.Makes the operation conditional on whether the object's live generation does not match the given value.Makes the operation conditional on whether the object's current metageneration matches the given value.Makes the operation conditional on whether the object's current metageneration does not match the given value.The expected final object size being uploaded.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Optional.Required.clone()booleanIf true, the object will be created in appendable mode.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongMakes the operation conditional on whether the object's current generation matches the given value.longMakes the operation conditional on whether the object's live generation does not match the given value.longMakes the operation conditional on whether the object's current metageneration matches the given value.longMakes the operation conditional on whether the object's current metageneration does not match the given value.longThe expected final object size being uploaded.Optional.com.google.protobuf.ByteStringOptional.Required.Required.Required.booleanIf true, the object will be created in appendable mode.booleanMakes the operation conditional on whether the object's current generation matches the given value.booleanMakes the operation conditional on whether the object's live generation does not match the given value.booleanMakes the operation conditional on whether the object's current metageneration matches the given value.booleanMakes the operation conditional on whether the object's current metageneration does not match the given value.booleanThe expected final object size being uploaded.booleanRequired.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(WriteObjectSpec other) mergeResource(Object value) Required.final WriteObjectSpec.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setAppendable(boolean value) If true, the object will be created in appendable mode.setIfGenerationMatch(long value) Makes the operation conditional on whether the object's current generation matches the given value.setIfGenerationNotMatch(long value) Makes the operation conditional on whether the object's live generation does not match the given value.setIfMetagenerationMatch(long value) Makes the operation conditional on whether the object's current metageneration matches the given value.setIfMetagenerationNotMatch(long value) Makes the operation conditional on whether the object's current metageneration does not match the given value.setObjectSize(long value) The expected final object size being uploaded.setPredefinedAcl(String value) Optional.setPredefinedAclBytes(com.google.protobuf.ByteString value) Optional.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setResource(Object value) Required.setResource(Object.Builder builderForValue) Required.final WriteObjectSpec.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) 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<WriteObjectSpec.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<WriteObjectSpec.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<WriteObjectSpec.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<WriteObjectSpec.Builder>
-
setField
public WriteObjectSpec.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<WriteObjectSpec.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
-
setRepeatedField
public WriteObjectSpec.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<WriteObjectSpec.Builder>
-
addRepeatedField
public WriteObjectSpec.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<WriteObjectSpec.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WriteObjectSpec.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
-
mergeFrom
public WriteObjectSpec.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<WriteObjectSpec.Builder>- Throws:
IOException
-
hasResource
public boolean hasResource()Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
hasResourcein interfaceWriteObjectSpecOrBuilder- Returns:
- Whether the resource field is set.
-
getResource
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getResourcein interfaceWriteObjectSpecOrBuilder- Returns:
- The resource.
-
setResource
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED]; -
setResource
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED]; -
mergeResource
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED]; -
clearResource
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED]; -
getResourceBuilder
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED]; -
getResourceOrBuilder
Required. Destination object, including its name and its metadata.
.google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getResourceOrBuilderin interfaceWriteObjectSpecOrBuilder
-
getPredefinedAcl
Optional. Apply a predefined set of access controls to this object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPredefinedAclin interfaceWriteObjectSpecOrBuilder- Returns:
- The predefinedAcl.
-
getPredefinedAclBytes
public com.google.protobuf.ByteString getPredefinedAclBytes()Optional. Apply a predefined set of access controls to this object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPredefinedAclBytesin interfaceWriteObjectSpecOrBuilder- Returns:
- The bytes for predefinedAcl.
-
setPredefinedAcl
Optional. Apply a predefined set of access controls to this object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The predefinedAcl to set.- Returns:
- This builder for chaining.
-
clearPredefinedAcl
Optional. Apply a predefined set of access controls to this object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setPredefinedAclBytes
Optional. Apply a predefined set of access controls to this object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for predefinedAcl to set.- Returns:
- This builder for chaining.
-
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 = 3;- Specified by:
hasIfGenerationMatchin interfaceWriteObjectSpecOrBuilder- 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 = 3;- Specified by:
getIfGenerationMatchin interfaceWriteObjectSpecOrBuilder- Returns:
- The ifGenerationMatch.
-
setIfGenerationMatch
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 = 3;- Parameters:
value- The ifGenerationMatch to set.- Returns:
- This builder for chaining.
-
clearIfGenerationMatch
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 = 3;- Returns:
- This builder for chaining.
-
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 = 4;- Specified by:
hasIfGenerationNotMatchin interfaceWriteObjectSpecOrBuilder- 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 = 4;- Specified by:
getIfGenerationNotMatchin interfaceWriteObjectSpecOrBuilder- Returns:
- The ifGenerationNotMatch.
-
setIfGenerationNotMatch
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 = 4;- Parameters:
value- The ifGenerationNotMatch to set.- Returns:
- This builder for chaining.
-
clearIfGenerationNotMatch
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 = 4;- Returns:
- This builder for chaining.
-
hasIfMetagenerationMatch
public boolean hasIfMetagenerationMatch()Makes the operation conditional on whether the object's current metageneration matches the given value.
optional int64 if_metageneration_match = 5;- Specified by:
hasIfMetagenerationMatchin interfaceWriteObjectSpecOrBuilder- 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 = 5;- Specified by:
getIfMetagenerationMatchin interfaceWriteObjectSpecOrBuilder- Returns:
- The ifMetagenerationMatch.
-
setIfMetagenerationMatch
Makes the operation conditional on whether the object's current metageneration matches the given value.
optional int64 if_metageneration_match = 5;- Parameters:
value- The ifMetagenerationMatch to set.- Returns:
- This builder for chaining.
-
clearIfMetagenerationMatch
Makes the operation conditional on whether the object's current metageneration matches the given value.
optional int64 if_metageneration_match = 5;- Returns:
- This builder for chaining.
-
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 = 6;- Specified by:
hasIfMetagenerationNotMatchin interfaceWriteObjectSpecOrBuilder- 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 = 6;- Specified by:
getIfMetagenerationNotMatchin interfaceWriteObjectSpecOrBuilder- Returns:
- The ifMetagenerationNotMatch.
-
setIfMetagenerationNotMatch
Makes the operation conditional on whether the object's current metageneration does not match the given value.
optional int64 if_metageneration_not_match = 6;- Parameters:
value- The ifMetagenerationNotMatch to set.- Returns:
- This builder for chaining.
-
clearIfMetagenerationNotMatch
Makes the operation conditional on whether the object's current metageneration does not match the given value.
optional int64 if_metageneration_not_match = 6;- Returns:
- This builder for chaining.
-
hasObjectSize
public boolean hasObjectSize()The expected final object size being uploaded. If this value is set, closing the stream after writing fewer or more than `object_size` bytes will result in an OUT_OF_RANGE error. This situation is considered a client error, and if such an error occurs you must start the upload over from scratch, this time sending the correct number of bytes.
optional int64 object_size = 8;- Specified by:
hasObjectSizein interfaceWriteObjectSpecOrBuilder- Returns:
- Whether the objectSize field is set.
-
getObjectSize
public long getObjectSize()The expected final object size being uploaded. If this value is set, closing the stream after writing fewer or more than `object_size` bytes will result in an OUT_OF_RANGE error. This situation is considered a client error, and if such an error occurs you must start the upload over from scratch, this time sending the correct number of bytes.
optional int64 object_size = 8;- Specified by:
getObjectSizein interfaceWriteObjectSpecOrBuilder- Returns:
- The objectSize.
-
setObjectSize
The expected final object size being uploaded. If this value is set, closing the stream after writing fewer or more than `object_size` bytes will result in an OUT_OF_RANGE error. This situation is considered a client error, and if such an error occurs you must start the upload over from scratch, this time sending the correct number of bytes.
optional int64 object_size = 8;- Parameters:
value- The objectSize to set.- Returns:
- This builder for chaining.
-
clearObjectSize
The expected final object size being uploaded. If this value is set, closing the stream after writing fewer or more than `object_size` bytes will result in an OUT_OF_RANGE error. This situation is considered a client error, and if such an error occurs you must start the upload over from scratch, this time sending the correct number of bytes.
optional int64 object_size = 8;- Returns:
- This builder for chaining.
-
hasAppendable
public boolean hasAppendable()If true, the object will be created in appendable mode. This field may only be set when using BidiWriteObject.
optional bool appendable = 9;- Specified by:
hasAppendablein interfaceWriteObjectSpecOrBuilder- Returns:
- Whether the appendable field is set.
-
getAppendable
public boolean getAppendable()If true, the object will be created in appendable mode. This field may only be set when using BidiWriteObject.
optional bool appendable = 9;- Specified by:
getAppendablein interfaceWriteObjectSpecOrBuilder- Returns:
- The appendable.
-
setAppendable
If true, the object will be created in appendable mode. This field may only be set when using BidiWriteObject.
optional bool appendable = 9;- Parameters:
value- The appendable to set.- Returns:
- This builder for chaining.
-
clearAppendable
If true, the object will be created in appendable mode. This field may only be set when using BidiWriteObject.
optional bool appendable = 9;- Returns:
- This builder for chaining.
-
setUnknownFields
public final WriteObjectSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
-
mergeUnknownFields
public final WriteObjectSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
-