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

io.quarkiverse.openfga.client.model.dto.WriteAssertionsRequest Maven / Gradle / Ivy

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

import static com.fasterxml.jackson.annotation.JsonCreator.Mode.PROPERTIES;

import java.util.List;
import java.util.Objects;

import javax.annotation.Nullable;

import com.fasterxml.jackson.annotation.JsonCreator;

import io.quarkiverse.openfga.client.model.Assertion;
import io.quarkiverse.openfga.client.model.utils.Preconditions;

public final class WriteAssertionsRequest {
    private final List assertions;

    @JsonCreator(mode = PROPERTIES)
    public WriteAssertionsRequest(List assertions) {
        this.assertions = Preconditions.parameterNonNull(assertions, "assertions");
    }

    public List getAssertions() {
        return assertions;
    }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy