<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: site/api_friend_list.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.ApiFriendListResponse</code>
 */
class ApiFriendListResponse extends \Google\Protobuf\Internal\Message
{
    /**
     *user friend list
     *
     * Generated from protobuf field <code>repeated .core.FriendUserProfile friends = 1;</code>
     */
    private $friends;
    /**
     *total count of user's friends
     *
     * Generated from protobuf field <code>int32 totalCount = 2;</code>
     */
    private $totalCount = 0;

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

    /**
     *user friend list
     *
     * Generated from protobuf field <code>repeated .core.FriendUserProfile friends = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFriends()
    {
        return $this->friends;
    }

    /**
     *user friend list
     *
     * Generated from protobuf field <code>repeated .core.FriendUserProfile friends = 1;</code>
     * @param \Zaly\Proto\Core\FriendUserProfile[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFriends($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Zaly\Proto\Core\FriendUserProfile::class);
        $this->friends = $arr;

        return $this;
    }

    /**
     *total count of user's friends
     *
     * Generated from protobuf field <code>int32 totalCount = 2;</code>
     * @return int
     */
    public function getTotalCount()
    {
        return $this->totalCount;
    }

    /**
     *total count of user's friends
     *
     * Generated from protobuf field <code>int32 totalCount = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->totalCount = $var;

        return $this;
    }

}

