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

namespace Google\Shopping\Merchant\Products\V1;

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

/**
 * Configuration for offer or offer-country level shipping handling cutoff time.
 *
 * Generated from protobuf message <code>google.shopping.merchant.products.v1.HandlingCutoffTime</code>
 */
class HandlingCutoffTime extends \Google\Protobuf\Internal\Message
{
    /**
     * The [CLDR territory
     * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     * of the country to which the handling cutoff time applies.
     *
     * Generated from protobuf field <code>optional string country = 1;</code>
     */
    protected $country = null;
    /**
     * The handling cutoff time until which an order has to be placed to be
     * processed in the same day. This is a string in format of HHMM (e.g. `1530`)
     * for 3:30 PM.
     * If not configured, the cutoff time will be defaulted to 8AM PST.
     *
     * Generated from protobuf field <code>optional string cutoff_time = 2;</code>
     */
    protected $cutoff_time = null;
    /**
     * [Timezone
     * identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids)
     * For example 'Europe/Zurich'. If not set, the shipping destination
     * timezone will be used.
     *
     * Generated from protobuf field <code>optional string cutoff_timezone = 3;</code>
     */
    protected $cutoff_timezone = null;
    /**
     * This field only applies to same-day delivery. If true, prevents next-day
     * delivery from being shown for this offer after the cutoff time. This field
     * only applies to same-day delivery offers, for merchants who want to
     * explicitly disable it.
     *
     * Generated from protobuf field <code>optional bool disable_delivery_after_cutoff = 4;</code>
     */
    protected $disable_delivery_after_cutoff = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $country
     *           The [CLDR territory
     *           code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     *           of the country to which the handling cutoff time applies.
     *     @type string $cutoff_time
     *           The handling cutoff time until which an order has to be placed to be
     *           processed in the same day. This is a string in format of HHMM (e.g. `1530`)
     *           for 3:30 PM.
     *           If not configured, the cutoff time will be defaulted to 8AM PST.
     *     @type string $cutoff_timezone
     *           [Timezone
     *           identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids)
     *           For example 'Europe/Zurich'. If not set, the shipping destination
     *           timezone will be used.
     *     @type bool $disable_delivery_after_cutoff
     *           This field only applies to same-day delivery. If true, prevents next-day
     *           delivery from being shown for this offer after the cutoff time. This field
     *           only applies to same-day delivery offers, for merchants who want to
     *           explicitly disable it.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Products\V1\ProductsCommon::initOnce();
        parent::__construct($data);
    }

    /**
     * The [CLDR territory
     * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
     * of the country to which the handling cutoff time applies.
     *
     * Generated from protobuf field <code>optional string country = 1;</code>
     * @return string
     */
    public function getCountry()
    {
        return isset($this->country) ? $this->country : '';
    }

    public function hasCountry()
    {
        return isset($this->country);
    }

    public function clearCountry()
    {
        unset($this->country);
    }

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

        return $this;
    }

    /**
     * The handling cutoff time until which an order has to be placed to be
     * processed in the same day. This is a string in format of HHMM (e.g. `1530`)
     * for 3:30 PM.
     * If not configured, the cutoff time will be defaulted to 8AM PST.
     *
     * Generated from protobuf field <code>optional string cutoff_time = 2;</code>
     * @return string
     */
    public function getCutoffTime()
    {
        return isset($this->cutoff_time) ? $this->cutoff_time : '';
    }

    public function hasCutoffTime()
    {
        return isset($this->cutoff_time);
    }

    public function clearCutoffTime()
    {
        unset($this->cutoff_time);
    }

    /**
     * The handling cutoff time until which an order has to be placed to be
     * processed in the same day. This is a string in format of HHMM (e.g. `1530`)
     * for 3:30 PM.
     * If not configured, the cutoff time will be defaulted to 8AM PST.
     *
     * Generated from protobuf field <code>optional string cutoff_time = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCutoffTime($var)
    {
        GPBUtil::checkString($var, True);
        $this->cutoff_time = $var;

        return $this;
    }

    /**
     * [Timezone
     * identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids)
     * For example 'Europe/Zurich'. If not set, the shipping destination
     * timezone will be used.
     *
     * Generated from protobuf field <code>optional string cutoff_timezone = 3;</code>
     * @return string
     */
    public function getCutoffTimezone()
    {
        return isset($this->cutoff_timezone) ? $this->cutoff_timezone : '';
    }

    public function hasCutoffTimezone()
    {
        return isset($this->cutoff_timezone);
    }

    public function clearCutoffTimezone()
    {
        unset($this->cutoff_timezone);
    }

    /**
     * [Timezone
     * identifier](https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids)
     * For example 'Europe/Zurich'. If not set, the shipping destination
     * timezone will be used.
     *
     * Generated from protobuf field <code>optional string cutoff_timezone = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setCutoffTimezone($var)
    {
        GPBUtil::checkString($var, True);
        $this->cutoff_timezone = $var;

        return $this;
    }

    /**
     * This field only applies to same-day delivery. If true, prevents next-day
     * delivery from being shown for this offer after the cutoff time. This field
     * only applies to same-day delivery offers, for merchants who want to
     * explicitly disable it.
     *
     * Generated from protobuf field <code>optional bool disable_delivery_after_cutoff = 4;</code>
     * @return bool
     */
    public function getDisableDeliveryAfterCutoff()
    {
        return isset($this->disable_delivery_after_cutoff) ? $this->disable_delivery_after_cutoff : false;
    }

    public function hasDisableDeliveryAfterCutoff()
    {
        return isset($this->disable_delivery_after_cutoff);
    }

    public function clearDisableDeliveryAfterCutoff()
    {
        unset($this->disable_delivery_after_cutoff);
    }

    /**
     * This field only applies to same-day delivery. If true, prevents next-day
     * delivery from being shown for this offer after the cutoff time. This field
     * only applies to same-day delivery offers, for merchants who want to
     * explicitly disable it.
     *
     * Generated from protobuf field <code>optional bool disable_delivery_after_cutoff = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setDisableDeliveryAfterCutoff($var)
    {
        GPBUtil::checkBool($var);
        $this->disable_delivery_after_cutoff = $var;

        return $this;
    }

}

