<?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.ProductMessage</code>
 */
class ProductMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.ProductMessage.ProductSnapshot product = 1;</code>
     */
    protected $product = null;
    /**
     * Generated from protobuf field <code>optional string businessOwnerJid = 2;</code>
     */
    protected $businessOwnerJid = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.ProductMessage.CatalogSnapshot catalog = 4;</code>
     */
    protected $catalog = null;
    /**
     * Generated from protobuf field <code>optional string body = 5;</code>
     */
    protected $body = null;
    /**
     * Generated from protobuf field <code>optional string footer = 6;</code>
     */
    protected $footer = 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 \PhpWA\Protocol\Proto\Message\ProductMessage\ProductSnapshot $product
     *     @type string $businessOwnerJid
     *     @type \PhpWA\Protocol\Proto\Message\ProductMessage\CatalogSnapshot $catalog
     *     @type string $body
     *     @type string $footer
     *     @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 .proto.Message.ProductMessage.ProductSnapshot product = 1;</code>
     * @return \PhpWA\Protocol\Proto\Message\ProductMessage\ProductSnapshot|null
     */
    public function getProduct()
    {
        return $this->product;
    }

    public function hasProduct()
    {
        return isset($this->product);
    }

    public function clearProduct()
    {
        unset($this->product);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ProductMessage.ProductSnapshot product = 1;</code>
     * @param \PhpWA\Protocol\Proto\Message\ProductMessage\ProductSnapshot $var
     * @return $this
     */
    public function setProduct($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ProductMessage\ProductSnapshot::class);
        $this->product = $var;

        return $this;
    }

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

    public function hasBusinessOwnerJid()
    {
        return isset($this->businessOwnerJid);
    }

    public function clearBusinessOwnerJid()
    {
        unset($this->businessOwnerJid);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ProductMessage.CatalogSnapshot catalog = 4;</code>
     * @return \PhpWA\Protocol\Proto\Message\ProductMessage\CatalogSnapshot|null
     */
    public function getCatalog()
    {
        return $this->catalog;
    }

    public function hasCatalog()
    {
        return isset($this->catalog);
    }

    public function clearCatalog()
    {
        unset($this->catalog);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.ProductMessage.CatalogSnapshot catalog = 4;</code>
     * @param \PhpWA\Protocol\Proto\Message\ProductMessage\CatalogSnapshot $var
     * @return $this
     */
    public function setCatalog($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\ProductMessage\CatalogSnapshot::class);
        $this->catalog = $var;

        return $this;
    }

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

    public function hasBody()
    {
        return isset($this->body);
    }

    public function clearBody()
    {
        unset($this->body);
    }

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

        return $this;
    }

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

    public function hasFooter()
    {
        return isset($this->footer);
    }

    public function clearFooter()
    {
        unset($this->footer);
    }

    /**
     * Generated from protobuf field <code>optional string footer = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setFooter($var)
    {
        GPBUtil::checkString($var, True);
        $this->footer = $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;
    }

}

