Class Document.Builder

java.lang.Object
com.google.genai.types.Document.Builder
Enclosing class:
Document

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

    • Builder

      public Builder()
  • Method Details

    • name

      public abstract Document.Builder name(String name)
      Setter for name.

      name: The resource name of the Document. Example: fileSearchStores/file-search-store-foo/documents/documents-bar

    • clearName

      @CanIgnoreReturnValue public Document.Builder clearName()
      Clears the value of name field.
    • displayName

      public abstract Document.Builder displayName(String displayName)
      Setter for displayName.

      displayName: The human-readable display name for the Document.

    • clearDisplayName

      @CanIgnoreReturnValue public Document.Builder clearDisplayName()
      Clears the value of displayName field.
    • state

      public abstract Document.Builder state(DocumentState state)
      Setter for state.

      state: The current state of the Document.

    • clearState

      @CanIgnoreReturnValue public Document.Builder clearState()
      Clears the value of state field.
    • state

      @CanIgnoreReturnValue public Document.Builder state(DocumentState.Known knownType)
      Setter for state given a known enum.

      state: The current state of the Document.

    • state

      @CanIgnoreReturnValue public Document.Builder state(String state)
      Setter for state given a string.

      state: The current state of the Document.

    • sizeBytes

      public abstract Document.Builder sizeBytes(Long sizeBytes)
      Setter for sizeBytes.

      sizeBytes: The size of the Document in bytes.

    • clearSizeBytes

      @CanIgnoreReturnValue public Document.Builder clearSizeBytes()
      Clears the value of sizeBytes field.
    • mimeType

      public abstract Document.Builder mimeType(String mimeType)
      Setter for mimeType.

      mimeType: The MIME type of the Document.

    • clearMimeType

      @CanIgnoreReturnValue public Document.Builder clearMimeType()
      Clears the value of mimeType field.
    • createTime

      public abstract Document.Builder createTime(Instant createTime)
      Setter for createTime.

      createTime: Output only. The Timestamp of when the `Document` was created.

    • clearCreateTime

      @CanIgnoreReturnValue public Document.Builder clearCreateTime()
      Clears the value of createTime field.
    • customMetadata

      public abstract Document.Builder customMetadata(List<CustomMetadata> customMetadata)
      Setter for customMetadata.

      customMetadata: Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.

    • customMetadata

      @CanIgnoreReturnValue public Document.Builder customMetadata(CustomMetadata... customMetadata)
      Setter for customMetadata.

      customMetadata: Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.

    • customMetadata

      @CanIgnoreReturnValue public Document.Builder customMetadata(CustomMetadata.Builder... customMetadataBuilders)
      Setter for customMetadata builder.

      customMetadata: Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.

    • clearCustomMetadata

      @CanIgnoreReturnValue public Document.Builder clearCustomMetadata()
      Clears the value of customMetadata field.
    • updateTime

      public abstract Document.Builder updateTime(Instant updateTime)
      Setter for updateTime.

      updateTime: Output only. The Timestamp of when the `Document` was last updated.

    • clearUpdateTime

      @CanIgnoreReturnValue public Document.Builder clearUpdateTime()
      Clears the value of updateTime field.
    • build

      public abstract Document build()