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

    Constructors
    Constructor
    Description
    Creates an instance of CheckNameAvailabilityOutput class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(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.
    Get the message property: A message that explains why the name is invalid and provides resource naming requirements.
    Get the reason property: The reason why the name is not available.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public Boolean isNameAvailable()
      Get the isNameAvailable property: A value indicating whether the name is available.
      Returns:
      the isNameAvailable value.
    • reason

      public UnavailableNameReason 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

      public String 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.