Class CheckNameAvailabilityOutput
java.lang.Object
com.azure.resourcemanager.search.models.CheckNameAvailabilityOutput
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CheckNameAvailabilityOutput>
public final class CheckNameAvailabilityOutput
extends Object
implements com.azure.json.JsonSerializable<CheckNameAvailabilityOutput>
Output of check name availability API.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CheckNameAvailabilityOutput class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CheckNameAvailabilityOutputfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CheckNameAvailabilityOutput from the JsonReader.Get the isNameAvailable property: A value indicating whether the name is available.message()Get the message property: A message that explains why the name is invalid and provides resource naming requirements.reason()Get the reason property: The reason why the name is not available.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.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
-
CheckNameAvailabilityOutput
public CheckNameAvailabilityOutput()Creates an instance of CheckNameAvailabilityOutput class.
-
-
Method Details
-
isNameAvailable
Get the isNameAvailable property: A value indicating whether the name is available.- Returns:
- the isNameAvailable value.
-
reason
Get the reason property: The reason why the name is not available. 'Invalid' indicates the name provided does not match the naming requirements (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that the name is already in use and is therefore unavailable.- Returns:
- the reason value.
-
message
Get the message property: A message that explains why the name is invalid and provides resource naming requirements. Available only if 'Invalid' is returned in the 'reason' property.- Returns:
- the message value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CheckNameAvailabilityOutput>- Throws:
IOException
-
fromJson
public static CheckNameAvailabilityOutput fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CheckNameAvailabilityOutput from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CheckNameAvailabilityOutput 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 CheckNameAvailabilityOutput.
-