// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.webpubsub.fluent.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Result of the request to check name availability. It contains a flag and possible reason of failure. */
@Fluent
public final class NameAvailabilityInner {
    /*
     * Indicates whether the name is available or not.
     */
    @JsonProperty(value = "nameAvailable")
    private Boolean nameAvailable;

    /*
     * The reason of the availability. Required if name is not available.
     */
    @JsonProperty(value = "reason")
    private String reason;

    /*
     * The message of the operation.
     */
    @JsonProperty(value = "message")
    private String message;

    /** Creates an instance of NameAvailabilityInner class. */
    public NameAvailabilityInner() {
    }

    /**
     * Get the nameAvailable property: Indicates whether the name is available or not.
     *
     * @return the nameAvailable value.
     */
    public Boolean nameAvailable() {
        return this.nameAvailable;
    }

    /**
     * Set the nameAvailable property: Indicates whether the name is available or not.
     *
     * @param nameAvailable the nameAvailable value to set.
     * @return the NameAvailabilityInner object itself.
     */
    public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
        this.nameAvailable = nameAvailable;
        return this;
    }

    /**
     * Get the reason property: The reason of the availability. Required if name is not available.
     *
     * @return the reason value.
     */
    public String reason() {
        return this.reason;
    }

    /**
     * Set the reason property: The reason of the availability. Required if name is not available.
     *
     * @param reason the reason value to set.
     * @return the NameAvailabilityInner object itself.
     */
    public NameAvailabilityInner withReason(String reason) {
        this.reason = reason;
        return this;
    }

    /**
     * Get the message property: The message of the operation.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: The message of the operation.
     *
     * @param message the message value to set.
     * @return the NameAvailabilityInner object itself.
     */
    public NameAvailabilityInner withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
