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

package com.azure.resourcemanager.appcontainers.models;

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

/** Peer authentication settings for the Managed Environment. */
@Fluent
public final class ManagedEnvironmentPropertiesPeerAuthentication {
    /*
     * Mutual TLS authentication settings for the Managed Environment
     */
    @JsonProperty(value = "mtls")
    private Mtls mtls;

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

    /**
     * Get the mtls property: Mutual TLS authentication settings for the Managed Environment.
     *
     * @return the mtls value.
     */
    public Mtls mtls() {
        return this.mtls;
    }

    /**
     * Set the mtls property: Mutual TLS authentication settings for the Managed Environment.
     *
     * @param mtls the mtls value to set.
     * @return the ManagedEnvironmentPropertiesPeerAuthentication object itself.
     */
    public ManagedEnvironmentPropertiesPeerAuthentication withMtls(Mtls mtls) {
        this.mtls = mtls;
        return this;
    }

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