<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/channel/v1/products.proto

namespace Google\Cloud\Channel\V1;

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

/**
 * Represents media information.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.Media</code>
 */
class Media extends \Google\Protobuf\Internal\Message
{
    /**
     * Title of the media.
     *
     * Generated from protobuf field <code>string title = 1;</code>
     */
    protected $title = '';
    /**
     * URL of the media.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     */
    protected $content = '';
    /**
     * Type of the media.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.MediaType type = 3;</code>
     */
    protected $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $title
     *           Title of the media.
     *     @type string $content
     *           URL of the media.
     *     @type int $type
     *           Type of the media.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Products::initOnce();
        parent::__construct($data);
    }

    /**
     * Title of the media.
     *
     * Generated from protobuf field <code>string title = 1;</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Title of the media.
     *
     * Generated from protobuf field <code>string title = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * URL of the media.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * URL of the media.
     *
     * Generated from protobuf field <code>string content = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkString($var, True);
        $this->content = $var;

        return $this;
    }

    /**
     * Type of the media.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.MediaType type = 3;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of the media.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.MediaType type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Channel\V1\MediaType::class);
        $this->type = $var;

        return $this;
    }

}

