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

namespace PhpWA\Protocol\Proto\HydratedTemplateButton;

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

/**
 * Generated from protobuf message <code>proto.HydratedTemplateButton.HydratedURLButton</code>
 */
class HydratedURLButton extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string displayText = 1;</code>
     */
    protected $displayText = null;
    /**
     * Generated from protobuf field <code>optional string url = 2;</code>
     */
    protected $url = null;
    /**
     * Generated from protobuf field <code>optional string consentedUsersUrl = 3;</code>
     */
    protected $consentedUsersUrl = null;
    /**
     * Generated from protobuf field <code>optional .proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType webviewPresentation = 4;</code>
     */
    protected $webviewPresentation = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $displayText
     *     @type string $url
     *     @type string $consentedUsersUrl
     *     @type int $webviewPresentation
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional string displayText = 1;</code>
     * @return string
     */
    public function getDisplayText()
    {
        return isset($this->displayText) ? $this->displayText : '';
    }

    public function hasDisplayText()
    {
        return isset($this->displayText);
    }

    public function clearDisplayText()
    {
        unset($this->displayText);
    }

    /**
     * Generated from protobuf field <code>optional string displayText = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayText($var)
    {
        GPBUtil::checkString($var, True);
        $this->displayText = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string url = 2;</code>
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

    /**
     * Generated from protobuf field <code>optional string url = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string consentedUsersUrl = 3;</code>
     * @return string
     */
    public function getConsentedUsersUrl()
    {
        return isset($this->consentedUsersUrl) ? $this->consentedUsersUrl : '';
    }

    public function hasConsentedUsersUrl()
    {
        return isset($this->consentedUsersUrl);
    }

    public function clearConsentedUsersUrl()
    {
        unset($this->consentedUsersUrl);
    }

    /**
     * Generated from protobuf field <code>optional string consentedUsersUrl = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setConsentedUsersUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->consentedUsersUrl = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType webviewPresentation = 4;</code>
     * @return int
     */
    public function getWebviewPresentation()
    {
        return isset($this->webviewPresentation) ? $this->webviewPresentation : 0;
    }

    public function hasWebviewPresentation()
    {
        return isset($this->webviewPresentation);
    }

    public function clearWebviewPresentation()
    {
        unset($this->webviewPresentation);
    }

    /**
     * Generated from protobuf field <code>optional .proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType webviewPresentation = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setWebviewPresentation($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\HydratedTemplateButton\HydratedURLButton\WebviewPresentationType::class);
        $this->webviewPresentation = $var;

        return $this;
    }

}

