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 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<WriteObjectSpec.Builder>
    • clear

      public WriteObjectSpec.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<WriteObjectSpec.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<WriteObjectSpec.Builder>
    • getDefaultInstanceForType

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

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

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

      public WriteObjectSpec.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<WriteObjectSpec.Builder>
    • setField

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

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

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

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

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

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

      public WriteObjectSpec.Builder mergeFrom(WriteObjectSpec other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      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<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:
      hasResource in interface WriteObjectSpecOrBuilder
      Returns:
      Whether the resource field is set.
    • getResource

      public Object getResource()
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getResource in interface WriteObjectSpecOrBuilder
      Returns:
      The resource.
    • setResource

      public WriteObjectSpec.Builder setResource(Object value)
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
    • setResource

      public WriteObjectSpec.Builder setResource(Object.Builder builderForValue)
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
    • mergeResource

      public WriteObjectSpec.Builder mergeResource(Object value)
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
    • clearResource

      public WriteObjectSpec.Builder clearResource()
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
    • getResourceBuilder

      public Object.Builder getResourceBuilder()
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
    • getResourceOrBuilder

      public ObjectOrBuilder getResourceOrBuilder()
       Required. Destination object, including its name and its metadata.
       
      .google.storage.v2.Object resource = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getResourceOrBuilder in interface WriteObjectSpecOrBuilder
    • getPredefinedAcl

      public String getPredefinedAcl()
       Apply a predefined set of access controls to this object.
       Valid values are "authenticatedRead", "bucketOwnerFullControl",
       "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
       
      string predefined_acl = 7;
      Specified by:
      getPredefinedAcl in interface WriteObjectSpecOrBuilder
      Returns:
      The predefinedAcl.
    • getPredefinedAclBytes

      public com.google.protobuf.ByteString getPredefinedAclBytes()
       Apply a predefined set of access controls to this object.
       Valid values are "authenticatedRead", "bucketOwnerFullControl",
       "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
       
      string predefined_acl = 7;
      Specified by:
      getPredefinedAclBytes in interface WriteObjectSpecOrBuilder
      Returns:
      The bytes for predefinedAcl.
    • setPredefinedAcl

      public WriteObjectSpec.Builder setPredefinedAcl(String value)
       Apply a predefined set of access controls to this object.
       Valid values are "authenticatedRead", "bucketOwnerFullControl",
       "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
       
      string predefined_acl = 7;
      Parameters:
      value - The predefinedAcl to set.
      Returns:
      This builder for chaining.
    • clearPredefinedAcl

      public WriteObjectSpec.Builder clearPredefinedAcl()
       Apply a predefined set of access controls to this object.
       Valid values are "authenticatedRead", "bucketOwnerFullControl",
       "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
       
      string predefined_acl = 7;
      Returns:
      This builder for chaining.
    • setPredefinedAclBytes

      public WriteObjectSpec.Builder setPredefinedAclBytes(com.google.protobuf.ByteString value)
       Apply a predefined set of access controls to this object.
       Valid values are "authenticatedRead", "bucketOwnerFullControl",
       "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
       
      string predefined_acl = 7;
      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:
      hasIfGenerationMatch in interface WriteObjectSpecOrBuilder
      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:
      getIfGenerationMatch in interface WriteObjectSpecOrBuilder
      Returns:
      The ifGenerationMatch.
    • setIfGenerationMatch

      public WriteObjectSpec.Builder setIfGenerationMatch(long value)
       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

      public WriteObjectSpec.Builder 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:
      hasIfGenerationNotMatch in interface WriteObjectSpecOrBuilder
      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:
      getIfGenerationNotMatch in interface WriteObjectSpecOrBuilder
      Returns:
      The ifGenerationNotMatch.
    • setIfGenerationNotMatch

      public WriteObjectSpec.Builder setIfGenerationNotMatch(long value)
       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

      public WriteObjectSpec.Builder 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:
      hasIfMetagenerationMatch in interface WriteObjectSpecOrBuilder
      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:
      getIfMetagenerationMatch in interface WriteObjectSpecOrBuilder
      Returns:
      The ifMetagenerationMatch.
    • setIfMetagenerationMatch

      public WriteObjectSpec.Builder setIfMetagenerationMatch(long value)
       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

      public WriteObjectSpec.Builder 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:
      hasIfMetagenerationNotMatch in interface WriteObjectSpecOrBuilder
      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:
      getIfMetagenerationNotMatch in interface WriteObjectSpecOrBuilder
      Returns:
      The ifMetagenerationNotMatch.
    • setIfMetagenerationNotMatch

      public WriteObjectSpec.Builder setIfMetagenerationNotMatch(long value)
       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

      public WriteObjectSpec.Builder 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:
      hasObjectSize in interface WriteObjectSpecOrBuilder
      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:
      getObjectSize in interface WriteObjectSpecOrBuilder
      Returns:
      The objectSize.
    • setObjectSize

      public WriteObjectSpec.Builder setObjectSize(long value)
       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

      public WriteObjectSpec.Builder 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:
      hasAppendable in interface WriteObjectSpecOrBuilder
      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:
      getAppendable in interface WriteObjectSpecOrBuilder
      Returns:
      The appendable.
    • setAppendable

      public WriteObjectSpec.Builder setAppendable(boolean value)
       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

      public WriteObjectSpec.Builder 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:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WriteObjectSpec.Builder>
    • mergeUnknownFields

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