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

package com.azure.resourcemanager.eventgrid.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The certificate authentication properties for the client. */
@Fluent
public final class ClientCertificateAuthentication {
    /*
     * The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName.
     */
    @JsonProperty(value = "validationScheme")
    private ClientCertificateValidationScheme validationScheme;

    /*
     * The list of thumbprints that are allowed during client authentication. This property is required only if the
     * validationScheme is 'ThumbprintMatch'.
     */
    @JsonProperty(value = "allowedThumbprints")
    private List<String> allowedThumbprints;

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

    /**
     * Get the validationScheme property: The validation scheme used to authenticate the client. Default value is
     * SubjectMatchesAuthenticationName.
     *
     * @return the validationScheme value.
     */
    public ClientCertificateValidationScheme validationScheme() {
        return this.validationScheme;
    }

    /**
     * Set the validationScheme property: The validation scheme used to authenticate the client. Default value is
     * SubjectMatchesAuthenticationName.
     *
     * @param validationScheme the validationScheme value to set.
     * @return the ClientCertificateAuthentication object itself.
     */
    public ClientCertificateAuthentication withValidationScheme(ClientCertificateValidationScheme validationScheme) {
        this.validationScheme = validationScheme;
        return this;
    }

    /**
     * Get the allowedThumbprints property: The list of thumbprints that are allowed during client authentication. This
     * property is required only if the validationScheme is 'ThumbprintMatch'.
     *
     * @return the allowedThumbprints value.
     */
    public List<String> allowedThumbprints() {
        return this.allowedThumbprints;
    }

    /**
     * Set the allowedThumbprints property: The list of thumbprints that are allowed during client authentication. This
     * property is required only if the validationScheme is 'ThumbprintMatch'.
     *
     * @param allowedThumbprints the allowedThumbprints value to set.
     * @return the ClientCertificateAuthentication object itself.
     */
    public ClientCertificateAuthentication withAllowedThumbprints(List<String> allowedThumbprints) {
        this.allowedThumbprints = allowedThumbprints;
        return this;
    }

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