Class File.Builder

    • Method Detail

      • id

        public File.NameStage id​(@NotNull
                                 java.lang.String id)

        ID for the file.

        Example: "file_xK9mLPqRtN3vS8wF5hB2cQ"

        ID for the file.

        Example: "file_xK9mLPqRtN3vS8wF5hB2cQ"

        Specified by:
        id in interface File.IdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • name

        public File.MetadataStage name​(@NotNull
                                       java.lang.String name)

        The name of the file

        Example: "Invoices.pdf"

        The name of the file

        Example: "Invoices.pdf"

        Specified by:
        name in interface File.NameStage
        Returns:
        Reference to this so that method calls can be chained together.
      • contents

        public File._FinalStage contents​(Nullable<FileContents> contents)

        Deprecated: Use the POST /parse_runs endpoint instead to parse and retrieve file contents. The parse runs endpoint provides more control over parsing configuration and better performance.

        The parsed content of the file. This field will only contain data after the file has been parsed via a parse run, extract run, classify run, split run, edit run, or workflow run.

        Availability: Only present and populated on GET /files/{id} when the file has been previously parsed and the corresponding query parameters are set to true. Will be null on POST /files/upload and for files that haven't been parsed. The structure varies based on file type.

        Specified by:
        contents in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • contents

        public File._FinalStage contents​(FileContents contents)

        Deprecated: Use the POST /parse_runs endpoint instead to parse and retrieve file contents. The parse runs endpoint provides more control over parsing configuration and better performance.

        The parsed content of the file. This field will only contain data after the file has been parsed via a parse run, extract run, classify run, split run, edit run, or workflow run.

        Availability: Only present and populated on GET /files/{id} when the file has been previously parsed and the corresponding query parameters are set to true. Will be null on POST /files/upload and for files that haven't been parsed. The structure varies based on file type.

        Specified by:
        contents in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • contents

        public File._FinalStage contents​(java.util.Optional<FileContents> contents)

        Deprecated: Use the POST /parse_runs endpoint instead to parse and retrieve file contents. The parse runs endpoint provides more control over parsing configuration and better performance.

        The parsed content of the file. This field will only contain data after the file has been parsed via a parse run, extract run, classify run, split run, edit run, or workflow run.

        Availability: Only present and populated on GET /files/{id} when the file has been previously parsed and the corresponding query parameters are set to true. Will be null on POST /files/upload and for files that haven't been parsed. The structure varies based on file type.

        Specified by:
        contents in interface File._FinalStage
      • parentFileId

        public File._FinalStage parentFileId​(Nullable<java.lang.String> parentFileId)

        ID of the parent file.

        Availability: Present for files created via a Splitter in a workflow.

        Specified by:
        parentFileId in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parentFileId

        public File._FinalStage parentFileId​(java.lang.String parentFileId)

        ID of the parent file.

        Availability: Present for files created via a Splitter in a workflow.

        Specified by:
        parentFileId in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parentFileId

        public File._FinalStage parentFileId​(java.util.Optional<java.lang.String> parentFileId)

        ID of the parent file.

        Availability: Present for files created via a Splitter in a workflow.

        Specified by:
        parentFileId in interface File._FinalStage
      • presignedUrl

        public File._FinalStage presignedUrl​(Nullable<java.lang.String> presignedUrl)

        A presigned URL to download the file. Expires after 15 minutes.

        Availability: Present on GET /files/{id}. Not present on POST /files/upload or when the file is embedded in other resources (e.g., in run responses).

        Specified by:
        presignedUrl in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • presignedUrl

        public File._FinalStage presignedUrl​(java.lang.String presignedUrl)

        A presigned URL to download the file. Expires after 15 minutes.

        Availability: Present on GET /files/{id}. Not present on POST /files/upload or when the file is embedded in other resources (e.g., in run responses).

        Specified by:
        presignedUrl in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • presignedUrl

        public File._FinalStage presignedUrl​(java.util.Optional<java.lang.String> presignedUrl)

        A presigned URL to download the file. Expires after 15 minutes.

        Availability: Present on GET /files/{id}. Not present on POST /files/upload or when the file is embedded in other resources (e.g., in run responses).

        Specified by:
        presignedUrl in interface File._FinalStage
      • type

        public File._FinalStage type​(Nullable<FileType> type)

        The type of the file.

        Availability: Present when the file type could be determined.

        Specified by:
        type in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • type

        public File._FinalStage type​(FileType type)

        The type of the file.

        Availability: Present when the file type could be determined.

        Specified by:
        type in interface File._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.