次の方法で共有


NameAvailabilityResponseInner Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.fluent.models.NameAvailabilityResponseInner

Implements

public final class NameAvailabilityResponseInner
implements JsonSerializable<NameAvailabilityResponseInner>

Indicates whether a proposed resource name is available.

Constructor Summary

Constructor Description
NameAvailabilityResponseInner()

Creates an instance of NameAvailabilityResponseInner class.

Method Summary

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

Reads an instance of NameAvailabilityResponseInner from the JsonReader.

String message()

Get the message property: The localized reason why the name is not available, if nameAvailable is false.

Boolean nameAvailable()

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

NameCheckFailureReason reason()

Get the reason property: The reason why the name is not available, if nameAvailable is false.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

NameAvailabilityResponseInner withMessage(String message)

Set the message property: The localized reason why the name is not available, if nameAvailable is false.

NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable)

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

NameAvailabilityResponseInner withReason(NameCheckFailureReason reason)

Set the reason property: The reason why the name is not available, if nameAvailable is false.

Methods inherited from java.lang.Object

Constructor Details

NameAvailabilityResponseInner

public NameAvailabilityResponseInner()

Creates an instance of NameAvailabilityResponseInner class.

Method Details

fromJson

public static NameAvailabilityResponseInner fromJson(JsonReader jsonReader)

Reads an instance of NameAvailabilityResponseInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

message

public String message()

Get the message property: The localized reason why the name is not available, if nameAvailable is false.

Returns:

the message value.

nameAvailable

public Boolean nameAvailable()

Get the nameAvailable property: If true, the name is valid and available. If false, 'reason' describes why not.

Returns:

the nameAvailable value.

reason

public NameCheckFailureReason reason()

Get the reason property: The reason why the name is not available, if nameAvailable is false.

Returns:

the reason value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMessage

public NameAvailabilityResponseInner withMessage(String message)

Set the message property: The localized reason why the name is not available, if nameAvailable is false.

Parameters:

message - the message value to set.

Returns:

the NameAvailabilityResponseInner object itself.

withNameAvailable

public NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable)

Set the nameAvailable property: If true, the name is valid and available. If false, 'reason' describes why not.

Parameters:

nameAvailable - the nameAvailable value to set.

Returns:

the NameAvailabilityResponseInner object itself.

withReason

public NameAvailabilityResponseInner withReason(NameCheckFailureReason reason)

Set the reason property: The reason why the name is not available, if nameAvailable is false.

Parameters:

reason - the reason value to set.

Returns:

the NameAvailabilityResponseInner object itself.

Applies to