package org.nzbhydra.downloading;

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

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

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

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

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

        // null safe check
        org.nzbhydra.config.SearchSource actualAccessSource = actual.getAccessSource();
        if (!Objects.areEqual(actualAccessSource, accessSource)) {
            failWithMessage(assertjErrorMessage, actual, accessSource, actualAccessSource);
        }

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

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

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

        // null safe check
        Integer actualAge = actual.getAge();
        if (!Objects.areEqual(actualAge, age)) {
            failWithMessage(assertjErrorMessage, actual, age, actualAge);
        }

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

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

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

        // null safe check
        String actualError = actual.getError();
        if (!Objects.areEqual(actualError, error)) {
            failWithMessage(assertjErrorMessage, actual, error, actualError);
        }

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

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

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

        // null safe check
        String actualExternalId = actual.getExternalId();
        if (!Objects.areEqual(actualExternalId, externalId)) {
            failWithMessage(assertjErrorMessage, actual, externalId, actualExternalId);
        }

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

    /**
     * Verifies that the actual FileDownloadEntityTO's id is equal to the given one.
     *
     * @param id the given id to compare the actual FileDownloadEntityTO's id to.
     * @return this assertion object.
     * @throws AssertionError - if the actual FileDownloadEntityTO's id is not equal to the given one.
     */
    public S hasId(int id) {
        // check that actual FileDownloadEntityTO 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>";

        // check
        int actualId = actual.getId();
        if (actualId != id) {
            failWithMessage(assertjErrorMessage, actual, id, actualId);
        }

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

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

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

        // null safe check
        String actualIp = actual.getIp();
        if (!Objects.areEqual(actualIp, ip)) {
            failWithMessage(assertjErrorMessage, actual, ip, actualIp);
        }

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

    /**
     * Verifies that the actual FileDownloadEntityTO's nzbAccessType is equal to the given one.
     *
     * @param nzbAccessType the given nzbAccessType to compare the actual FileDownloadEntityTO's nzbAccessType to.
     * @return this assertion object.
     * @throws AssertionError - if the actual FileDownloadEntityTO's nzbAccessType is not equal to the given one.
     */
    public S hasNzbAccessType(org.nzbhydra.config.downloading.FileDownloadAccessType nzbAccessType) {
        // check that actual FileDownloadEntityTO 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
        org.nzbhydra.config.downloading.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 FileDownloadEntityTO's searchResult is equal to the given one.
     *
     * @param searchResult the given searchResult to compare the actual FileDownloadEntityTO's searchResult to.
     * @return this assertion object.
     * @throws AssertionError - if the actual FileDownloadEntityTO's searchResult is not equal to the given one.
     */
    public S hasSearchResult(org.nzbhydra.searching.db.SearchResultEntityTO searchResult) {
        // check that actual FileDownloadEntityTO we want to make assertions on is not null.
        isNotNull();

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

        // null safe check
        org.nzbhydra.searching.db.SearchResultEntityTO actualSearchResult = actual.getSearchResult();
        if (!Objects.areEqual(actualSearchResult, searchResult)) {
            failWithMessage(assertjErrorMessage, actual, searchResult, actualSearchResult);
        }

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

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

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

        // null safe check
        FileDownloadStatus actualStatus = actual.getStatus();
        if (!Objects.areEqual(actualStatus, status)) {
            failWithMessage(assertjErrorMessage, actual, status, actualStatus);
        }

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

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

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

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

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

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

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

        // null safe check
        String actualUserAgent = actual.getUserAgent();
        if (!Objects.areEqual(actualUserAgent, userAgent)) {
            failWithMessage(assertjErrorMessage, actual, userAgent, actualUserAgent);
        }

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

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

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

        // null safe check
        String actualUsername = actual.getUsername();
        if (!Objects.areEqual(actualUsername, username)) {
            failWithMessage(assertjErrorMessage, actual, username, actualUsername);
        }

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

}
