package com.n3plugins.guardiansrift;

final class GuardiansRiftSnapshot
{
    private final GuardiansRiftState state;
    private final String status;
    private final String stopReason;
    private final boolean running;
    private final boolean loggedIn;
    private final boolean hasPickaxe;
    private final boolean usePouches;
    private final boolean pouchRepairReady;
    private final boolean breakDue;
    private final boolean breakActive;
    private final boolean gameBusy;
    private final boolean outsideBarrier;
    private final boolean gameStarted;
    private final boolean gameEnding;
    private final boolean inAltar;
    private final boolean inLargeMine;
    private final boolean inHugeMine;
    private final boolean firstPortalSpawned;
    private final boolean portalSpawned;
    private final boolean playerMoving;
    private final boolean mining;
    private final boolean craftingEssence;
    private final boolean inventoryFull;
    private final int inventoryFreeSlots;
    private final int cellCount;
    private final int fragmentCount;
    private final int neededFragments;
    private final int guardianEssence;
    private final int pouchEssence;
    private final boolean emptyPouchAvailable;
    private final boolean fullPouchAvailable;
    private final boolean degradedPouchPresent;
    private final boolean powerEssencePresent;
    private final boolean powerCellPresent;
    private final boolean inventoryRunesPresent;
    private final boolean droppableRunesPresent;
    private final boolean dropRunes;
    private final boolean nextAltarAvailable;
    private final int startingFragments;

    private GuardiansRiftSnapshot(Builder builder)
    {
        state = builder.state;
        status = builder.status;
        stopReason = builder.stopReason;
        running = builder.running;
        loggedIn = builder.loggedIn;
        hasPickaxe = builder.hasPickaxe;
        usePouches = builder.usePouches;
        pouchRepairReady = builder.pouchRepairReady;
        breakDue = builder.breakDue;
        breakActive = builder.breakActive;
        gameBusy = builder.gameBusy;
        outsideBarrier = builder.outsideBarrier;
        gameStarted = builder.gameStarted;
        gameEnding = builder.gameEnding;
        inAltar = builder.inAltar;
        inLargeMine = builder.inLargeMine;
        inHugeMine = builder.inHugeMine;
        firstPortalSpawned = builder.firstPortalSpawned;
        portalSpawned = builder.portalSpawned;
        playerMoving = builder.playerMoving;
        mining = builder.mining;
        craftingEssence = builder.craftingEssence;
        inventoryFull = builder.inventoryFull;
        inventoryFreeSlots = builder.inventoryFreeSlots;
        cellCount = builder.cellCount;
        fragmentCount = builder.fragmentCount;
        neededFragments = builder.neededFragments;
        guardianEssence = builder.guardianEssence;
        pouchEssence = builder.pouchEssence;
        emptyPouchAvailable = builder.emptyPouchAvailable;
        fullPouchAvailable = builder.fullPouchAvailable;
        degradedPouchPresent = builder.degradedPouchPresent;
        powerEssencePresent = builder.powerEssencePresent;
        powerCellPresent = builder.powerCellPresent;
        inventoryRunesPresent = builder.inventoryRunesPresent;
        droppableRunesPresent = builder.droppableRunesPresent;
        dropRunes = builder.dropRunes;
        nextAltarAvailable = builder.nextAltarAvailable;
        startingFragments = builder.startingFragments;
    }

    static Builder builder()
    {
        return new Builder();
    }

    static GuardiansRiftSnapshot idle()
    {
        return builder().state(GuardiansRiftState.STOPPED).status("Idle").build();
    }

    Builder toBuilder()
    {
        return new Builder(this);
    }

    GuardiansRiftState getState() { return state; }
    String getStatus() { return status; }
    String getStopReason() { return stopReason; }
    boolean isRunning() { return running; }
    boolean isLoggedIn() { return loggedIn; }
    boolean hasPickaxe() { return hasPickaxe; }
    boolean isUsePouches() { return usePouches; }
    boolean isPouchRepairReady() { return pouchRepairReady; }
    boolean isBreakDue() { return breakDue; }
    boolean isBreakActive() { return breakActive; }
    boolean isGameBusy() { return gameBusy; }
    boolean isOutsideBarrier() { return outsideBarrier; }
    boolean isGameStarted() { return gameStarted; }
    boolean isGameEnding() { return gameEnding; }
    boolean isInAltar() { return inAltar; }
    boolean isInLargeMine() { return inLargeMine; }
    boolean isInHugeMine() { return inHugeMine; }
    boolean hasFirstPortalSpawned() { return firstPortalSpawned; }
    boolean isPortalSpawned() { return portalSpawned; }
    boolean isPlayerMoving() { return playerMoving; }
    boolean isMining() { return mining; }
    boolean isCraftingEssence() { return craftingEssence; }
    boolean isInventoryFull() { return inventoryFull; }
    int getInventoryFreeSlots() { return inventoryFreeSlots; }
    int getCellCount() { return cellCount; }
    int getFragmentCount() { return fragmentCount; }
    int getNeededFragments() { return neededFragments; }
    int getGuardianEssence() { return guardianEssence; }
    int getPouchEssence() { return pouchEssence; }
    boolean isEmptyPouchAvailable() { return emptyPouchAvailable; }
    boolean isFullPouchAvailable() { return fullPouchAvailable; }
    boolean isDegradedPouchPresent() { return degradedPouchPresent; }
    boolean isPowerEssencePresent() { return powerEssencePresent; }
    boolean isPowerCellPresent() { return powerCellPresent; }
    boolean isInventoryRunesPresent() { return inventoryRunesPresent; }
    boolean isDroppableRunesPresent() { return droppableRunesPresent; }
    boolean isDropRunes() { return dropRunes; }
    boolean isNextAltarAvailable() { return nextAltarAvailable; }
    int getStartingFragments() { return startingFragments; }

    static final class Builder
    {
        private GuardiansRiftState state = GuardiansRiftState.STOPPED;
        private String status = "Idle";
        private String stopReason;
        private boolean running;
        private boolean loggedIn;
        private boolean hasPickaxe;
        private boolean usePouches;
        private boolean pouchRepairReady;
        private boolean breakDue;
        private boolean breakActive;
        private boolean gameBusy;
        private boolean outsideBarrier;
        private boolean gameStarted;
        private boolean gameEnding;
        private boolean inAltar;
        private boolean inLargeMine;
        private boolean inHugeMine;
        private boolean firstPortalSpawned;
        private boolean portalSpawned;
        private boolean playerMoving;
        private boolean mining;
        private boolean craftingEssence;
        private boolean inventoryFull;
        private int inventoryFreeSlots = 28;
        private int cellCount;
        private int fragmentCount;
        private int neededFragments = 20;
        private int guardianEssence;
        private int pouchEssence;
        private boolean emptyPouchAvailable;
        private boolean fullPouchAvailable;
        private boolean degradedPouchPresent;
        private boolean powerEssencePresent;
        private boolean powerCellPresent;
        private boolean inventoryRunesPresent;
        private boolean droppableRunesPresent;
        private boolean dropRunes;
        private boolean nextAltarAvailable;
        private int startingFragments;

        private Builder()
        {
        }

        private Builder(GuardiansRiftSnapshot snapshot)
        {
            state = snapshot.state;
            status = snapshot.status;
            stopReason = snapshot.stopReason;
            running = snapshot.running;
            loggedIn = snapshot.loggedIn;
            hasPickaxe = snapshot.hasPickaxe;
            usePouches = snapshot.usePouches;
            pouchRepairReady = snapshot.pouchRepairReady;
            breakDue = snapshot.breakDue;
            breakActive = snapshot.breakActive;
            gameBusy = snapshot.gameBusy;
            outsideBarrier = snapshot.outsideBarrier;
            gameStarted = snapshot.gameStarted;
            gameEnding = snapshot.gameEnding;
            inAltar = snapshot.inAltar;
            inLargeMine = snapshot.inLargeMine;
            inHugeMine = snapshot.inHugeMine;
            firstPortalSpawned = snapshot.firstPortalSpawned;
            portalSpawned = snapshot.portalSpawned;
            playerMoving = snapshot.playerMoving;
            mining = snapshot.mining;
            craftingEssence = snapshot.craftingEssence;
            inventoryFull = snapshot.inventoryFull;
            inventoryFreeSlots = snapshot.inventoryFreeSlots;
            cellCount = snapshot.cellCount;
            fragmentCount = snapshot.fragmentCount;
            neededFragments = snapshot.neededFragments;
            guardianEssence = snapshot.guardianEssence;
            pouchEssence = snapshot.pouchEssence;
            emptyPouchAvailable = snapshot.emptyPouchAvailable;
            fullPouchAvailable = snapshot.fullPouchAvailable;
            degradedPouchPresent = snapshot.degradedPouchPresent;
            powerEssencePresent = snapshot.powerEssencePresent;
            powerCellPresent = snapshot.powerCellPresent;
            inventoryRunesPresent = snapshot.inventoryRunesPresent;
            droppableRunesPresent = snapshot.droppableRunesPresent;
            dropRunes = snapshot.dropRunes;
            nextAltarAvailable = snapshot.nextAltarAvailable;
            startingFragments = snapshot.startingFragments;
        }

        Builder state(GuardiansRiftState value) { state = value; return this; }
        Builder status(String value) { status = value; return this; }
        Builder stopReason(String value) { stopReason = value; return this; }
        Builder running(boolean value) { running = value; return this; }
        Builder loggedIn(boolean value) { loggedIn = value; return this; }
        Builder hasPickaxe(boolean value) { hasPickaxe = value; return this; }
        Builder usePouches(boolean value) { usePouches = value; return this; }
        Builder pouchRepairReady(boolean value) { pouchRepairReady = value; return this; }
        Builder breakDue(boolean value) { breakDue = value; return this; }
        Builder breakActive(boolean value) { breakActive = value; return this; }
        Builder gameBusy(boolean value) { gameBusy = value; return this; }
        Builder outsideBarrier(boolean value) { outsideBarrier = value; return this; }
        Builder gameStarted(boolean value) { gameStarted = value; return this; }
        Builder gameEnding(boolean value) { gameEnding = value; return this; }
        Builder inAltar(boolean value) { inAltar = value; return this; }
        Builder inLargeMine(boolean value) { inLargeMine = value; return this; }
        Builder inHugeMine(boolean value) { inHugeMine = value; return this; }
        Builder firstPortalSpawned(boolean value) { firstPortalSpawned = value; return this; }
        Builder portalSpawned(boolean value) { portalSpawned = value; return this; }
        Builder playerMoving(boolean value) { playerMoving = value; return this; }
        Builder mining(boolean value) { mining = value; return this; }
        Builder craftingEssence(boolean value) { craftingEssence = value; return this; }
        Builder inventoryFull(boolean value) { inventoryFull = value; return this; }
        Builder inventoryFreeSlots(int value) { inventoryFreeSlots = value; return this; }
        Builder cellCount(int value) { cellCount = value; return this; }
        Builder fragmentCount(int value) { fragmentCount = value; return this; }
        Builder neededFragments(int value) { neededFragments = value; return this; }
        Builder guardianEssence(int value) { guardianEssence = value; return this; }
        Builder pouchEssence(int value) { pouchEssence = value; return this; }
        Builder emptyPouchAvailable(boolean value) { emptyPouchAvailable = value; return this; }
        Builder fullPouchAvailable(boolean value) { fullPouchAvailable = value; return this; }
        Builder degradedPouchPresent(boolean value) { degradedPouchPresent = value; return this; }
        Builder powerEssencePresent(boolean value) { powerEssencePresent = value; return this; }
        Builder powerCellPresent(boolean value) { powerCellPresent = value; return this; }
        Builder inventoryRunesPresent(boolean value) { inventoryRunesPresent = value; return this; }
        Builder droppableRunesPresent(boolean value) { droppableRunesPresent = value; return this; }
        Builder dropRunes(boolean value) { dropRunes = value; return this; }
        Builder nextAltarAvailable(boolean value) { nextAltarAvailable = value; return this; }
        Builder startingFragments(int value) { startingFragments = value; return this; }

        GuardiansRiftSnapshot build()
        {
            return new GuardiansRiftSnapshot(this);
        }
    }
}
