<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: rv2d.proto

namespace Rv\Data;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Generated from protobuf message <code>rv.data.MediaPreview</code>
 */
class MediaPreview extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.rv.data.Action action = 1;</code>
     */
    protected $action = null;
    /**
     * Generated from protobuf field <code>.rv.data.Media media = 2;</code>
     */
    protected $media = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\Action $action
     *     @type \Rv\Data\Media $media
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Rv2D::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action action = 1;</code>
     * @return \Rv\Data\Action|null
     */
    public function getAction()
    {
        return $this->action;
    }

    public function hasAction()
    {
        return isset($this->action);
    }

    public function clearAction()
    {
        unset($this->action);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Action action = 1;</code>
     * @param \Rv\Data\Action $var
     * @return $this
     */
    public function setAction($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Action::class);
        $this->action = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.Media media = 2;</code>
     * @return \Rv\Data\Media|null
     */
    public function getMedia()
    {
        return $this->media;
    }

    public function hasMedia()
    {
        return isset($this->media);
    }

    public function clearMedia()
    {
        unset($this->media);
    }

    /**
     * Generated from protobuf field <code>.rv.data.Media media = 2;</code>
     * @param \Rv\Data\Media $var
     * @return $this
     */
    public function setMedia($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\Media::class);
        $this->media = $var;

        return $this;
    }

}

