<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/intent.proto

namespace Google\Cloud\Dialogflow\V2\Intent\Message\MediaContent;

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

/**
 * Response media object for media content card.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject</code>
 */
class ResponseMediaObject extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of media card.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Optional. Description of media card.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $description = '';
    /**
     * Required. Url where the media is stored.
     *
     * Generated from protobuf field <code>string content_url = 5;</code>
     */
    private $content_url = '';
    protected $image;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Name of media card.
     *     @type string $description
     *           Optional. Description of media card.
     *     @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $large_image
     *           Optional. Image to display above media content.
     *     @type \Google\Cloud\Dialogflow\V2\Intent\Message\Image $icon
     *           Optional. Icon to display above media content.
     *     @type string $content_url
     *           Required. Url where the media is stored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of media card.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Name of media card.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Description of media card.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. Description of media card.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Optional. Image to display above media content.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image
     */
    public function getLargeImage()
    {
        return $this->readOneof(3);
    }

    public function hasLargeImage()
    {
        return $this->hasOneof(3);
    }

    /**
     * Optional. Image to display above media content.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var
     * @return $this
     */
    public function setLargeImage($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Optional. Icon to display above media content.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dialogflow\V2\Intent\Message\Image
     */
    public function getIcon()
    {
        return $this->readOneof(4);
    }

    public function hasIcon()
    {
        return $this->hasOneof(4);
    }

    /**
     * Optional. Icon to display above media content.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dialogflow\V2\Intent\Message\Image $var
     * @return $this
     */
    public function setIcon($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\Intent\Message\Image::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Required. Url where the media is stored.
     *
     * Generated from protobuf field <code>string content_url = 5;</code>
     * @return string
     */
    public function getContentUrl()
    {
        return $this->content_url;
    }

    /**
     * Required. Url where the media is stored.
     *
     * Generated from protobuf field <code>string content_url = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setContentUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->content_url = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getImage()
    {
        return $this->whichOneof("image");
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResponseMediaObject::class, \Google\Cloud\Dialogflow\V2\Intent_Message_MediaContent_ResponseMediaObject::class);

