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

/** Describes a single user-assigned identity associated with the application. */
@Fluent
public final class UserIdentity {
    /*
     * the object identifier of the Service Principal which this identity represents.
     */
    @JsonProperty(value = "principalId")
    private String principalId;

    /*
     * the client identifier of the Service Principal which this identity represents.
     */
    @JsonProperty(value = "clientId")
    private String clientId;

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

    /**
     * Get the principalId property: the object identifier of the Service Principal which this identity represents.
     *
     * @return the principalId value.
     */
    public String principalId() {
        return this.principalId;
    }

    /**
     * Set the principalId property: the object identifier of the Service Principal which this identity represents.
     *
     * @param principalId the principalId value to set.
     * @return the UserIdentity object itself.
     */
    public UserIdentity withPrincipalId(String principalId) {
        this.principalId = principalId;
        return this;
    }

    /**
     * Get the clientId property: the client identifier of the Service Principal which this identity represents.
     *
     * @return the clientId value.
     */
    public String clientId() {
        return this.clientId;
    }

    /**
     * Set the clientId property: the client identifier of the Service Principal which this identity represents.
     *
     * @param clientId the clientId value to set.
     * @return the UserIdentity object itself.
     */
    public UserIdentity withClientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

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