Class NameAvailabilityModelInner

java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse
com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<CheckNameAvailabilityResponse>

public final class NameAvailabilityModelInner extends CheckNameAvailabilityResponse
Availability of a name.
  • Constructor Details

    • NameAvailabilityModelInner

      public NameAvailabilityModelInner()
      Creates an instance of NameAvailabilityModelInner class.
  • Method Details

    • name

      public String name()
      Get the name property: Name for which validity and availability was checked.
      Returns:
      the name value.
    • type

      public String type()
      Get the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'.
      Returns:
      the type value.
    • withNameAvailable

      public NameAvailabilityModelInner withNameAvailable(Boolean nameAvailable)
      Set the nameAvailable property: Indicates if the resource name is available.
      Overrides:
      withNameAvailable in class CheckNameAvailabilityResponse
      Parameters:
      nameAvailable - the nameAvailable value to set.
      Returns:
      the CheckNameAvailabilityResponse object itself.
    • withReason

      Set the reason property: The reason why the given name is not available.
      Overrides:
      withReason in class CheckNameAvailabilityResponse
      Parameters:
      reason - the reason value to set.
      Returns:
      the CheckNameAvailabilityResponse object itself.
    • withMessage

      public NameAvailabilityModelInner withMessage(String message)
      Set the message property: Detailed reason why the given name is available.
      Overrides:
      withMessage in class CheckNameAvailabilityResponse
      Parameters:
      message - the message value to set.
      Returns:
      the CheckNameAvailabilityResponse object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class CheckNameAvailabilityResponse
      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<CheckNameAvailabilityResponse>
      Overrides:
      toJson in class CheckNameAvailabilityResponse
      Throws:
      IOException
    • fromJson

      public static NameAvailabilityModelInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of NameAvailabilityModelInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of NameAvailabilityModelInner 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 NameAvailabilityModelInner.