Class CreateDocumentRequest.Builder

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

public static final class CreateDocumentRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CreateDocumentRequest.Builder> implements CreateDocumentRequestOrBuilder
 The request for
 [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].
 
Protobuf type google.firestore.v1.CreateDocumentRequest
  • 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<CreateDocumentRequest.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<CreateDocumentRequest.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<CreateDocumentRequest.Builder>
    • getDefaultInstanceForType

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

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

      public CreateDocumentRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<CreateDocumentRequest.Builder>
    • setField

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

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

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

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

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

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

    • isInitialized

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

      public CreateDocumentRequest.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<CreateDocumentRequest.Builder>
      Throws:
      IOException
    • getParent

      public String getParent()
       Required. The parent resource. For example:
       `projects/{project_id}/databases/{database_id}/documents` or
       `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getParent in interface CreateDocumentRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       Required. The parent resource. For example:
       `projects/{project_id}/databases/{database_id}/documents` or
       `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getParentBytes in interface CreateDocumentRequestOrBuilder
      Returns:
      The bytes for parent.
    • setParent

      public CreateDocumentRequest.Builder setParent(String value)
       Required. The parent resource. For example:
       `projects/{project_id}/databases/{database_id}/documents` or
       `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The parent to set.
      Returns:
      This builder for chaining.
    • clearParent

      public CreateDocumentRequest.Builder clearParent()
       Required. The parent resource. For example:
       `projects/{project_id}/databases/{database_id}/documents` or
       `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setParentBytes

      public CreateDocumentRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
       Required. The parent resource. For example:
       `projects/{project_id}/databases/{database_id}/documents` or
       `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
       
      string parent = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for parent to set.
      Returns:
      This builder for chaining.
    • getCollectionId

      public String getCollectionId()
       Required. The collection ID, relative to `parent`, to list. For example:
       `chatrooms`.
       
      string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCollectionId in interface CreateDocumentRequestOrBuilder
      Returns:
      The collectionId.
    • getCollectionIdBytes

      public com.google.protobuf.ByteString getCollectionIdBytes()
       Required. The collection ID, relative to `parent`, to list. For example:
       `chatrooms`.
       
      string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCollectionIdBytes in interface CreateDocumentRequestOrBuilder
      Returns:
      The bytes for collectionId.
    • setCollectionId

      public CreateDocumentRequest.Builder setCollectionId(String value)
       Required. The collection ID, relative to `parent`, to list. For example:
       `chatrooms`.
       
      string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The collectionId to set.
      Returns:
      This builder for chaining.
    • clearCollectionId

      public CreateDocumentRequest.Builder clearCollectionId()
       Required. The collection ID, relative to `parent`, to list. For example:
       `chatrooms`.
       
      string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setCollectionIdBytes

      public CreateDocumentRequest.Builder setCollectionIdBytes(com.google.protobuf.ByteString value)
       Required. The collection ID, relative to `parent`, to list. For example:
       `chatrooms`.
       
      string collection_id = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for collectionId to set.
      Returns:
      This builder for chaining.
    • getDocumentId

      public String getDocumentId()
       The client-assigned document ID to use for this document.
      
       Optional. If not specified, an ID will be assigned by the service.
       
      string document_id = 3;
      Specified by:
      getDocumentId in interface CreateDocumentRequestOrBuilder
      Returns:
      The documentId.
    • getDocumentIdBytes

      public com.google.protobuf.ByteString getDocumentIdBytes()
       The client-assigned document ID to use for this document.
      
       Optional. If not specified, an ID will be assigned by the service.
       
      string document_id = 3;
      Specified by:
      getDocumentIdBytes in interface CreateDocumentRequestOrBuilder
      Returns:
      The bytes for documentId.
    • setDocumentId

      public CreateDocumentRequest.Builder setDocumentId(String value)
       The client-assigned document ID to use for this document.
      
       Optional. If not specified, an ID will be assigned by the service.
       
      string document_id = 3;
      Parameters:
      value - The documentId to set.
      Returns:
      This builder for chaining.
    • clearDocumentId

      public CreateDocumentRequest.Builder clearDocumentId()
       The client-assigned document ID to use for this document.
      
       Optional. If not specified, an ID will be assigned by the service.
       
      string document_id = 3;
      Returns:
      This builder for chaining.
    • setDocumentIdBytes

      public CreateDocumentRequest.Builder setDocumentIdBytes(com.google.protobuf.ByteString value)
       The client-assigned document ID to use for this document.
      
       Optional. If not specified, an ID will be assigned by the service.
       
      string document_id = 3;
      Parameters:
      value - The bytes for documentId to set.
      Returns:
      This builder for chaining.
    • hasDocument

      public boolean hasDocument()
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasDocument in interface CreateDocumentRequestOrBuilder
      Returns:
      Whether the document field is set.
    • getDocument

      public Document getDocument()
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDocument in interface CreateDocumentRequestOrBuilder
      Returns:
      The document.
    • setDocument

      public CreateDocumentRequest.Builder setDocument(Document value)
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
    • setDocument

      public CreateDocumentRequest.Builder setDocument(Document.Builder builderForValue)
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
    • mergeDocument

      public CreateDocumentRequest.Builder mergeDocument(Document value)
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
    • clearDocument

      public CreateDocumentRequest.Builder clearDocument()
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
    • getDocumentBuilder

      public Document.Builder getDocumentBuilder()
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
    • getDocumentOrBuilder

      public DocumentOrBuilder getDocumentOrBuilder()
       Required. The document to create. `name` must not be set.
       
      .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDocumentOrBuilder in interface CreateDocumentRequestOrBuilder
    • hasMask

      public boolean hasMask()
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
      Specified by:
      hasMask in interface CreateDocumentRequestOrBuilder
      Returns:
      Whether the mask field is set.
    • getMask

      public DocumentMask getMask()
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
      Specified by:
      getMask in interface CreateDocumentRequestOrBuilder
      Returns:
      The mask.
    • setMask

       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
    • setMask

      public CreateDocumentRequest.Builder setMask(DocumentMask.Builder builderForValue)
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
    • mergeMask

      public CreateDocumentRequest.Builder mergeMask(DocumentMask value)
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
    • clearMask

      public CreateDocumentRequest.Builder clearMask()
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
    • getMaskBuilder

      public DocumentMask.Builder getMaskBuilder()
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
    • getMaskOrBuilder

      public DocumentMaskOrBuilder getMaskOrBuilder()
       The fields to return. If not set, returns all fields.
      
       If the document has a field that is not present in this mask, that field
       will not be returned in the response.
       
      .google.firestore.v1.DocumentMask mask = 5;
      Specified by:
      getMaskOrBuilder in interface CreateDocumentRequestOrBuilder
    • setUnknownFields

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

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