package org.nzbhydra.mapping.newznab.json;

import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;

/**
 * Abstract base class for {@link NewznabJsonItem} specific assertions - Generated by CustomAssertionGenerator.
 */
@jakarta.annotation.Generated(value = "assertj-assertions-generator")
public abstract class AbstractNewznabJsonItemAssert<S extends AbstractNewznabJsonItemAssert<S, A>, A extends NewznabJsonItem> extends AbstractObjectAssert<S, A> {

    /**
     * Creates a new <code>{@link AbstractNewznabJsonItemAssert}</code> to make assertions on actual NewznabJsonItem.
     *
     * @param actual the NewznabJsonItem we want to make assertions on.
     */
    protected AbstractNewznabJsonItemAssert(A actual, Class<S> selfType) {
        super(actual, selfType);
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr contains the given NewznabJsonItemAttr elements.
     *
     * @param attr the given elements that should be contained in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr does not contain all given NewznabJsonItemAttr elements.
     */
    public S hasAttr(NewznabJsonItemAttr... attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr varargs is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
        }

        // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
        Iterables.instance().assertContains(info, actual.getAttr(), attr);

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr contains the given NewznabJsonItemAttr elements in Collection.
     *
     * @param attr the given elements that should be contained in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr does not contain all given NewznabJsonItemAttr elements.
     */
    public S hasAttr(java.util.Collection<? extends NewznabJsonItemAttr> attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr collection is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
            return myself; // to fool Eclipse "Null pointer access" warning on toArray.
        }

        // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
        Iterables.instance().assertContains(info, actual.getAttr(), attr.toArray());

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr contains <b>only</b> the given NewznabJsonItemAttr elements and nothing else in whatever order.
     *
     * @param attr the given elements that should be contained in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr does not contain all given NewznabJsonItemAttr elements.
     */
    public S hasOnlyAttr(NewznabJsonItemAttr... attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr varargs is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
        }

        // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
        Iterables.instance().assertContainsOnly(info, actual.getAttr(), attr);

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr contains <b>only</b> the given NewznabJsonItemAttr elements in Collection and nothing else in whatever order.
     *
     * @param attr the given elements that should be contained in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr does not contain all given NewznabJsonItemAttr elements.
     */
    public S hasOnlyAttr(java.util.Collection<? extends NewznabJsonItemAttr> attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr collection is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
            return myself; // to fool Eclipse "Null pointer access" warning on toArray.
        }

        // check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
        Iterables.instance().assertContainsOnly(info, actual.getAttr(), attr.toArray());

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr does not contain the given NewznabJsonItemAttr elements.
     *
     * @param attr the given elements that should not be in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr contains any given NewznabJsonItemAttr elements.
     */
    public S doesNotHaveAttr(NewznabJsonItemAttr... attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr varargs is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
        }

        // check with standard error message (use overridingErrorMessage before contains to set your own message).
        Iterables.instance().assertDoesNotContain(info, actual.getAttr(), attr);

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's attr does not contain the given NewznabJsonItemAttr elements in Collection.
     *
     * @param attr the given elements that should not be in actual NewznabJsonItem's attr.
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr contains any given NewznabJsonItemAttr elements.
     */
    public S doesNotHaveAttr(java.util.Collection<? extends NewznabJsonItemAttr> attr) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // check that given NewznabJsonItemAttr collection is not null.
        if (attr == null) {
            failWithMessage("Expecting attr parameter not to be null.");
            return myself; // to fool Eclipse "Null pointer access" warning on toArray.
        }

        // check with standard error message (use overridingErrorMessage before contains to set your own message).
        Iterables.instance().assertDoesNotContain(info, actual.getAttr(), attr.toArray());

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem has no attr.
     *
     * @return this assertion object.
     * @throws AssertionError if the actual NewznabJsonItem's attr is not empty.
     */
    public S hasNoAttr() {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // we override the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting :\n  <%s>\nnot to have attr but had :\n  <%s>";

        // check
        if (actual.getAttr().iterator().hasNext()) {
            failWithMessage(assertjErrorMessage, actual, actual.getAttr());
        }

        // return the current assertion for method chaining
        return myself;
    }


    /**
     * Verifies that the actual NewznabJsonItem's category is equal to the given one.
     *
     * @param category the given category to compare the actual NewznabJsonItem's category to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's category is not equal to the given one.
     */
    public S hasCategory(String category) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting category of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualCategory = actual.getCategory();
        if (!Objects.areEqual(actualCategory, category)) {
            failWithMessage(assertjErrorMessage, actual, category, actualCategory);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's comments is equal to the given one.
     *
     * @param comments the given comments to compare the actual NewznabJsonItem's comments to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's comments is not equal to the given one.
     */
    public S hasComments(String comments) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting comments of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualComments = actual.getComments();
        if (!Objects.areEqual(actualComments, comments)) {
            failWithMessage(assertjErrorMessage, actual, comments, actualComments);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's description is equal to the given one.
     *
     * @param description the given description to compare the actual NewznabJsonItem's description to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's description is not equal to the given one.
     */
    public S hasDescription(String description) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting description of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualDescription = actual.getDescription();
        if (!Objects.areEqual(actualDescription, description)) {
            failWithMessage(assertjErrorMessage, actual, description, actualDescription);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's enclosure is equal to the given one.
     *
     * @param enclosure the given enclosure to compare the actual NewznabJsonItem's enclosure to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's enclosure is not equal to the given one.
     */
    public S hasEnclosure(NewznabJsonEnclosure enclosure) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting enclosure of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        NewznabJsonEnclosure actualEnclosure = actual.getEnclosure();
        if (!Objects.areEqual(actualEnclosure, enclosure)) {
            failWithMessage(assertjErrorMessage, actual, enclosure, actualEnclosure);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's guid is equal to the given one.
     *
     * @param guid the given guid to compare the actual NewznabJsonItem's guid to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's guid is not equal to the given one.
     */
    public S hasGuid(String guid) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting guid of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualGuid = actual.getGuid();
        if (!Objects.areEqual(actualGuid, guid)) {
            failWithMessage(assertjErrorMessage, actual, guid, actualGuid);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's id is equal to the given one.
     *
     * @param id the given id to compare the actual NewznabJsonItem's id to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's id is not equal to the given one.
     */
    public S hasId(String id) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting id of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualId = actual.getId();
        if (!Objects.areEqual(actualId, id)) {
            failWithMessage(assertjErrorMessage, actual, id, actualId);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's link is equal to the given one.
     *
     * @param link the given link to compare the actual NewznabJsonItem's link to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's link is not equal to the given one.
     */
    public S hasLink(String link) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting link of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualLink = actual.getLink();
        if (!Objects.areEqual(actualLink, link)) {
            failWithMessage(assertjErrorMessage, actual, link, actualLink);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's pubDate is equal to the given one.
     *
     * @param pubDate the given pubDate to compare the actual NewznabJsonItem's pubDate to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's pubDate is not equal to the given one.
     */
    public S hasPubDate(java.time.Instant pubDate) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting pubDate of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        java.time.Instant actualPubDate = actual.getPubDate();
        if (!Objects.areEqual(actualPubDate, pubDate)) {
            failWithMessage(assertjErrorMessage, actual, pubDate, actualPubDate);
        }

        // return the current assertion for method chaining
        return myself;
    }

    /**
     * Verifies that the actual NewznabJsonItem's title is equal to the given one.
     *
     * @param title the given title to compare the actual NewznabJsonItem's title to.
     * @return this assertion object.
     * @throws AssertionError - if the actual NewznabJsonItem's title is not equal to the given one.
     */
    public S hasTitle(String title) {
        // check that actual NewznabJsonItem we want to make assertions on is not null.
        isNotNull();

        // overrides the default error message with a more explicit one
        String assertjErrorMessage = "\nExpecting title of:\n  <%s>\nto be:\n  <%s>\nbut was:\n  <%s>";

        // null safe check
        String actualTitle = actual.getTitle();
        if (!Objects.areEqual(actualTitle, title)) {
            failWithMessage(assertjErrorMessage, actual, title, actualTitle);
        }

        // return the current assertion for method chaining
        return myself;
    }

}
