<?php

namespace App\Generated\Controllers\V1;

use App\Generated\V1\Messages\AdminPartner\Change2NewMessage;
use App\Http\Controllers\Controller;
use App\Http\Services\V1\AdminPartnerService;
use App\Generated\V1\Messages\AdminPartner\IsSelectedListMessage;
use App\Generated\V1\Messages\AdminPartner\UnSelectPartnerMessage;
use DB;
use App\Generated\V1\Messages\AdminPartner\LowListMessage;

class AdminPartnerController extends Controller
{
    public $handler;

    public function __construct(AdminPartnerService $handler)
    {
        $this->handler = $handler;
    }

    public function change2New(Change2NewMessage $message)
    {
        $message->validateInput();
        $this->handler->change2New($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function lowList(LowListMessage $message)
    {
        $message->validateInput();
        $this->handler->lowList($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function unSelectPartner(UnSelectPartnerMessage $message)
    {
        $message->validateInput();
        $this->handler->unSelectPartner($message);
        $message->validateOutput();
        return $message->getResponse();
    }

    public function isSelectedList(IsSelectedListMessage $message)
    {
        $message->validateInput();
        $this->handler->isSelectedList($message);
        $message->validateOutput();
        return $message->getResponse();
    }

}
