<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/retail/v2/common.proto

namespace Google\Cloud\Retail\V2\PriceInfo;

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

/**
 * The price range of all
 * [variant][google.cloud.retail.v2.Product.Type.VARIANT]
 * [Product][google.cloud.retail.v2.Product] having the same
 * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.PriceInfo.PriceRange</code>
 */
class PriceRange extends \Google\Protobuf\Internal\Message
{
    /**
     * The inclusive
     * [Product.pricing_info.price][google.cloud.retail.v2.PriceInfo.price]
     * interval of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval price = 1;</code>
     */
    private $price = null;
    /**
     * The inclusive
     * [Product.pricing_info.original_price][google.cloud.retail.v2.PriceInfo.original_price]
     * internal of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval original_price = 2;</code>
     */
    private $original_price = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Retail\V2\Interval $price
     *           The inclusive
     *           [Product.pricing_info.price][google.cloud.retail.v2.PriceInfo.price]
     *           interval of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     *           [Product][google.cloud.retail.v2.Product] having the same
     *           [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *     @type \Google\Cloud\Retail\V2\Interval $original_price
     *           The inclusive
     *           [Product.pricing_info.original_price][google.cloud.retail.v2.PriceInfo.original_price]
     *           internal of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     *           [Product][google.cloud.retail.v2.Product] having the same
     *           [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * The inclusive
     * [Product.pricing_info.price][google.cloud.retail.v2.PriceInfo.price]
     * interval of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval price = 1;</code>
     * @return \Google\Cloud\Retail\V2\Interval|null
     */
    public function getPrice()
    {
        return $this->price;
    }

    public function hasPrice()
    {
        return isset($this->price);
    }

    public function clearPrice()
    {
        unset($this->price);
    }

    /**
     * The inclusive
     * [Product.pricing_info.price][google.cloud.retail.v2.PriceInfo.price]
     * interval of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval price = 1;</code>
     * @param \Google\Cloud\Retail\V2\Interval $var
     * @return $this
     */
    public function setPrice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\Interval::class);
        $this->price = $var;

        return $this;
    }

    /**
     * The inclusive
     * [Product.pricing_info.original_price][google.cloud.retail.v2.PriceInfo.original_price]
     * internal of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval original_price = 2;</code>
     * @return \Google\Cloud\Retail\V2\Interval|null
     */
    public function getOriginalPrice()
    {
        return $this->original_price;
    }

    public function hasOriginalPrice()
    {
        return isset($this->original_price);
    }

    public function clearOriginalPrice()
    {
        unset($this->original_price);
    }

    /**
     * The inclusive
     * [Product.pricing_info.original_price][google.cloud.retail.v2.PriceInfo.original_price]
     * internal of all [variant][google.cloud.retail.v2.Product.Type.VARIANT]
     * [Product][google.cloud.retail.v2.Product] having the same
     * [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id].
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.Interval original_price = 2;</code>
     * @param \Google\Cloud\Retail\V2\Interval $var
     * @return $this
     */
    public function setOriginalPrice($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\Interval::class);
        $this->original_price = $var;

        return $this;
    }

}


