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

package com.azure.resourcemanager.kubernetesconfiguration.models;

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

/** Parameters to authenticate using Service Principal. */
@Fluent
public final class ServicePrincipalDefinition {
    /*
     * The client Id for authenticating a Service Principal.
     */
    @JsonProperty(value = "clientId")
    private String clientId;

    /*
     * The tenant Id for authenticating a Service Principal
     */
    @JsonProperty(value = "tenantId")
    private String tenantId;

    /*
     * The client secret for authenticating a Service Principal
     */
    @JsonProperty(value = "clientSecret")
    private String clientSecret;

    /*
     * Base64-encoded certificate used to authenticate a Service Principal
     */
    @JsonProperty(value = "clientCertificate")
    private String clientCertificate;

    /*
     * The password for the certificate used to authenticate a Service Principal
     */
    @JsonProperty(value = "clientCertificatePassword")
    private String clientCertificatePassword;

    /*
     * Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer
     * based authentication for the Client Certificate
     */
    @JsonProperty(value = "clientCertificateSendChain")
    private Boolean clientCertificateSendChain;

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

    /**
     * Get the clientId property: The client Id for authenticating a Service Principal.
     *
     * @return the clientId value.
     */
    public String clientId() {
        return this.clientId;
    }

    /**
     * Set the clientId property: The client Id for authenticating a Service Principal.
     *
     * @param clientId the clientId value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withClientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    /**
     * Get the tenantId property: The tenant Id for authenticating a Service Principal.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

    /**
     * Set the tenantId property: The tenant Id for authenticating a Service Principal.
     *
     * @param tenantId the tenantId value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

    /**
     * Get the clientSecret property: The client secret for authenticating a Service Principal.
     *
     * @return the clientSecret value.
     */
    public String clientSecret() {
        return this.clientSecret;
    }

    /**
     * Set the clientSecret property: The client secret for authenticating a Service Principal.
     *
     * @param clientSecret the clientSecret value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
        return this;
    }

    /**
     * Get the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal.
     *
     * @return the clientCertificate value.
     */
    public String clientCertificate() {
        return this.clientCertificate;
    }

    /**
     * Set the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal.
     *
     * @param clientCertificate the clientCertificate value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withClientCertificate(String clientCertificate) {
        this.clientCertificate = clientCertificate;
        return this;
    }

    /**
     * Get the clientCertificatePassword property: The password for the certificate used to authenticate a Service
     * Principal.
     *
     * @return the clientCertificatePassword value.
     */
    public String clientCertificatePassword() {
        return this.clientCertificatePassword;
    }

    /**
     * Set the clientCertificatePassword property: The password for the certificate used to authenticate a Service
     * Principal.
     *
     * @param clientCertificatePassword the clientCertificatePassword value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withClientCertificatePassword(String clientCertificatePassword) {
        this.clientCertificatePassword = clientCertificatePassword;
        return this;
    }

    /**
     * Get the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when
     * acquiring a token to enable subject name / issuer based authentication for the Client Certificate.
     *
     * @return the clientCertificateSendChain value.
     */
    public Boolean clientCertificateSendChain() {
        return this.clientCertificateSendChain;
    }

    /**
     * Set the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when
     * acquiring a token to enable subject name / issuer based authentication for the Client Certificate.
     *
     * @param clientCertificateSendChain the clientCertificateSendChain value to set.
     * @return the ServicePrincipalDefinition object itself.
     */
    public ServicePrincipalDefinition withClientCertificateSendChain(Boolean clientCertificateSendChain) {
        this.clientCertificateSendChain = clientCertificateSendChain;
        return this;
    }

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