Dela via


SearchAlias Class

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

Implements

public final class SearchAlias
implements JsonSerializable<SearchAlias>

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

Constructor Summary

Constructor Description
SearchAlias(String name, List<String> indexes)

Creates an instance of SearchAlias class.

Method Summary

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

Reads an instance of SearchAlias from the JsonReader.

String getETag()

Get the eTag property: The ETag of the alias.

List<String> getIndexes()

Get the indexes property: The name of the index this alias maps to.

String getName()

Get the name property: The name of the alias.

SearchAlias setETag(String eTag)

Set the eTag property: The ETag of the alias.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SearchAlias

public SearchAlias(String name, List<String> indexes)

Creates an instance of SearchAlias class.

Parameters:

name - the name value to set.
indexes - the indexes value to set.

Method Details

fromJson

public static SearchAlias fromJson(JsonReader jsonReader)

Reads an instance of SearchAlias from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getETag

public String getETag()

Get the eTag property: The ETag of the alias.

Returns:

the eTag value.

getIndexes

public List<String> getIndexes()

Get the indexes property: The name of the index this alias maps to. Only one index name may be specified.

Returns:

the indexes value.

getName

public String getName()

Get the name property: The name of the alias.

Returns:

the name value.

setETag

public SearchAlias setETag(String eTag)

Set the eTag property: The ETag of the alias.

Parameters:

eTag - the eTag value to set.

Returns:

the SearchAlias object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to