<?php

namespace App\Generated\V1_1\Messages\Friend;

use Kamicloud\StubApi\Concerns\ValueHelper;
use App\Generated\V1_1\Enums\FriendLevel;
use Kamicloud\StubApi\Http\Messages\Message;
use Kamicloud\StubApi\Utils\Constants;
use App\Generated\V1_1\DTOs\ContactUserDTO;

class GetContactMessage extends Message
{
    use ValueHelper;

    protected $contactUid;
    protected $isUnHandlerFriendApply;
    protected $friendLevel;
    protected $is_blacklist;
    protected $star_at;
    protected $contact;

    /**
     * @return int
     */
    public function getContactUid()
    {
        return $this->contactUid;
    }

    public function requestRules()
    {
        return [
            ['contactUid', 'contact_uid', 'bail|integer', Constants::INTEGER, null],
        ];
    }

    public function responseRules()
    {
        return [
            ['isUnHandlerFriendApply', 'is_un_handler_friend_apply', 'bail|boolean', Constants::BOOLEAN, null],
            ['friendLevel', 'friend_level', FriendLevel::class, Constants::ENUM, null],
            ['is_blacklist', 'is_blacklist', 'bail|integer', Constants::INTEGER, null],
            ['star_at', 'star_at', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
            ['contact', 'contact', ContactUserDTO::class, Constants::MODEL, null],
        ];
    }

    public function setResponse($isUnHandlerFriendApply, $friendLevel, $is_blacklist, $star_at, $contact)
    {
        $this->isUnHandlerFriendApply = $isUnHandlerFriendApply;
        $this->friendLevel = $friendLevel;
        $this->is_blacklist = $is_blacklist;
        $this->star_at = $star_at;
        $this->contact = $contact;
    }

}
