Class BatchWriteRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
com.google.firestore.v1.BatchWriteRequest.Builder
All Implemented Interfaces:
BatchWriteRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
BatchWriteRequest

public static final class BatchWriteRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder> implements BatchWriteRequestOrBuilder
 The request for
 [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
 
Protobuf type google.firestore.v1.BatchWriteRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public BatchWriteRequest.Builder mergeFrom(BatchWriteRequest other)
    • isInitialized

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

      public BatchWriteRequest.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<BatchWriteRequest.Builder>
      Throws:
      IOException
    • getDatabase

      public String getDatabase()
       Required. The database name. In the format:
       `projects/{project_id}/databases/{database_id}`.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDatabase in interface BatchWriteRequestOrBuilder
      Returns:
      The database.
    • getDatabaseBytes

      public com.google.protobuf.ByteString getDatabaseBytes()
       Required. The database name. In the format:
       `projects/{project_id}/databases/{database_id}`.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDatabaseBytes in interface BatchWriteRequestOrBuilder
      Returns:
      The bytes for database.
    • setDatabase

      public BatchWriteRequest.Builder setDatabase(String value)
       Required. The database name. In the format:
       `projects/{project_id}/databases/{database_id}`.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The database to set.
      Returns:
      This builder for chaining.
    • clearDatabase

      public BatchWriteRequest.Builder clearDatabase()
       Required. The database name. In the format:
       `projects/{project_id}/databases/{database_id}`.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDatabaseBytes

      public BatchWriteRequest.Builder setDatabaseBytes(com.google.protobuf.ByteString value)
       Required. The database name. In the format:
       `projects/{project_id}/databases/{database_id}`.
       
      string database = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for database to set.
      Returns:
      This builder for chaining.
    • getWritesList

      public List<Write> getWritesList()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
      Specified by:
      getWritesList in interface BatchWriteRequestOrBuilder
    • getWritesCount

      public int getWritesCount()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
      Specified by:
      getWritesCount in interface BatchWriteRequestOrBuilder
    • getWrites

      public Write getWrites(int index)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
      Specified by:
      getWrites in interface BatchWriteRequestOrBuilder
    • setWrites

      public BatchWriteRequest.Builder setWrites(int index, Write value)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • setWrites

      public BatchWriteRequest.Builder setWrites(int index, Write.Builder builderForValue)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addWrites

      public BatchWriteRequest.Builder addWrites(Write value)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addWrites

      public BatchWriteRequest.Builder addWrites(int index, Write value)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addWrites

      public BatchWriteRequest.Builder addWrites(Write.Builder builderForValue)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addWrites

      public BatchWriteRequest.Builder addWrites(int index, Write.Builder builderForValue)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addAllWrites

      public BatchWriteRequest.Builder addAllWrites(Iterable<? extends Write> values)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • clearWrites

      public BatchWriteRequest.Builder clearWrites()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • removeWrites

      public BatchWriteRequest.Builder removeWrites(int index)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • getWritesBuilder

      public Write.Builder getWritesBuilder(int index)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • getWritesOrBuilder

      public WriteOrBuilder getWritesOrBuilder(int index)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
      Specified by:
      getWritesOrBuilder in interface BatchWriteRequestOrBuilder
    • getWritesOrBuilderList

      public List<? extends WriteOrBuilder> getWritesOrBuilderList()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
      Specified by:
      getWritesOrBuilderList in interface BatchWriteRequestOrBuilder
    • addWritesBuilder

      public Write.Builder addWritesBuilder()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • addWritesBuilder

      public Write.Builder addWritesBuilder(int index)
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • getWritesBuilderList

      public List<Write.Builder> getWritesBuilderList()
       The writes to apply.
      
       Method does not apply writes atomically and does not guarantee ordering.
       Each write succeeds or fails independently. You cannot write to the same
       document more than once per request.
       
      repeated .google.firestore.v1.Write writes = 2;
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: BatchWriteRequestOrBuilder
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
      Specified by:
      getLabelsCount in interface BatchWriteRequestOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
      Specified by:
      containsLabels in interface BatchWriteRequestOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface BatchWriteRequestOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
      Specified by:
      getLabelsMap in interface BatchWriteRequestOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
      Specified by:
      getLabelsOrDefault in interface BatchWriteRequestOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
      Specified by:
      getLabelsOrThrow in interface BatchWriteRequestOrBuilder
    • clearLabels

      public BatchWriteRequest.Builder clearLabels()
    • removeLabels

      public BatchWriteRequest.Builder removeLabels(String key)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public BatchWriteRequest.Builder putLabels(String key, String value)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
    • putAllLabels

      public BatchWriteRequest.Builder putAllLabels(Map<String,String> values)
       Labels associated with this batch write.
       
      map<string, string> labels = 3;
    • setUnknownFields

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

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