Class CheckNameAvailabilityParameters
java.lang.Object
com.azure.resourcemanager.redis.models.CheckNameAvailabilityParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CheckNameAvailabilityParameters>
public final class CheckNameAvailabilityParameters
extends Object
implements com.azure.json.JsonSerializable<CheckNameAvailabilityParameters>
Parameters body to pass for resource name availability check.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CheckNameAvailabilityParameters class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CheckNameAvailabilityParameters from the JsonReader.name()
Get the name property: Resource name.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: Resource type.void
validate()
Validates the instance.Set the name property: Resource name.Set the type property: Resource type.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
-
CheckNameAvailabilityParameters
public CheckNameAvailabilityParameters()Creates an instance of CheckNameAvailabilityParameters class.
-
-
Method Details
-
name
Get the name property: Resource name.- Returns:
- the name value.
-
withName
Set the name property: Resource name.- Parameters:
name
- the name value to set.- Returns:
- the CheckNameAvailabilityParameters object itself.
-
type
Get the type property: Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'.- Returns:
- the type value.
-
withType
Set the type property: Resource type. The only legal value of this property for checking redis cache name availability is 'Microsoft.Cache/redis'.- Parameters:
type
- the type value to set.- Returns:
- the CheckNameAvailabilityParameters object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<CheckNameAvailabilityParameters>
- Throws:
IOException
-
fromJson
public static CheckNameAvailabilityParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CheckNameAvailabilityParameters from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of CheckNameAvailabilityParameters 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 CheckNameAvailabilityParameters.
-