KnowledgeSourceFile Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.KnowledgeSourceFile

Implements

public final class KnowledgeSourceFile
implements JsonSerializable<KnowledgeSourceFile>

Metadata for a file uploaded to a File knowledge source.

Method Summary

Modifier and Type Method and Description
static KnowledgeSourceFile fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeSourceFile from the JsonReader.

OffsetDateTime getCreatedAt()

Get the createdAt property: The timestamp when the file was created.

String getErrorMessage()

Get the errorMessage property: The error message if file processing failed, null otherwise.

FileKnowledgeSourceExtractionMode getExtractionMode()

Get the extractionMode property: The extraction mode applied to the file.

String getFileId()

Get the fileId property: The unique identifier for the file.

String getFileName()

Get the fileName property: The original file name.

Long getFileSizeBytes()

Get the fileSizeBytes property: The file size in bytes.

OffsetDateTime getLastUpdatedAt()

Get the lastUpdatedAt property: The timestamp when the file was last updated.

Map<String,String> getMetadata()

Get the metadata property: Custom key/value metadata stored with the file.

BlobIndexerParsingMode getParsingMode()

Get the parsingMode property: The parsing mode applied to the file (auto-detected from the file).

String getPrefix()

Get the prefix property: The prefix (directory-like path) derived from the full file name.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static KnowledgeSourceFile fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeSourceFile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KnowledgeSourceFile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the KnowledgeSourceFile.

getCreatedAt

public OffsetDateTime getCreatedAt()

Get the createdAt property: The timestamp when the file was created.

Returns:

the createdAt value.

getErrorMessage

public String getErrorMessage()

Get the errorMessage property: The error message if file processing failed, null otherwise.

Returns:

the errorMessage value.

getExtractionMode

public FileKnowledgeSourceExtractionMode getExtractionMode()

Get the extractionMode property: The extraction mode applied to the file.

Returns:

the extractionMode value.

getFileId

public String getFileId()

Get the fileId property: The unique identifier for the file.

Returns:

the fileId value.

getFileName

public String getFileName()

Get the fileName property: The original file name.

Returns:

the fileName value.

getFileSizeBytes

public Long getFileSizeBytes()

Get the fileSizeBytes property: The file size in bytes.

Returns:

the fileSizeBytes value.

getLastUpdatedAt

public OffsetDateTime getLastUpdatedAt()

Get the lastUpdatedAt property: The timestamp when the file was last updated.

Returns:

the lastUpdatedAt value.

getMetadata

public Map<String,String> getMetadata()

Get the metadata property: Custom key/value metadata stored with the file. Returned but not searchable or filterable.

Returns:

the metadata value.

getParsingMode

public BlobIndexerParsingMode getParsingMode()

Get the parsingMode property: The parsing mode applied to the file (auto-detected from the file).

Returns:

the parsingMode value.

getPrefix

public String getPrefix()

Get the prefix property: The prefix (directory-like path) derived from the full file name.

Returns:

the prefix value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to