Class Document.Builder

java.lang.Object
com.ibm.cloud.cloudant.v1.model.Document.Builder
Enclosing class:
Document

public static class Document.Builder extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
  • Method Details

    • build

      public Document build()
      Builds a Document.
      Returns:
      the new Document instance
    • addConflicts

      public Document.Builder addConflicts(String conflicts)
      Adds a new element to conflicts.
      Parameters:
      conflicts - the new element to be added
      Returns:
      the Document builder
    • addDeletedConflicts

      public Document.Builder addDeletedConflicts(String deletedConflicts)
      Adds a new element to deletedConflicts.
      Parameters:
      deletedConflicts - the new element to be added
      Returns:
      the Document builder
    • addRevsInfo

      public Document.Builder addRevsInfo(DocumentRevisionStatus revsInfo)
      Adds a new element to revsInfo.
      Parameters:
      revsInfo - the new element to be added
      Returns:
      the Document builder
    • attachments

      public Document.Builder attachments(Map<String,Attachment> attachments)
      Set the attachments.
      Parameters:
      attachments - the attachments
      Returns:
      the Document builder
    • conflicts

      public Document.Builder conflicts(List<String> conflicts)
      Set the conflicts. Existing conflicts will be replaced.
      Parameters:
      conflicts - the conflicts
      Returns:
      the Document builder
    • deleted

      public Document.Builder deleted(Boolean deleted)
      Set the deleted.
      Parameters:
      deleted - the deleted
      Returns:
      the Document builder
    • deletedConflicts

      public Document.Builder deletedConflicts(List<String> deletedConflicts)
      Set the deletedConflicts. Existing deletedConflicts will be replaced.
      Parameters:
      deletedConflicts - the deletedConflicts
      Returns:
      the Document builder
    • id

      public Document.Builder id(String id)
      Set the id.
      Parameters:
      id - the id
      Returns:
      the Document builder
    • localSeq

      public Document.Builder localSeq(String localSeq)
      Set the localSeq.
      Parameters:
      localSeq - the localSeq
      Returns:
      the Document builder
    • rev

      public Document.Builder rev(String rev)
      Set the rev.
      Parameters:
      rev - the rev
      Returns:
      the Document builder
    • revisions

      public Document.Builder revisions(Revisions revisions)
      Set the revisions.
      Parameters:
      revisions - the revisions
      Returns:
      the Document builder
    • revsInfo

      public Document.Builder revsInfo(List<DocumentRevisionStatus> revsInfo)
      Set the revsInfo. Existing revsInfo will be replaced.
      Parameters:
      revsInfo - the revsInfo
      Returns:
      the Document builder
    • add

      public Document.Builder add(String name, Object value)
      Add an arbitrary property.
      Parameters:
      name - the name of the property to add
      value - the value of the property to add
      Returns:
      the Document builder