<?php


namespace CCDN\Helpers\Api\Response;


use CCDN\Helpers\Api\Response\Field\IframeUlrField;
use CCDN\Helpers\Api\Response\Field\TypeField;

class Trailers extends Response implements TrailersInterface
{

    /**
     * @inheritDoc
     */
    public function getId()
    {
        return $this->getField('id');
    }

    /**
     * @inheritDoc
     */
    public function getName()
    {
        return $this->getField('name');
    }

    /**
     * @inheritDoc
     */
    public function getType()
    {
        return $this->createFieldHandler('type', TypeField::class, null);
    }

    /**
     * @inheritDoc
     */
    public function getAge()
    {
        return $this->getField('age');
    }

    /**
     * @inheritDoc
     */
    public function getOriginName()
    {
        return $this->getField('origin_name');
    }

    /**
     * @inheritDoc
     */
    public function getYear()
    {
        return $this->getField('year');
    }

    /**
     * @inheritDoc
     */
    public function getActivateTime()
    {
        return $this->getField('activate_time');
    }

    /**
     * @inheritDoc
     */
    public function getSeason()
    {
        return $this->getField('season');
    }

    /**
     * @inheritDoc
     */
    public function getImdbRating()
    {
        return $this->getField('imdb');
    }

    /**
     * @inheritDoc
     */
    public function getImdbId()
    {
        return $this->getField('imdb_id');
    }

    /**
     * @inheritDoc
     */
    public function getKinopoiskRating()
    {
        return $this->getField('kinopoisk');
    }

    /**
     * @inheritDoc
     */
    public function getKinopoiskId()
    {
        return $this->getField('kinopoisk_id');
    }

    /**
     * @inheritDoc
     */
    public function getWorldArtRating()
    {
        return $this->getField('world_art');
    }

    /**
     * @inheritDoc
     */
    public function getWorldArtId()
    {
        return $this->getField('world_art_id');
    }

    /**
     * @inheritDoc
     */
    public function getIframeUrl()
    {
        return $this->createFieldHandler('iframe_url', IframeUlrField::class, '');
    }

    /**
     * @inheritDoc
     */
    public function getPoster()
    {
        return CCDNFunctions::useHttpProtocol($this->getField('poster'));
    }

    /**
     * @inheritDoc
     */
    public function getSerialStatus()
    {
        return $this->getField('serial_status');
    }
}
