ResourceNameAvailabilityInner Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.fluent.models.ResourceNameAvailabilityInner

Implements

public final class ResourceNameAvailabilityInner
implements JsonSerializable<ResourceNameAvailabilityInner>

Information regarding availability of a resource name.

Constructor Summary

Constructor Description
ResourceNameAvailabilityInner()

Creates an instance of ResourceNameAvailabilityInner class.

Method Summary

Modifier and Type Method and Description
static ResourceNameAvailabilityInner fromJson(JsonReader jsonReader)

Reads an instance of ResourceNameAvailabilityInner from the JsonReader.

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

Boolean nameAvailable()

Get the nameAvailable property: true indicates name is valid and available.

InAvailabilityReasonType reason()

Get the reason property: Invalid indicates the name provided does not match Azure App Service naming requirements.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceNameAvailabilityInner withMessage(String message)

Set 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.

ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable)

Set the nameAvailable property: true indicates name is valid and available.

ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason)

Set the reason property: Invalid indicates the name provided does not match Azure App Service naming requirements.

Methods inherited from java.lang.Object

Constructor Details

ResourceNameAvailabilityInner

public ResourceNameAvailabilityInner()

Creates an instance of ResourceNameAvailabilityInner class.

Method Details

fromJson

public static ResourceNameAvailabilityInner fromJson(JsonReader jsonReader)

Reads an instance of ResourceNameAvailabilityInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ResourceNameAvailabilityInner 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 ResourceNameAvailabilityInner.

message

public String 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 resource name is already in use, and direct them to select a different name.

Returns:

the message value.

nameAvailable

public Boolean nameAvailable()

Get the nameAvailable property: true indicates name is valid and available. false indicates the name is invalid, unavailable, or both.

Returns:

the nameAvailable value.

reason

public InAvailabilityReasonType reason()

Get the reason property: Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable.

Returns:

the reason value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMessage

public ResourceNameAvailabilityInner withMessage(String message)

Set 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 resource name is already in use, and direct them to select a different name.

Parameters:

message - the message value to set.

Returns:

the ResourceNameAvailabilityInner object itself.

withNameAvailable

public ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable)

Set the nameAvailable property: true indicates name is valid and available. false indicates the name is invalid, unavailable, or both.

Parameters:

nameAvailable - the nameAvailable value to set.

Returns:

the ResourceNameAvailabilityInner object itself.

withReason

public ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason)

Set the reason property: Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable.

Parameters:

reason - the reason value to set.

Returns:

the ResourceNameAvailabilityInner object itself.

Applies to