<?php

namespace App\Generated\Controllers\V1;

use App\Generated\V1\Messages\Friend\GetUnreadCountMessage;
use App\Http\Controllers\Controller;
use App\Generated\V1\Messages\Friend\GetChatHistoryMessage;
use App\Generated\V1\Messages\Friend\GetEachLikeListMessage;
use App\Generated\V1\Messages\Friend\AgreeApplyMessage;
use App\Generated\V1\Messages\Friend\GetApplyReceiveListMessage;
use App\Generated\V1\Messages\Friend\GetStarListMessage;
use App\Generated\V1\Messages\Friend\GetApplySendListMessage;
use App\Http\Services\V1\FriendService;
use App\Generated\V1\Messages\Friend\GetApplyAllListMessage;
use App\Generated\V1\Messages\Friend\GetAllListMessage;
use DB;

class FriendController extends Controller
{
    public $handler;

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

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

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

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

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

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

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

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

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

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

}
