All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.openfga.client.model.UsersetTree Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package io.quarkiverse.openfga.client.model;

import java.util.Objects;

import javax.annotation.Nullable;

import com.fasterxml.jackson.annotation.JsonCreator;

import io.quarkiverse.openfga.client.model.nodes.Node;
import io.quarkiverse.openfga.client.model.utils.Preconditions;

public final class UsersetTree {
    private final Node root;

    @JsonCreator
    public UsersetTree(Node root) {
        this.root = Preconditions.parameterNonNull(root, "root");
    }

    public Node getRoot() {
        return root;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj == this)
            return true;
        if (obj == null || obj.getClass() != this.getClass())
            return false;
        var that = (UsersetTree) obj;
        return Objects.equals(this.root, that.root);
    }

    @Override
    public int hashCode() {
        return Objects.hash(root);
    }

    @Override
    public String toString() {
        return "UsersetTree[" +
                "root=" + root + ']';
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy