<?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.ContactMessage</code>
 */
class ContactMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string displayName = 1;</code>
     */
    protected $displayName = null;
    /**
     * Generated from protobuf field <code>optional string vcard = 16;</code>
     */
    protected $vcard = null;
    /**
     * 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 string $vcard
     *     @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>optional string vcard = 16;</code>
     * @return string
     */
    public function getVcard()
    {
        return isset($this->vcard) ? $this->vcard : '';
    }

    public function hasVcard()
    {
        return isset($this->vcard);
    }

    public function clearVcard()
    {
        unset($this->vcard);
    }

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

        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;
    }

}

