package org.nzbhydra.downloading;

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

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

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

    /**
     * Verifies that the actual AddFilesRequest's category is equal to the given one.
     *
     * @param category the given category to compare the actual AddFilesRequest's category to.
     * @return this assertion object.
     * @throws AssertionError - if the actual AddFilesRequest's category is not equal to the given one.
     */
    public S hasCategory(String category) {
        // check that actual AddFilesRequest 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 AddFilesRequest's downloaderName is equal to the given one.
     *
     * @param downloaderName the given downloaderName to compare the actual AddFilesRequest's downloaderName to.
     * @return this assertion object.
     * @throws AssertionError - if the actual AddFilesRequest's downloaderName is not equal to the given one.
     */
    public S hasDownloaderName(String downloaderName) {
        // check that actual AddFilesRequest we want to make assertions on is not null.
        isNotNull();

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

        // null safe check
        String actualDownloaderName = actual.getDownloaderName();
        if (!Objects.areEqual(actualDownloaderName, downloaderName)) {
            failWithMessage(assertjErrorMessage, actual, downloaderName, actualDownloaderName);
        }

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

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

        // check that given AddFilesRequest.SearchResult varargs is not null.
        if (searchResults == null) {
            failWithMessage("Expecting searchResults 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.getSearchResults(), searchResults);

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

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

        // check that given AddFilesRequest.SearchResult collection is not null.
        if (searchResults == null) {
            failWithMessage("Expecting searchResults 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.getSearchResults(), searchResults.toArray());

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

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

        // check that given AddFilesRequest.SearchResult varargs is not null.
        if (searchResults == null) {
            failWithMessage("Expecting searchResults 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.getSearchResults(), searchResults);

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

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

        // check that given AddFilesRequest.SearchResult collection is not null.
        if (searchResults == null) {
            failWithMessage("Expecting searchResults 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.getSearchResults(), searchResults.toArray());

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

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

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

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

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

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

        // check that given AddFilesRequest.SearchResult collection is not null.
        if (searchResults == null) {
            failWithMessage("Expecting searchResults 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.getSearchResults(), searchResults.toArray());

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

    /**
     * Verifies that the actual AddFilesRequest has no searchResults.
     *
     * @return this assertion object.
     * @throws AssertionError if the actual AddFilesRequest's searchResults is not empty.
     */
    public S hasNoSearchResults() {
        // check that actual AddFilesRequest 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 searchResults but had :\n  <%s>";

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

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


}
