<?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.Money</code>
 */
class Money extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional int64 value = 1;</code>
     */
    protected $value = null;
    /**
     * Generated from protobuf field <code>optional uint32 offset = 2;</code>
     */
    protected $offset = null;
    /**
     * Generated from protobuf field <code>optional string currencyCode = 3;</code>
     */
    protected $currencyCode = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $value
     *     @type int $offset
     *     @type string $currencyCode
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasValue()
    {
        return isset($this->value);
    }

    public function clearValue()
    {
        unset($this->value);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 offset = 2;</code>
     * @return int
     */
    public function getOffset()
    {
        return isset($this->offset) ? $this->offset : 0;
    }

    public function hasOffset()
    {
        return isset($this->offset);
    }

    public function clearOffset()
    {
        unset($this->offset);
    }

    /**
     * Generated from protobuf field <code>optional uint32 offset = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setOffset($var)
    {
        GPBUtil::checkUint32($var);
        $this->offset = $var;

        return $this;
    }

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

    public function hasCurrencyCode()
    {
        return isset($this->currencyCode);
    }

    public function clearCurrencyCode()
    {
        unset($this->currencyCode);
    }

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

        return $this;
    }

}

