<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/common/dates.proto

namespace Google\Ads\GoogleAds\V25\Common;

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

/**
 * The year month range inclusive of the start and end months.
 * Eg: A year month range to represent Jan 2020 would be: (Jan 2020, Jan 2020).
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.common.YearMonthRange</code>
 */
class YearMonthRange extends \Google\Protobuf\Internal\Message
{
    /**
     * The inclusive start year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth start = 1;</code>
     */
    protected $start = null;
    /**
     * The inclusive end year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth end = 2;</code>
     */
    protected $end = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\GoogleAds\V25\Common\YearMonth $start
     *           The inclusive start year month.
     *     @type \Google\Ads\GoogleAds\V25\Common\YearMonth $end
     *           The inclusive end year month.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Common\Dates::initOnce();
        parent::__construct($data);
    }

    /**
     * The inclusive start year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth start = 1;</code>
     * @return \Google\Ads\GoogleAds\V25\Common\YearMonth|null
     */
    public function getStart()
    {
        return $this->start;
    }

    public function hasStart()
    {
        return isset($this->start);
    }

    public function clearStart()
    {
        unset($this->start);
    }

    /**
     * The inclusive start year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth start = 1;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\YearMonth $var
     * @return $this
     */
    public function setStart($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Common\YearMonth::class);
        $this->start = $var;

        return $this;
    }

    /**
     * The inclusive end year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth end = 2;</code>
     * @return \Google\Ads\GoogleAds\V25\Common\YearMonth|null
     */
    public function getEnd()
    {
        return $this->end;
    }

    public function hasEnd()
    {
        return isset($this->end);
    }

    public function clearEnd()
    {
        unset($this->end);
    }

    /**
     * The inclusive end year month.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v25.common.YearMonth end = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\YearMonth $var
     * @return $this
     */
    public function setEnd($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V25\Common\YearMonth::class);
        $this->end = $var;

        return $this;
    }

}

