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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.BotLinkedAccountsMetadata</code>
 */
class BotLinkedAccountsMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .proto.BotLinkedAccount accounts = 1;</code>
     */
    private $accounts;
    /**
     * Generated from protobuf field <code>optional bytes acAuthTokens = 2;</code>
     */
    protected $acAuthTokens = null;
    /**
     * Generated from protobuf field <code>optional int32 acErrorCode = 3;</code>
     */
    protected $acErrorCode = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\BotLinkedAccount[] $accounts
     *     @type string $acAuthTokens
     *     @type int $acErrorCode
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .proto.BotLinkedAccount accounts = 1;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\BotLinkedAccount>
     */
    public function getAccounts()
    {
        return $this->accounts;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.BotLinkedAccount accounts = 1;</code>
     * @param \PhpWA\Protocol\Proto\BotLinkedAccount[] $var
     * @return $this
     */
    public function setAccounts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\BotLinkedAccount::class);
        $this->accounts = $arr;

        return $this;
    }

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

    public function hasAcAuthTokens()
    {
        return isset($this->acAuthTokens);
    }

    public function clearAcAuthTokens()
    {
        unset($this->acAuthTokens);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int32 acErrorCode = 3;</code>
     * @return int
     */
    public function getAcErrorCode()
    {
        return isset($this->acErrorCode) ? $this->acErrorCode : 0;
    }

    public function hasAcErrorCode()
    {
        return isset($this->acErrorCode);
    }

    public function clearAcErrorCode()
    {
        unset($this->acErrorCode);
    }

    /**
     * Generated from protobuf field <code>optional int32 acErrorCode = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setAcErrorCode($var)
    {
        GPBUtil::checkInt32($var);
        $this->acErrorCode = $var;

        return $this;
    }

}

