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

package com.azure.resourcemanager.eventhubs.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties to configure Identity for Bring your Own Keys. */
@Fluent
public class Identity {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class);

    /*
     * ObjectId from the KeyVault
     */
    @JsonProperty(value = "principalId")
    private String principalId;

    /*
     * TenantId from the KeyVault
     */
    @JsonProperty(value = "tenantId")
    private String tenantId;

    /*
     * Enumerates the possible value Identity type, which currently supports
     * only 'SystemAssigned'
     */
    @JsonProperty(value = "type")
    private IdentityType type;

    /**
     * Get the principalId property: ObjectId from the KeyVault.
     *
     * @return the principalId value.
     */
    public String principalId() {
        return this.principalId;
    }

    /**
     * Set the principalId property: ObjectId from the KeyVault.
     *
     * @param principalId the principalId value to set.
     * @return the Identity object itself.
     */
    public Identity withPrincipalId(String principalId) {
        this.principalId = principalId;
        return this;
    }

    /**
     * Get the tenantId property: TenantId from the KeyVault.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.tenantId;
    }

    /**
     * Set the tenantId property: TenantId from the KeyVault.
     *
     * @param tenantId the tenantId value to set.
     * @return the Identity object itself.
     */
    public Identity withTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

    /**
     * Get the type property: Enumerates the possible value Identity type, which currently supports only
     * 'SystemAssigned'.
     *
     * @return the type value.
     */
    public IdentityType type() {
        return this.type;
    }

    /**
     * Set the type property: Enumerates the possible value Identity type, which currently supports only
     * 'SystemAssigned'.
     *
     * @param type the type value to set.
     * @return the Identity object itself.
     */
    public Identity withType(IdentityType type) {
        this.type = type;
        return this;
    }

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