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>
Availability of a name.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of NameAvailabilityModelInner class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NameAvailabilityModelInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of NameAvailabilityModelInner from the JsonReader.name()Get the name property: Name for which validity and availability was checked.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Type of resource.voidvalidate()Validates the instance.withMessage(String message) Set the message property: Detailed reason why the given name is available.withNameAvailable(Boolean nameAvailable) Set the nameAvailable property: Indicates if the resource name is available.Set the reason property: The reason why the given name is not available.Methods inherited from class CheckNameAvailabilityResponse
message, nameAvailable, reasonMethods inherited from class 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
-
NameAvailabilityModelInner
public NameAvailabilityModelInner()Creates an instance of NameAvailabilityModelInner class.
-
-
Method Details
-
name
Get the name property: Name for which validity and availability was checked.- Returns:
- the name value.
-
type
Get the type property: Type of resource. It can be 'Microsoft.DBforPostgreSQL/flexibleServers' or 'Microsoft.DBforPostgreSQL/flexibleServers/virtualendpoints'.- Returns:
- the type value.
-
withNameAvailable
Set the nameAvailable property: Indicates if the resource name is available.- Overrides:
withNameAvailablein classCheckNameAvailabilityResponse- 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:
withReasonin classCheckNameAvailabilityResponse- Parameters:
reason- the reason value to set.- Returns:
- the CheckNameAvailabilityResponse object itself.
-
withMessage
Set the message property: Detailed reason why the given name is available.- Overrides:
withMessagein classCheckNameAvailabilityResponse- Parameters:
message- the message value to set.- Returns:
- the CheckNameAvailabilityResponse object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classCheckNameAvailabilityResponse- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CheckNameAvailabilityResponse>- Overrides:
toJsonin classCheckNameAvailabilityResponse- 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.
-