FileUploadMetadata Class

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

Implements

public final class FileUploadMetadata
implements JsonSerializable<FileUploadMetadata>

The JSON 'metadata' part of a multipart/form-data file upload: the full file name/path and custom key/value metadata. The parsing mode and extraction mode are both chosen by the service and are not supplied by the caller.

Constructor Summary

Constructor Description
FileUploadMetadata()

Creates an instance of FileUploadMetadata class.

Method Summary

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

Reads an instance of FileUploadMetadata from the JsonReader.

String getFileName()

Get the fileName property: The full relative file name/path to store the file under (prefixes are derived from it).

Map<String,String> getMetadata()

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

FileUploadMetadata setFileName(String fileName)

Set the fileName property: The full relative file name/path to store the file under (prefixes are derived from it).

FileUploadMetadata setMetadata(Map<String,String> metadata)

Set the metadata property: Custom key/value metadata to store with the file.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

FileUploadMetadata

public FileUploadMetadata()

Creates an instance of FileUploadMetadata class.

Method Details

fromJson

public static FileUploadMetadata fromJson(JsonReader jsonReader)

Reads an instance of FileUploadMetadata from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FileUploadMetadata 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 FileUploadMetadata.

getFileName

public String getFileName()

Get the fileName property: The full relative file name/path to store the file under (prefixes are derived from it).

Returns:

the fileName value.

getMetadata

public Map<String,String> getMetadata()

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

Returns:

the metadata value.

setFileName

public FileUploadMetadata setFileName(String fileName)

Set the fileName property: The full relative file name/path to store the file under (prefixes are derived from it).

Parameters:

fileName - the fileName value to set.

Returns:

the FileUploadMetadata object itself.

setMetadata

public FileUploadMetadata setMetadata(Map<String,String> metadata)

Set the metadata property: Custom key/value metadata to store with the file.

Parameters:

metadata - the metadata value to set.

Returns:

the FileUploadMetadata object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to