<?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;

/**
 * Product property for the Cloud Retail API.
 * For example, properties for a TV product could be "Screen-Resolution" or
 * "Screen-Size".
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1beta.CloudExportAdditionalProperties</code>
 */
class CloudExportAdditionalProperties extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the given property. For example,
     * "Screen-Resolution" for a TV product. Maximum string size is 256
     * characters.
     *
     * Generated from protobuf field <code>optional string property_name = 1;</code>
     */
    protected $property_name = null;
    /**
     * Text value of the given property. For example,
     * "8K(UHD)" could be a text value for a TV product. Maximum
     * repeatedness of this value is 400. Values are stored in an arbitrary but
     * consistent order. Maximum string size is 256 characters.
     *
     * Generated from protobuf field <code>repeated string text_value = 2;</code>
     */
    private $text_value;
    /**
     * Boolean value of the given property. For example for a TV product,
     * "True" or "False" if the screen is UHD.
     *
     * Generated from protobuf field <code>optional bool bool_value = 3;</code>
     */
    protected $bool_value = null;
    /**
     * Integer values of the given property. For example, 1080 for a TV
     * product's Screen Resolution. Maximum repeatedness of this value
     * is 400. Values are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated int64 int_value = 4;</code>
     */
    private $int_value;
    /**
     * Float values of the given property. For example for a TV product
     * 1.2345. Maximum repeatedness of this value is 400. Values
     * are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated float float_value = 5;</code>
     */
    private $float_value;
    /**
     * Minimum float value of the given property. For example for a TV
     * product 1.00.
     *
     * Generated from protobuf field <code>optional float min_value = 6;</code>
     */
    protected $min_value = null;
    /**
     * Maximum float value of the given property. For example for a TV
     * product 100.00.
     *
     * Generated from protobuf field <code>optional float max_value = 7;</code>
     */
    protected $max_value = null;
    /**
     * Unit of the given property. For example, "Pixels" for a TV product. Maximum
     * string size is 256B.
     *
     * Generated from protobuf field <code>optional string unit_code = 8;</code>
     */
    protected $unit_code = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $property_name
     *           Name of the given property. For example,
     *           "Screen-Resolution" for a TV product. Maximum string size is 256
     *           characters.
     *     @type string[] $text_value
     *           Text value of the given property. For example,
     *           "8K(UHD)" could be a text value for a TV product. Maximum
     *           repeatedness of this value is 400. Values are stored in an arbitrary but
     *           consistent order. Maximum string size is 256 characters.
     *     @type bool $bool_value
     *           Boolean value of the given property. For example for a TV product,
     *           "True" or "False" if the screen is UHD.
     *     @type int[]|string[] $int_value
     *           Integer values of the given property. For example, 1080 for a TV
     *           product's Screen Resolution. Maximum repeatedness of this value
     *           is 400. Values are stored in an arbitrary but consistent order.
     *     @type float[] $float_value
     *           Float values of the given property. For example for a TV product
     *           1.2345. Maximum repeatedness of this value is 400. Values
     *           are stored in an arbitrary but consistent order.
     *     @type float $min_value
     *           Minimum float value of the given property. For example for a TV
     *           product 1.00.
     *     @type float $max_value
     *           Maximum float value of the given property. For example for a TV
     *           product 100.00.
     *     @type string $unit_code
     *           Unit of the given property. For example, "Pixels" for a TV product. Maximum
     *           string size is 256B.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1Beta\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the given property. For example,
     * "Screen-Resolution" for a TV product. Maximum string size is 256
     * characters.
     *
     * Generated from protobuf field <code>optional string property_name = 1;</code>
     * @return string
     */
    public function getPropertyName()
    {
        return isset($this->property_name) ? $this->property_name : '';
    }

    public function hasPropertyName()
    {
        return isset($this->property_name);
    }

    public function clearPropertyName()
    {
        unset($this->property_name);
    }

    /**
     * Name of the given property. For example,
     * "Screen-Resolution" for a TV product. Maximum string size is 256
     * characters.
     *
     * Generated from protobuf field <code>optional string property_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPropertyName($var)
    {
        GPBUtil::checkString($var, True);
        $this->property_name = $var;

        return $this;
    }

    /**
     * Text value of the given property. For example,
     * "8K(UHD)" could be a text value for a TV product. Maximum
     * repeatedness of this value is 400. Values are stored in an arbitrary but
     * consistent order. Maximum string size is 256 characters.
     *
     * Generated from protobuf field <code>repeated string text_value = 2;</code>
     * @return RepeatedField<string>
     */
    public function getTextValue()
    {
        return $this->text_value;
    }

    /**
     * Text value of the given property. For example,
     * "8K(UHD)" could be a text value for a TV product. Maximum
     * repeatedness of this value is 400. Values are stored in an arbitrary but
     * consistent order. Maximum string size is 256 characters.
     *
     * Generated from protobuf field <code>repeated string text_value = 2;</code>
     * @param string[] $var
     * @return $this
     */
    public function setTextValue($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->text_value = $arr;

        return $this;
    }

    /**
     * Boolean value of the given property. For example for a TV product,
     * "True" or "False" if the screen is UHD.
     *
     * Generated from protobuf field <code>optional bool bool_value = 3;</code>
     * @return bool
     */
    public function getBoolValue()
    {
        return isset($this->bool_value) ? $this->bool_value : false;
    }

    public function hasBoolValue()
    {
        return isset($this->bool_value);
    }

    public function clearBoolValue()
    {
        unset($this->bool_value);
    }

    /**
     * Boolean value of the given property. For example for a TV product,
     * "True" or "False" if the screen is UHD.
     *
     * Generated from protobuf field <code>optional bool bool_value = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setBoolValue($var)
    {
        GPBUtil::checkBool($var);
        $this->bool_value = $var;

        return $this;
    }

    /**
     * Integer values of the given property. For example, 1080 for a TV
     * product's Screen Resolution. Maximum repeatedness of this value
     * is 400. Values are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated int64 int_value = 4;</code>
     * @return RepeatedField<int>|RepeatedField<string>
     */
    public function getIntValue()
    {
        return $this->int_value;
    }

    /**
     * Integer values of the given property. For example, 1080 for a TV
     * product's Screen Resolution. Maximum repeatedness of this value
     * is 400. Values are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated int64 int_value = 4;</code>
     * @param int[]|string[] $var
     * @return $this
     */
    public function setIntValue($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
        $this->int_value = $arr;

        return $this;
    }

    /**
     * Float values of the given property. For example for a TV product
     * 1.2345. Maximum repeatedness of this value is 400. Values
     * are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated float float_value = 5;</code>
     * @return RepeatedField<float>
     */
    public function getFloatValue()
    {
        return $this->float_value;
    }

    /**
     * Float values of the given property. For example for a TV product
     * 1.2345. Maximum repeatedness of this value is 400. Values
     * are stored in an arbitrary but consistent order.
     *
     * Generated from protobuf field <code>repeated float float_value = 5;</code>
     * @param float[] $var
     * @return $this
     */
    public function setFloatValue($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT);
        $this->float_value = $arr;

        return $this;
    }

    /**
     * Minimum float value of the given property. For example for a TV
     * product 1.00.
     *
     * Generated from protobuf field <code>optional float min_value = 6;</code>
     * @return float
     */
    public function getMinValue()
    {
        return isset($this->min_value) ? $this->min_value : 0.0;
    }

    public function hasMinValue()
    {
        return isset($this->min_value);
    }

    public function clearMinValue()
    {
        unset($this->min_value);
    }

    /**
     * Minimum float value of the given property. For example for a TV
     * product 1.00.
     *
     * Generated from protobuf field <code>optional float min_value = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setMinValue($var)
    {
        GPBUtil::checkFloat($var);
        $this->min_value = $var;

        return $this;
    }

    /**
     * Maximum float value of the given property. For example for a TV
     * product 100.00.
     *
     * Generated from protobuf field <code>optional float max_value = 7;</code>
     * @return float
     */
    public function getMaxValue()
    {
        return isset($this->max_value) ? $this->max_value : 0.0;
    }

    public function hasMaxValue()
    {
        return isset($this->max_value);
    }

    public function clearMaxValue()
    {
        unset($this->max_value);
    }

    /**
     * Maximum float value of the given property. For example for a TV
     * product 100.00.
     *
     * Generated from protobuf field <code>optional float max_value = 7;</code>
     * @param float $var
     * @return $this
     */
    public function setMaxValue($var)
    {
        GPBUtil::checkFloat($var);
        $this->max_value = $var;

        return $this;
    }

    /**
     * Unit of the given property. For example, "Pixels" for a TV product. Maximum
     * string size is 256B.
     *
     * Generated from protobuf field <code>optional string unit_code = 8;</code>
     * @return string
     */
    public function getUnitCode()
    {
        return isset($this->unit_code) ? $this->unit_code : '';
    }

    public function hasUnitCode()
    {
        return isset($this->unit_code);
    }

    public function clearUnitCode()
    {
        unset($this->unit_code);
    }

    /**
     * Unit of the given property. For example, "Pixels" for a TV product. Maximum
     * string size is 256B.
     *
     * Generated from protobuf field <code>optional string unit_code = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setUnitCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->unit_code = $var;

        return $this;
    }

}

