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

namespace Zaly\Proto\Site;

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

/**
 * Generated from protobuf message <code>site.ApiUserUpdateValue</code>
 */
class ApiUserUpdateValue extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.site.ApiUserUpdateType type = 1;</code>
     */
    private $type = 0;
    protected $fields;

    public function __construct() {
        \GPBMetadata\Site\ApiUserUpdate::initOnce();
        parent::__construct();
    }

    /**
     * Generated from protobuf field <code>.site.ApiUserUpdateType type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Generated from protobuf field <code>.site.ApiUserUpdateType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Zaly\Proto\Site\ApiUserUpdateType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string avatar = 2;</code>
     * @return string
     */
    public function getAvatar()
    {
        return $this->readOneof(2);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string nickname = 3;</code>
     * @return string
     */
    public function getNickname()
    {
        return $this->readOneof(3);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.core.CustomUserProfile custom = 4;</code>
     * @return \Zaly\Proto\Core\CustomUserProfile
     */
    public function getCustom()
    {
        return $this->readOneof(4);
    }

    /**
     * Generated from protobuf field <code>.core.CustomUserProfile custom = 4;</code>
     * @param \Zaly\Proto\Core\CustomUserProfile $var
     * @return $this
     */
    public function setCustom($var)
    {
        GPBUtil::checkMessage($var, \Zaly\Proto\Core\CustomUserProfile::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

