<?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.OrderMessage</code>
 */
class OrderMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string orderId = 1;</code>
     */
    protected $orderId = null;
    /**
     * Generated from protobuf field <code>optional bytes thumbnail = 2;</code>
     */
    protected $thumbnail = null;
    /**
     * Generated from protobuf field <code>optional int32 itemCount = 3;</code>
     */
    protected $itemCount = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderStatus status = 4;</code>
     */
    protected $status = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderSurface surface = 5;</code>
     */
    protected $surface = null;
    /**
     * Generated from protobuf field <code>optional string message = 6;</code>
     */
    protected $message = null;
    /**
     * Generated from protobuf field <code>optional string orderTitle = 7;</code>
     */
    protected $orderTitle = null;
    /**
     * Generated from protobuf field <code>optional string sellerJid = 8;</code>
     */
    protected $sellerJid = null;
    /**
     * Generated from protobuf field <code>optional string token = 9;</code>
     */
    protected $token = null;
    /**
     * Generated from protobuf field <code>optional int64 totalAmount1000 = 10;</code>
     */
    protected $totalAmount1000 = null;
    /**
     * Generated from protobuf field <code>optional string totalCurrencyCode = 11;</code>
     */
    protected $totalCurrencyCode = null;
    /**
     * Generated from protobuf field <code>optional .proto.ContextInfo contextInfo = 17;</code>
     */
    protected $contextInfo = null;
    /**
     * Generated from protobuf field <code>optional int32 messageVersion = 12;</code>
     */
    protected $messageVersion = null;
    /**
     * Generated from protobuf field <code>optional .proto.MessageKey orderRequestMessageId = 13;</code>
     */
    protected $orderRequestMessageId = null;
    /**
     * Generated from protobuf field <code>optional string catalogType = 15;</code>
     */
    protected $catalogType = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $orderId
     *     @type string $thumbnail
     *     @type int $itemCount
     *     @type int $status
     *     @type int $surface
     *     @type string $message
     *     @type string $orderTitle
     *     @type string $sellerJid
     *     @type string $token
     *     @type int|string $totalAmount1000
     *     @type string $totalCurrencyCode
     *     @type \PhpWA\Protocol\Proto\ContextInfo $contextInfo
     *     @type int $messageVersion
     *     @type \PhpWA\Protocol\Proto\MessageKey $orderRequestMessageId
     *     @type string $catalogType
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasOrderId()
    {
        return isset($this->orderId);
    }

    public function clearOrderId()
    {
        unset($this->orderId);
    }

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

        return $this;
    }

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

    public function hasThumbnail()
    {
        return isset($this->thumbnail);
    }

    public function clearThumbnail()
    {
        unset($this->thumbnail);
    }

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

        return $this;
    }

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

    public function hasItemCount()
    {
        return isset($this->itemCount);
    }

    public function clearItemCount()
    {
        unset($this->itemCount);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderStatus status = 4;</code>
     * @return int
     */
    public function getStatus()
    {
        return isset($this->status) ? $this->status : 0;
    }

    public function hasStatus()
    {
        return isset($this->status);
    }

    public function clearStatus()
    {
        unset($this->status);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderStatus status = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\OrderMessage\OrderStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderSurface surface = 5;</code>
     * @return int
     */
    public function getSurface()
    {
        return isset($this->surface) ? $this->surface : 0;
    }

    public function hasSurface()
    {
        return isset($this->surface);
    }

    public function clearSurface()
    {
        unset($this->surface);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.OrderMessage.OrderSurface surface = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setSurface($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\OrderMessage\OrderSurface::class);
        $this->surface = $var;

        return $this;
    }

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

    public function hasMessage()
    {
        return isset($this->message);
    }

    public function clearMessage()
    {
        unset($this->message);
    }

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

        return $this;
    }

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

    public function hasOrderTitle()
    {
        return isset($this->orderTitle);
    }

    public function clearOrderTitle()
    {
        unset($this->orderTitle);
    }

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

        return $this;
    }

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

    public function hasSellerJid()
    {
        return isset($this->sellerJid);
    }

    public function clearSellerJid()
    {
        unset($this->sellerJid);
    }

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

        return $this;
    }

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

    public function hasToken()
    {
        return isset($this->token);
    }

    public function clearToken()
    {
        unset($this->token);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 totalAmount1000 = 10;</code>
     * @return int|string
     */
    public function getTotalAmount1000()
    {
        return isset($this->totalAmount1000) ? $this->totalAmount1000 : 0;
    }

    public function hasTotalAmount1000()
    {
        return isset($this->totalAmount1000);
    }

    public function clearTotalAmount1000()
    {
        unset($this->totalAmount1000);
    }

    /**
     * Generated from protobuf field <code>optional int64 totalAmount1000 = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTotalAmount1000($var)
    {
        GPBUtil::checkInt64($var);
        $this->totalAmount1000 = $var;

        return $this;
    }

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

    public function hasTotalCurrencyCode()
    {
        return isset($this->totalCurrencyCode);
    }

    public function clearTotalCurrencyCode()
    {
        unset($this->totalCurrencyCode);
    }

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

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

    public function hasMessageVersion()
    {
        return isset($this->messageVersion);
    }

    public function clearMessageVersion()
    {
        unset($this->messageVersion);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageKey orderRequestMessageId = 13;</code>
     * @return \PhpWA\Protocol\Proto\MessageKey|null
     */
    public function getOrderRequestMessageId()
    {
        return $this->orderRequestMessageId;
    }

    public function hasOrderRequestMessageId()
    {
        return isset($this->orderRequestMessageId);
    }

    public function clearOrderRequestMessageId()
    {
        unset($this->orderRequestMessageId);
    }

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

        return $this;
    }

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

    public function hasCatalogType()
    {
        return isset($this->catalogType);
    }

    public function clearCatalogType()
    {
        unset($this->catalogType);
    }

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

        return $this;
    }

}

