Class SearchAlias
java.lang.Object
com.azure.search.documents.indexes.models.SearchAlias
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchAlias>
public final class SearchAlias
extends Object
implements com.azure.json.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
ConstructorsConstructorDescriptionSearchAlias(String name, List<String> indexes) Creates an instance of SearchAlias class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchAliasfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SearchAlias from the JsonReader.getETag()Get the eTag property: The ETag of the alias.Get the indexes property: The name of the index this alias maps to.getName()Get the name property: The name of the alias.Set the eTag property: The ETag of the alias.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SearchAlias
Creates an instance of SearchAlias class.- Parameters:
name- the name value to set.indexes- the indexes value to set.
-
-
Method Details
-
getName
Get the name property: The name of the alias.- Returns:
- the name value.
-
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.
-
getETag
Get the eTag property: The ETag of the alias.- Returns:
- the eTag value.
-
setETag
Set the eTag property: The ETag of the alias.- Parameters:
eTag- the eTag value to set.- Returns:
- the SearchAlias object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SearchAlias>- Throws:
IOException
-
fromJson
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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SearchAlias.
-