<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/products/v1beta/products_common.proto

namespace Google\Shopping\Merchant\Products\V1beta;

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

/**
 * The UnitPricingBaseMeasure of the product.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1beta.UnitPricingBaseMeasure</code>
 */
class UnitPricingBaseMeasure extends \Google\Protobuf\Internal\Message
{
    /**
     * The denominator of the unit price.
     *
     * Generated from protobuf field <code>int64 value = 1;</code>
     */
    protected $value = 0;
    /**
     * The unit of the denominator.
     *
     * Generated from protobuf field <code>string unit = 2;</code>
     */
    protected $unit = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $value
     *           The denominator of the unit price.
     *     @type string $unit
     *           The unit of the denominator.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1Beta\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * The denominator of the unit price.
     *
     * Generated from protobuf field <code>int64 value = 1;</code>
     * @return int|string
     */
    public function getValue()
    {
        return $this->value;
    }

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

        return $this;
    }

    /**
     * The unit of the denominator.
     *
     * Generated from protobuf field <code>string unit = 2;</code>
     * @return string
     */
    public function getUnit()
    {
        return $this->unit;
    }

    /**
     * The unit of the denominator.
     *
     * Generated from protobuf field <code>string unit = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUnit($var)
    {
        GPBUtil::checkString($var, True);
        $this->unit = $var;

        return $this;
    }

}

