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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Represents a resource name availability. */
@Fluent
public final class NameAvailabilityInner extends CheckNameAvailabilityResponse {
    /*
     * name of the PostgreSQL server.
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * type of the server
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private String type;

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

    /**
     * Get the name property: name of the PostgreSQL server.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Get the type property: type of the server.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /** {@inheritDoc} */
    @Override
    public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
        super.withNameAvailable(nameAvailable);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) {
        super.withReason(reason);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public NameAvailabilityInner withMessage(String message) {
        super.withMessage(message);
        return this;
    }

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