<?php

namespace App\Generated\V1_1\Messages\Pair;

use Kamicloud\StubApi\Concerns\ValueHelper;
use Kamicloud\StubApi\Http\Messages\Message;
use Kamicloud\StubApi\Utils\Constants;

class EnrollByEnergyMessage extends Message
{
    use ValueHelper;

    protected $stageId;
    protected $mediaId;
    protected $km;
    protected $lng;
    protected $lat;
    protected $location;
    protected $sex;
    protected $sxo;
    protected $minAge;
    protected $maxAge;
    protected $pair;

    /**
     * 活动期数
     * @return int
     */
    public function getStageId()
    {
        return $this->stageId;
    }

    /**
     * 渠道ID
     * @return string|null
     */
    public function getMediaId()
    {
        return $this->mediaId;
    }

    /**
     * 范围：km
     * @return int
     */
    public function getKm()
    {
        return $this->km;
    }

    /**
     * 经度
     * @return string
     */
    public function getLng()
    {
        return $this->lng;
    }

    /**
     * 纬度
     * @return string
     */
    public function getLat()
    {
        return $this->lat;
    }

    /**
     * 地理位置
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * 性别:1=男,2=女
     * @return int
     */
    public function getSex()
    {
        return $this->sex;
    }

    /**
     * 性取向:1=男,2=女 ...
     * @return int
     */
    public function getSxo()
    {
        return $this->sxo;
    }

    /**
     * 匹配最小年龄
     * @return int
     */
    public function getMinAge()
    {
        return $this->minAge;
    }

    /**
     * 匹配最大年龄
     * @return int
     */
    public function getMaxAge()
    {
        return $this->maxAge;
    }

    public function requestRules()
    {
        return [
            ['stageId', 'stage_id', 'bail|integer', Constants::INTEGER, null],
            ['mediaId', 'media_id', 'bail|nullable|string', Constants::STRING | Constants::OPTIONAL, null],
            ['km', 'km', 'bail|integer', Constants::INTEGER, null],
            ['lng', 'lng', 'bail|string', Constants::STRING, null],
            ['lat', 'lat', 'bail|string', Constants::STRING, null],
            ['location', 'location', 'bail|string', Constants::STRING, null],
            ['sex', 'sex', 'bail|integer', Constants::INTEGER, null],
            ['sxo', 'sxo', 'bail|integer', Constants::INTEGER, null],
            ['minAge', 'min_age', 'bail|integer', Constants::INTEGER, null],
            ['maxAge', 'max_age', 'bail|integer', Constants::INTEGER, null],
        ];
    }

    public function responseRules()
    {
        return [
            ['pair', 'pair', 'bail', null, null],
        ];
    }

    public function setResponse($pair)
    {
        $this->pair = $pair;
    }

}
