// 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.models;

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

/** Authentication configuration properties of a server. */
@Fluent
public final class AuthConfig {
    /*
     * If Enabled, Azure Active Directory authentication is enabled.
     */
    @JsonProperty(value = "activeDirectoryAuth")
    private ActiveDirectoryAuthEnum activeDirectoryAuth;

    /*
     * If Enabled, Password authentication is enabled.
     */
    @JsonProperty(value = "passwordAuth")
    private PasswordAuthEnum passwordAuth;

    /*
     * Tenant id of the server.
     */
    @JsonProperty(value = "tenantId")
    private String tenantId;

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

    /**
     * Get the activeDirectoryAuth property: If Enabled, Azure Active Directory authentication is enabled.
     *
     * @return the activeDirectoryAuth value.
     */
    public ActiveDirectoryAuthEnum activeDirectoryAuth() {
        return this.activeDirectoryAuth;
    }

    /**
     * Set the activeDirectoryAuth property: If Enabled, Azure Active Directory authentication is enabled.
     *
     * @param activeDirectoryAuth the activeDirectoryAuth value to set.
     * @return the AuthConfig object itself.
     */
    public AuthConfig withActiveDirectoryAuth(ActiveDirectoryAuthEnum activeDirectoryAuth) {
        this.activeDirectoryAuth = activeDirectoryAuth;
        return this;
    }

    /**
     * Get the passwordAuth property: If Enabled, Password authentication is enabled.
     *
     * @return the passwordAuth value.
     */
    public PasswordAuthEnum passwordAuth() {
        return this.passwordAuth;
    }

    /**
     * Set the passwordAuth property: If Enabled, Password authentication is enabled.
     *
     * @param passwordAuth the passwordAuth value to set.
     * @return the AuthConfig object itself.
     */
    public AuthConfig withPasswordAuth(PasswordAuthEnum passwordAuth) {
        this.passwordAuth = passwordAuth;
        return this;
    }

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

    /**
     * Set the tenantId property: Tenant id of the server.
     *
     * @param tenantId the tenantId value to set.
     * @return the AuthConfig object itself.
     */
    public AuthConfig withTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

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