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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.ContactsArrayMessage</code>
 */
class ContactsArrayMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string displayName = 1;</code>
     */
    protected $displayName = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.ContactMessage contacts = 2;</code>
     */
    private $contacts;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     */
    protected $contextInfo = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $displayName
     *     @type \PhpWA\Protocol\Proto\Message\ContactMessage[] $contacts
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasDisplayName()
    {
        return isset($this->displayName);
    }

    public function clearDisplayName()
    {
        unset($this->displayName);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.ContactMessage contacts = 2;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\ContactMessage>
     */
    public function getContacts()
    {
        return $this->contacts;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     * @return \PhpWA\Protocol\Proto\ContextInfo|null
     */
    public function getContextInfo()
    {
        return $this->contextInfo;
    }

    public function hasContextInfo()
    {
        return isset($this->contextInfo);
    }

    public function clearContextInfo()
    {
        unset($this->contextInfo);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     * @param \PhpWA\Protocol\Proto\ContextInfo $var
     * @return $this
     */
    public function setContextInfo($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ContextInfo::class);
        $this->contextInfo = $var;

        return $this;
    }

}

