Class ApiManagementServiceNameAvailabilityResultInner
java.lang.Object
com.azure.resourcemanager.apimanagement.fluent.models.ApiManagementServiceNameAvailabilityResultInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ApiManagementServiceNameAvailabilityResultInner>
public final class ApiManagementServiceNameAvailabilityResultInner
extends Object
implements com.azure.json.JsonSerializable<ApiManagementServiceNameAvailabilityResultInner>
Response of the CheckNameAvailability operation.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ApiManagementServiceNameAvailabilityResultInner class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ApiManagementServiceNameAvailabilityResultInner from the JsonReader.message()Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name.Get the nameAvailable property: True if the name is available and can be used to create a new API Management service; otherwise false.reason()Get the reason property: Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.)com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withReason(NameAvailabilityReason reason) Set the reason property: Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.)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
-
ApiManagementServiceNameAvailabilityResultInner
public ApiManagementServiceNameAvailabilityResultInner()Creates an instance of ApiManagementServiceNameAvailabilityResultInner class.
-
-
Method Details
-
nameAvailable
Get the nameAvailable property: True if the name is available and can be used to create a new API Management service; otherwise false.- Returns:
- the nameAvailable value.
-
message
Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that <resourceName> is already in use, and direct them to select a different name.- Returns:
- the message value.
-
reason
Get the reason property: Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.- Returns:
- the reason value.
-
withReason
Set the reason property: Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.- Parameters:
reason- the reason value to set.- Returns:
- the ApiManagementServiceNameAvailabilityResultInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ApiManagementServiceNameAvailabilityResultInner>- Throws:
IOException
-
fromJson
public static ApiManagementServiceNameAvailabilityResultInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ApiManagementServiceNameAvailabilityResultInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ApiManagementServiceNameAvailabilityResultInner 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 ApiManagementServiceNameAvailabilityResultInner.
-