package org.nzbhydra.config.downloading;

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

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

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

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

        // check that given DownloaderConfig varargs is not null.
        if (downloaders == null) {
            failWithMessage("Expecting downloaders 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.getDownloaders(), downloaders);

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

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

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

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

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

        // check that given DownloaderConfig varargs is not null.
        if (downloaders == null) {
            failWithMessage("Expecting downloaders 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.getDownloaders(), downloaders);

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

        // null safe check
        java.util.Optional actualExternalUrl = actual.getExternalUrl();
        if (!Objects.areEqual(actualExternalUrl, externalUrl)) {
            failWithMessage(assertjErrorMessage, actual, externalUrl, actualExternalUrl);
        }

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

    /**
     * Verifies that the actual DownloadingConfig's fallbackForFailed is equal to the given one.
     *
     * @param fallbackForFailed the given fallbackForFailed to compare the actual DownloadingConfig's fallbackForFailed to.
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig's fallbackForFailed is not equal to the given one.
     */
    public S hasFallbackForFailed(org.nzbhydra.config.SearchSourceRestriction fallbackForFailed) {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

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

        // null safe check
        org.nzbhydra.config.SearchSourceRestriction actualFallbackForFailed = actual.getFallbackForFailed();
        if (!Objects.areEqual(actualFallbackForFailed, fallbackForFailed)) {
            failWithMessage(assertjErrorMessage, actual, fallbackForFailed, actualFallbackForFailed);
        }

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

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

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

        // null safe check
        FileDownloadAccessType actualNzbAccessType = actual.getNzbAccessType();
        if (!Objects.areEqual(actualNzbAccessType, nzbAccessType)) {
            failWithMessage(assertjErrorMessage, actual, nzbAccessType, actualNzbAccessType);
        }

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

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

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

        // null safe check
        String actualPrimaryDownloader = actual.getPrimaryDownloader();
        if (!Objects.areEqual(actualPrimaryDownloader, primaryDownloader)) {
            failWithMessage(assertjErrorMessage, actual, primaryDownloader, actualPrimaryDownloader);
        }

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

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

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

        // null safe check
        java.util.Optional actualSaveNzbsTo = actual.getSaveNzbsTo();
        if (!Objects.areEqual(actualSaveNzbsTo, saveNzbsTo)) {
            failWithMessage(assertjErrorMessage, actual, saveNzbsTo, actualSaveNzbsTo);
        }

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

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

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

        // null safe check
        java.util.Optional actualSaveTorrentsTo = actual.getSaveTorrentsTo();
        if (!Objects.areEqual(actualSaveTorrentsTo, saveTorrentsTo)) {
            failWithMessage(assertjErrorMessage, actual, saveTorrentsTo, actualSaveTorrentsTo);
        }

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

    /**
     * Verifies that the actual DownloadingConfig is send magnet links.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is not send magnet links.
     */
    public S isSendMagnetLinks() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is true
        if (!actual.isSendMagnetLinks()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is send magnet links but is not.");
        }

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

    /**
     * Verifies that the actual DownloadingConfig is not send magnet links.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is send magnet links.
     */
    public S isNotSendMagnetLinks() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is false
        if (actual.isSendMagnetLinks()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is not send magnet links but is.");
        }

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

    /**
     * Verifies that the actual DownloadingConfig is show downloader status.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is not show downloader status.
     */
    public S isShowDownloaderStatus() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is true
        if (!actual.isShowDownloaderStatus()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is show downloader status but is not.");
        }

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

    /**
     * Verifies that the actual DownloadingConfig is not show downloader status.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is show downloader status.
     */
    public S isNotShowDownloaderStatus() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is false
        if (actual.isShowDownloaderStatus()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is not show downloader status but is.");
        }

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

    /**
     * Verifies that the actual DownloadingConfig is update statuses.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is not update statuses.
     */
    public S isUpdateStatuses() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is true
        if (!actual.isUpdateStatuses()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is update statuses but is not.");
        }

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

    /**
     * Verifies that the actual DownloadingConfig is not update statuses.
     *
     * @return this assertion object.
     * @throws AssertionError - if the actual DownloadingConfig is update statuses.
     */
    public S isNotUpdateStatuses() {
        // check that actual DownloadingConfig we want to make assertions on is not null.
        isNotNull();

        // check that property call/field access is false
        if (actual.isUpdateStatuses()) {
            failWithMessage("\nExpecting that actual DownloadingConfig is not update statuses but is.");
        }

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

}
