Class Write

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.firestore.v1.Write
All Implemented Interfaces:
WriteOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class Write extends com.google.protobuf.GeneratedMessageV3 implements WriteOrBuilder
 A write on a document.
 
Protobuf type google.firestore.v1.Write
See Also:
  • Field Details

    • UPDATE_FIELD_NUMBER

      public static final int UPDATE_FIELD_NUMBER
      See Also:
    • DELETE_FIELD_NUMBER

      public static final int DELETE_FIELD_NUMBER
      See Also:
    • TRANSFORM_FIELD_NUMBER

      public static final int TRANSFORM_FIELD_NUMBER
      See Also:
    • UPDATE_MASK_FIELD_NUMBER

      public static final int UPDATE_MASK_FIELD_NUMBER
      See Also:
    • UPDATE_TRANSFORMS_FIELD_NUMBER

      public static final int UPDATE_TRANSFORMS_FIELD_NUMBER
      See Also:
    • CURRENT_DOCUMENT_FIELD_NUMBER

      public static final int CURRENT_DOCUMENT_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getOperationCase

      public Write.OperationCase getOperationCase()
      Specified by:
      getOperationCase in interface WriteOrBuilder
    • hasUpdate

      public boolean hasUpdate()
       A document to write.
       
      .google.firestore.v1.Document update = 1;
      Specified by:
      hasUpdate in interface WriteOrBuilder
      Returns:
      Whether the update field is set.
    • getUpdate

      public Document getUpdate()
       A document to write.
       
      .google.firestore.v1.Document update = 1;
      Specified by:
      getUpdate in interface WriteOrBuilder
      Returns:
      The update.
    • getUpdateOrBuilder

      public DocumentOrBuilder getUpdateOrBuilder()
       A document to write.
       
      .google.firestore.v1.Document update = 1;
      Specified by:
      getUpdateOrBuilder in interface WriteOrBuilder
    • hasDelete

      public boolean hasDelete()
       A document name to delete. In the format:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string delete = 2;
      Specified by:
      hasDelete in interface WriteOrBuilder
      Returns:
      Whether the delete field is set.
    • getDelete

      public String getDelete()
       A document name to delete. In the format:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string delete = 2;
      Specified by:
      getDelete in interface WriteOrBuilder
      Returns:
      The delete.
    • getDeleteBytes

      public com.google.protobuf.ByteString getDeleteBytes()
       A document name to delete. In the format:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string delete = 2;
      Specified by:
      getDeleteBytes in interface WriteOrBuilder
      Returns:
      The bytes for delete.
    • hasTransform

      public boolean hasTransform()
       Applies a transformation to a document.
       
      .google.firestore.v1.DocumentTransform transform = 6;
      Specified by:
      hasTransform in interface WriteOrBuilder
      Returns:
      Whether the transform field is set.
    • getTransform

      public DocumentTransform getTransform()
       Applies a transformation to a document.
       
      .google.firestore.v1.DocumentTransform transform = 6;
      Specified by:
      getTransform in interface WriteOrBuilder
      Returns:
      The transform.
    • getTransformOrBuilder

      public DocumentTransformOrBuilder getTransformOrBuilder()
       Applies a transformation to a document.
       
      .google.firestore.v1.DocumentTransform transform = 6;
      Specified by:
      getTransformOrBuilder in interface WriteOrBuilder
    • hasUpdateMask

      public boolean hasUpdateMask()
       The fields to update in this write.
      
       This field can be set only when the operation is `update`.
       If the mask is not set for an `update` and the document exists, any
       existing data will be overwritten.
       If the mask is set and the document on the server has fields not covered by
       the mask, they are left unchanged.
       Fields referenced in the mask, but not present in the input document, are
       deleted from the document on the server.
       The field paths in this mask must not contain a reserved field name.
       
      .google.firestore.v1.DocumentMask update_mask = 3;
      Specified by:
      hasUpdateMask in interface WriteOrBuilder
      Returns:
      Whether the updateMask field is set.
    • getUpdateMask

      public DocumentMask getUpdateMask()
       The fields to update in this write.
      
       This field can be set only when the operation is `update`.
       If the mask is not set for an `update` and the document exists, any
       existing data will be overwritten.
       If the mask is set and the document on the server has fields not covered by
       the mask, they are left unchanged.
       Fields referenced in the mask, but not present in the input document, are
       deleted from the document on the server.
       The field paths in this mask must not contain a reserved field name.
       
      .google.firestore.v1.DocumentMask update_mask = 3;
      Specified by:
      getUpdateMask in interface WriteOrBuilder
      Returns:
      The updateMask.
    • getUpdateMaskOrBuilder

      public DocumentMaskOrBuilder getUpdateMaskOrBuilder()
       The fields to update in this write.
      
       This field can be set only when the operation is `update`.
       If the mask is not set for an `update` and the document exists, any
       existing data will be overwritten.
       If the mask is set and the document on the server has fields not covered by
       the mask, they are left unchanged.
       Fields referenced in the mask, but not present in the input document, are
       deleted from the document on the server.
       The field paths in this mask must not contain a reserved field name.
       
      .google.firestore.v1.DocumentMask update_mask = 3;
      Specified by:
      getUpdateMaskOrBuilder in interface WriteOrBuilder
    • getUpdateTransformsList

      public List<DocumentTransform.FieldTransform> getUpdateTransformsList()
       The transforms to perform after update.
      
       This field can be set only when the operation is `update`. If present, this
       write is equivalent to performing `update` and `transform` to the same
       document atomically and in order.
       
      repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      Specified by:
      getUpdateTransformsList in interface WriteOrBuilder
    • getUpdateTransformsOrBuilderList

      public List<? extends DocumentTransform.FieldTransformOrBuilder> getUpdateTransformsOrBuilderList()
       The transforms to perform after update.
      
       This field can be set only when the operation is `update`. If present, this
       write is equivalent to performing `update` and `transform` to the same
       document atomically and in order.
       
      repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      Specified by:
      getUpdateTransformsOrBuilderList in interface WriteOrBuilder
    • getUpdateTransformsCount

      public int getUpdateTransformsCount()
       The transforms to perform after update.
      
       This field can be set only when the operation is `update`. If present, this
       write is equivalent to performing `update` and `transform` to the same
       document atomically and in order.
       
      repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      Specified by:
      getUpdateTransformsCount in interface WriteOrBuilder
    • getUpdateTransforms

      public DocumentTransform.FieldTransform getUpdateTransforms(int index)
       The transforms to perform after update.
      
       This field can be set only when the operation is `update`. If present, this
       write is equivalent to performing `update` and `transform` to the same
       document atomically and in order.
       
      repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      Specified by:
      getUpdateTransforms in interface WriteOrBuilder
    • getUpdateTransformsOrBuilder

      public DocumentTransform.FieldTransformOrBuilder getUpdateTransformsOrBuilder(int index)
       The transforms to perform after update.
      
       This field can be set only when the operation is `update`. If present, this
       write is equivalent to performing `update` and `transform` to the same
       document atomically and in order.
       
      repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      Specified by:
      getUpdateTransformsOrBuilder in interface WriteOrBuilder
    • hasCurrentDocument

      public boolean hasCurrentDocument()
       An optional precondition on the document.
      
       The write will fail if this is set and not met by the target document.
       
      .google.firestore.v1.Precondition current_document = 4;
      Specified by:
      hasCurrentDocument in interface WriteOrBuilder
      Returns:
      Whether the currentDocument field is set.
    • getCurrentDocument

      public Precondition getCurrentDocument()
       An optional precondition on the document.
      
       The write will fail if this is set and not met by the target document.
       
      .google.firestore.v1.Precondition current_document = 4;
      Specified by:
      getCurrentDocument in interface WriteOrBuilder
      Returns:
      The currentDocument.
    • getCurrentDocumentOrBuilder

      public PreconditionOrBuilder getCurrentDocumentOrBuilder()
       An optional precondition on the document.
      
       The write will fail if this is set and not met by the target document.
       
      .google.firestore.v1.Precondition current_document = 4;
      Specified by:
      getCurrentDocumentOrBuilder in interface WriteOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Write parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Write parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Write parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Write parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Write parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Write parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Write parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Write.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Write.Builder newBuilder()
    • newBuilder

      public static Write.Builder newBuilder(Write prototype)
    • toBuilder

      public Write.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Write.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Write getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Write> parser()
    • getParserForType

      public com.google.protobuf.Parser<Write> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Write getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder