package org.nzbhydra.mapping.github;

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

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

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

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

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

        // null safe check
        String actualBrowserDownloadUrl = actual.getBrowserDownloadUrl();
        if (!Objects.areEqual(actualBrowserDownloadUrl, browserDownloadUrl)) {
            failWithMessage(assertjErrorMessage, actual, browserDownloadUrl, actualBrowserDownloadUrl);
        }

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

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

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

        // null safe check
        String actualContentType = actual.getContentType();
        if (!Objects.areEqual(actualContentType, contentType)) {
            failWithMessage(assertjErrorMessage, actual, contentType, actualContentType);
        }

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

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

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

        // null safe check
        String actualCreatedAt = actual.getCreatedAt();
        if (!Objects.areEqual(actualCreatedAt, createdAt)) {
            failWithMessage(assertjErrorMessage, actual, createdAt, actualCreatedAt);
        }

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

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

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

        // null safe check
        Long actualDownloadCount = actual.getDownloadCount();
        if (!Objects.areEqual(actualDownloadCount, downloadCount)) {
            failWithMessage(assertjErrorMessage, actual, downloadCount, actualDownloadCount);
        }

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

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

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

        // null safe check
        String actualLabel = actual.getLabel();
        if (!Objects.areEqual(actualLabel, label)) {
            failWithMessage(assertjErrorMessage, actual, label, actualLabel);
        }

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

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

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

        // null safe check
        String actualName = actual.getName();
        if (!Objects.areEqual(actualName, name)) {
            failWithMessage(assertjErrorMessage, actual, name, actualName);
        }

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

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

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

        // null safe check
        Long actualSize = actual.getSize();
        if (!Objects.areEqual(actualSize, size)) {
            failWithMessage(assertjErrorMessage, actual, size, actualSize);
        }

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

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

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

        // null safe check
        String actualState = actual.getState();
        if (!Objects.areEqual(actualState, state)) {
            failWithMessage(assertjErrorMessage, actual, state, actualState);
        }

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

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

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

        // null safe check
        String actualUpdatedAt = actual.getUpdatedAt();
        if (!Objects.areEqual(actualUpdatedAt, updatedAt)) {
            failWithMessage(assertjErrorMessage, actual, updatedAt, actualUpdatedAt);
        }

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

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

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

        // null safe check
        String actualUrl = actual.getUrl();
        if (!Objects.areEqual(actualUrl, url)) {
            failWithMessage(assertjErrorMessage, actual, url, actualUrl);
        }

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

}
