<?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 Shipping of the product.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1beta.Shipping</code>
 */
class Shipping extends \Google\Protobuf\Internal\Message
{
    /**
     * Fixed shipping price, represented as a number.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price price = 1;</code>
     */
    protected $price = null;
    /**
     * The [CLDR territory
     * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     * of the country to which an item will ship.
     *
     * Generated from protobuf field <code>string country = 2;</code>
     */
    protected $country = '';
    /**
     * The geographic region to which a shipping rate applies.
     * See [region](https://support.google.com/merchants/answer/6324484) for more
     * information.
     *
     * Generated from protobuf field <code>string region = 3;</code>
     */
    protected $region = '';
    /**
     * A free-form description of the service class or delivery speed.
     *
     * Generated from protobuf field <code>string service = 4;</code>
     */
    protected $service = '';
    /**
     * The numeric ID of a location that the shipping rate applies to as
     * defined in the [AdWords
     * API](https://developers.google.com/adwords/api/docs/appendix/geotargeting).
     *
     * Generated from protobuf field <code>int64 location_id = 5;</code>
     */
    protected $location_id = 0;
    /**
     * The location where the shipping is applicable, represented by a
     * location group name.
     *
     * Generated from protobuf field <code>string location_group_name = 6;</code>
     */
    protected $location_group_name = '';
    /**
     * The postal code range that the shipping rate applies to, represented by
     * a postal code, a postal code prefix followed by a * wildcard, a range
     * between two postal codes or two postal code prefixes of equal length.
     *
     * Generated from protobuf field <code>string postal_code = 7;</code>
     */
    protected $postal_code = '';
    /**
     * Minimum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * can only be present together with
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time];
     * but it is not required if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_handling_time = 8;</code>
     */
    protected $min_handling_time = null;
    /**
     * Maximum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * is optional if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_handling_time = 9;</code>
     */
    protected $max_handling_time = null;
    /**
     * Minimum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * can only be present together with
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time];
     * but it is not required if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_transit_time = 10;</code>
     */
    protected $min_transit_time = null;
    /**
     * Maximum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * is optional if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_transit_time = 11;</code>
     */
    protected $max_transit_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Shopping\Type\Price $price
     *           Fixed shipping price, represented as a number.
     *     @type string $country
     *           The [CLDR territory
     *           code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     *           of the country to which an item will ship.
     *     @type string $region
     *           The geographic region to which a shipping rate applies.
     *           See [region](https://support.google.com/merchants/answer/6324484) for more
     *           information.
     *     @type string $service
     *           A free-form description of the service class or delivery speed.
     *     @type int|string $location_id
     *           The numeric ID of a location that the shipping rate applies to as
     *           defined in the [AdWords
     *           API](https://developers.google.com/adwords/api/docs/appendix/geotargeting).
     *     @type string $location_group_name
     *           The location where the shipping is applicable, represented by a
     *           location group name.
     *     @type string $postal_code
     *           The postal code range that the shipping rate applies to, represented by
     *           a postal code, a postal code prefix followed by a * wildcard, a range
     *           between two postal codes or two postal code prefixes of equal length.
     *     @type int|string $min_handling_time
     *           Minimum handling time (inclusive) between when the order is received and
     *           shipped in business days. 0 means that the order is shipped on the same
     *           day as it is received if it happens before the cut-off time.
     *           [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     *           can only be present together with
     *           [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time];
     *           but it is not required if
     *           [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     *           is present.
     *     @type int|string $max_handling_time
     *           Maximum handling time (inclusive) between when the order is received and
     *           shipped in business days. 0 means that the order is shipped on the same
     *           day as it is received if it happens before the cut-off time. Both
     *           [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     *           and
     *           [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     *           are required if providing shipping speeds.
     *           [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     *           is optional if
     *           [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     *           is present.
     *     @type int|string $min_transit_time
     *           Minimum transit time (inclusive) between when the order has shipped and
     *           when it is delivered in business days. 0 means that the order is
     *           delivered on the same day as it ships.
     *           [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     *           can only be present together with
     *           [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time];
     *           but it is not required if
     *           [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     *           is present.
     *     @type int|string $max_transit_time
     *           Maximum transit time (inclusive) between when the order has shipped and
     *           when it is delivered in business days. 0 means that the order is
     *           delivered on the same day as it ships. Both
     *           [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     *           and
     *           [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     *           are required if providing shipping speeds.
     *           [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     *           is optional if
     *           [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     *           is present.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1Beta\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * Fixed shipping price, represented as a number.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price price = 1;</code>
     * @return \Google\Shopping\Type\Price|null
     */
    public function getPrice()
    {
        return $this->price;
    }

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

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

    /**
     * Fixed shipping price, represented as a number.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price price = 1;</code>
     * @param \Google\Shopping\Type\Price $var
     * @return $this
     */
    public function setPrice($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Type\Price::class);
        $this->price = $var;

        return $this;
    }

    /**
     * The [CLDR territory
     * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     * of the country to which an item will ship.
     *
     * Generated from protobuf field <code>string country = 2;</code>
     * @return string
     */
    public function getCountry()
    {
        return $this->country;
    }

    /**
     * The [CLDR territory
     * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     * of the country to which an item will ship.
     *
     * Generated from protobuf field <code>string country = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCountry($var)
    {
        GPBUtil::checkString($var, True);
        $this->country = $var;

        return $this;
    }

    /**
     * The geographic region to which a shipping rate applies.
     * See [region](https://support.google.com/merchants/answer/6324484) for more
     * information.
     *
     * Generated from protobuf field <code>string region = 3;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * The geographic region to which a shipping rate applies.
     * See [region](https://support.google.com/merchants/answer/6324484) for more
     * information.
     *
     * Generated from protobuf field <code>string region = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * A free-form description of the service class or delivery speed.
     *
     * Generated from protobuf field <code>string service = 4;</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * A free-form description of the service class or delivery speed.
     *
     * Generated from protobuf field <code>string service = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

    /**
     * The numeric ID of a location that the shipping rate applies to as
     * defined in the [AdWords
     * API](https://developers.google.com/adwords/api/docs/appendix/geotargeting).
     *
     * Generated from protobuf field <code>int64 location_id = 5;</code>
     * @return int|string
     */
    public function getLocationId()
    {
        return $this->location_id;
    }

    /**
     * The numeric ID of a location that the shipping rate applies to as
     * defined in the [AdWords
     * API](https://developers.google.com/adwords/api/docs/appendix/geotargeting).
     *
     * Generated from protobuf field <code>int64 location_id = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLocationId($var)
    {
        GPBUtil::checkInt64($var);
        $this->location_id = $var;

        return $this;
    }

    /**
     * The location where the shipping is applicable, represented by a
     * location group name.
     *
     * Generated from protobuf field <code>string location_group_name = 6;</code>
     * @return string
     */
    public function getLocationGroupName()
    {
        return $this->location_group_name;
    }

    /**
     * The location where the shipping is applicable, represented by a
     * location group name.
     *
     * Generated from protobuf field <code>string location_group_name = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setLocationGroupName($var)
    {
        GPBUtil::checkString($var, True);
        $this->location_group_name = $var;

        return $this;
    }

    /**
     * The postal code range that the shipping rate applies to, represented by
     * a postal code, a postal code prefix followed by a * wildcard, a range
     * between two postal codes or two postal code prefixes of equal length.
     *
     * Generated from protobuf field <code>string postal_code = 7;</code>
     * @return string
     */
    public function getPostalCode()
    {
        return $this->postal_code;
    }

    /**
     * The postal code range that the shipping rate applies to, represented by
     * a postal code, a postal code prefix followed by a * wildcard, a range
     * between two postal codes or two postal code prefixes of equal length.
     *
     * Generated from protobuf field <code>string postal_code = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setPostalCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->postal_code = $var;

        return $this;
    }

    /**
     * Minimum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * can only be present together with
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time];
     * but it is not required if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_handling_time = 8;</code>
     * @return int|string
     */
    public function getMinHandlingTime()
    {
        return isset($this->min_handling_time) ? $this->min_handling_time : 0;
    }

    public function hasMinHandlingTime()
    {
        return isset($this->min_handling_time);
    }

    public function clearMinHandlingTime()
    {
        unset($this->min_handling_time);
    }

    /**
     * Minimum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * can only be present together with
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time];
     * but it is not required if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_handling_time = 8;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMinHandlingTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->min_handling_time = $var;

        return $this;
    }

    /**
     * Maximum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * is optional if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_handling_time = 9;</code>
     * @return int|string
     */
    public function getMaxHandlingTime()
    {
        return isset($this->max_handling_time) ? $this->max_handling_time : 0;
    }

    public function hasMaxHandlingTime()
    {
        return isset($this->max_handling_time);
    }

    public function clearMaxHandlingTime()
    {
        unset($this->max_handling_time);
    }

    /**
     * Maximum handling time (inclusive) between when the order is received and
     * shipped in business days. 0 means that the order is shipped on the same
     * day as it is received if it happens before the cut-off time. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minHandlingTime][google.shopping.merchant.products.v1beta.Shipping.min_handling_time]
     * is optional if
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_handling_time = 9;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxHandlingTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_handling_time = $var;

        return $this;
    }

    /**
     * Minimum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * can only be present together with
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time];
     * but it is not required if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_transit_time = 10;</code>
     * @return int|string
     */
    public function getMinTransitTime()
    {
        return isset($this->min_transit_time) ? $this->min_transit_time : 0;
    }

    public function hasMinTransitTime()
    {
        return isset($this->min_transit_time);
    }

    public function clearMinTransitTime()
    {
        unset($this->min_transit_time);
    }

    /**
     * Minimum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * can only be present together with
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time];
     * but it is not required if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 min_transit_time = 10;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMinTransitTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->min_transit_time = $var;

        return $this;
    }

    /**
     * Maximum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * is optional if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_transit_time = 11;</code>
     * @return int|string
     */
    public function getMaxTransitTime()
    {
        return isset($this->max_transit_time) ? $this->max_transit_time : 0;
    }

    public function hasMaxTransitTime()
    {
        return isset($this->max_transit_time);
    }

    public function clearMaxTransitTime()
    {
        unset($this->max_transit_time);
    }

    /**
     * Maximum transit time (inclusive) between when the order has shipped and
     * when it is delivered in business days. 0 means that the order is
     * delivered on the same day as it ships. Both
     * [maxHandlingTime][google.shopping.merchant.products.v1beta.Shipping.max_handling_time]
     * and
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * are required if providing shipping speeds.
     * [minTransitTime][google.shopping.merchant.products.v1beta.Shipping.min_transit_time]
     * is optional if
     * [maxTransitTime][google.shopping.merchant.products.v1beta.Shipping.max_transit_time]
     * is present.
     *
     * Generated from protobuf field <code>optional int64 max_transit_time = 11;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxTransitTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_transit_time = $var;

        return $this;
    }

}

