Share via


CheckNameAvailabilityResponse Class

  • java.lang.Object
    • com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse

Implements

public class CheckNameAvailabilityResponse
implements JsonSerializable<CheckNameAvailabilityResponse>

The check availability result.

Constructor Summary

Constructor Description
CheckNameAvailabilityResponse()

Creates an instance of CheckNameAvailabilityResponse class.

Method Summary

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

Reads an instance of CheckNameAvailabilityResponse from the JsonReader.

String message()

Get the message property: Detailed reason why the given name is available.

Boolean nameAvailable()

Get the nameAvailable property: Indicates if the resource name is available.

CheckNameAvailabilityReason reason()

Get the reason property: The reason why the given name is not available.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CheckNameAvailabilityResponse withMessage(String message)

Set the message property: Detailed reason why the given name is available.

CheckNameAvailabilityResponse withNameAvailable(Boolean nameAvailable)

Set the nameAvailable property: Indicates if the resource name is available.

CheckNameAvailabilityResponse withReason(CheckNameAvailabilityReason reason)

Set the reason property: The reason why the given name is not available.

Methods inherited from java.lang.Object

Constructor Details

CheckNameAvailabilityResponse

public CheckNameAvailabilityResponse()

Creates an instance of CheckNameAvailabilityResponse class.

Method Details

fromJson

public static CheckNameAvailabilityResponse fromJson(JsonReader jsonReader)

Reads an instance of CheckNameAvailabilityResponse from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

message

public String message()

Get the message property: Detailed reason why the given name is available.

Returns:

the message value.

nameAvailable

public Boolean nameAvailable()

Get the nameAvailable property: Indicates if the resource name is available.

Returns:

the nameAvailable value.

reason

public CheckNameAvailabilityReason reason()

Get the reason property: The reason why the given name is not available.

Returns:

the reason value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMessage

public CheckNameAvailabilityResponse withMessage(String message)

Set the message property: Detailed reason why the given name is available.

Parameters:

message - the message value to set.

Returns:

the CheckNameAvailabilityResponse object itself.

withNameAvailable

public CheckNameAvailabilityResponse withNameAvailable(Boolean nameAvailable)

Set the nameAvailable property: Indicates if the resource name is available.

Parameters:

nameAvailable - the nameAvailable value to set.

Returns:

the CheckNameAvailabilityResponse object itself.

withReason

public CheckNameAvailabilityResponse withReason(CheckNameAvailabilityReason reason)

Set the reason property: The reason why the given name is not available.

Parameters:

reason - the reason value to set.

Returns:

the CheckNameAvailabilityResponse object itself.

Applies to