<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: dy.proto

namespace Douyin;

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

/**
 * Generated from protobuf message <code>douyin.TextPieceUser</code>
 */
class TextPieceUser extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.douyin.User user = 1;</code>
     */
    protected $user = null;
    /**
     * Generated from protobuf field <code>bool withColon = 2;</code>
     */
    protected $withColon = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Douyin\User $user
     *     @type bool $withColon
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Dy::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.douyin.User user = 1;</code>
     * @return \Douyin\User|null
     */
    public function getUser()
    {
        return $this->user;
    }

    public function hasUser()
    {
        return isset($this->user);
    }

    public function clearUser()
    {
        unset($this->user);
    }

    /**
     * Generated from protobuf field <code>.douyin.User user = 1;</code>
     * @param \Douyin\User $var
     * @return $this
     */
    public function setUser($var)
    {
        GPBUtil::checkMessage($var, \Douyin\User::class);
        $this->user = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool withColon = 2;</code>
     * @return bool
     */
    public function getWithColon()
    {
        return $this->withColon;
    }

    /**
     * Generated from protobuf field <code>bool withColon = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setWithColon($var)
    {
        GPBUtil::checkBool($var);
        $this->withColon = $var;

        return $this;
    }

}

