<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/channel/v1/reports_service.proto

namespace Google\Cloud\Channel\V1;

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

/**
 * A representation of usage or invoice date ranges.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.DateRange</code>
 */
class DateRange extends \Google\Protobuf\Internal\Message
{
    /**
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    private $usage_start_date_time = null;
    /**
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    private $usage_end_date_time = null;
    /**
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_start_date = 3;</code>
     */
    private $invoice_start_date = null;
    /**
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_end_date = 4;</code>
     */
    private $invoice_end_date = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Type\DateTime $usage_start_date_time
     *           The earliest usage date time (inclusive).
     *           If you use time groupings (daily, weekly, etc), each group uses
     *           midnight to midnight (Pacific time). The usage start date is
     *           rounded down to include all usage from the specified date. We recommend
     *           that clients pass `usage_start_date_time` in Pacific time.
     *     @type \Google\Type\DateTime $usage_end_date_time
     *           The latest usage date time (exclusive).
     *           If you use time groupings (daily, weekly, etc), each group uses
     *           midnight to midnight (Pacific time). The usage end date is
     *           rounded down to include all usage from the specified date. We recommend
     *           that clients pass `usage_start_date_time` in Pacific time.
     *     @type \Google\Type\Date $invoice_start_date
     *           The earliest invoice date (inclusive).
     *           If your product uses monthly invoices, and this value is not the beginning
     *           of a month, this will adjust the date to the first day of the given month.
     *     @type \Google\Type\Date $invoice_end_date
     *           The latest invoice date (exclusive).
     *           If your product uses monthly invoices, and this value is not the beginning
     *           of a month, this will adjust the date to the first day of the following
     *           month.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ReportsService::initOnce();
        parent::__construct($data);
    }

    /**
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_start_date_time = 1;</code>
     * @return \Google\Type\DateTime|null
     */
    public function getUsageStartDateTime()
    {
        return $this->usage_start_date_time;
    }

    public function hasUsageStartDateTime()
    {
        return isset($this->usage_start_date_time);
    }

    public function clearUsageStartDateTime()
    {
        unset($this->usage_start_date_time);
    }

    /**
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_start_date_time = 1;</code>
     * @param \Google\Type\DateTime $var
     * @return $this
     */
    public function setUsageStartDateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
        $this->usage_start_date_time = $var;

        return $this;
    }

    /**
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_end_date_time = 2;</code>
     * @return \Google\Type\DateTime|null
     */
    public function getUsageEndDateTime()
    {
        return $this->usage_end_date_time;
    }

    public function hasUsageEndDateTime()
    {
        return isset($this->usage_end_date_time);
    }

    public function clearUsageEndDateTime()
    {
        unset($this->usage_end_date_time);
    }

    /**
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     *
     * Generated from protobuf field <code>.google.type.DateTime usage_end_date_time = 2;</code>
     * @param \Google\Type\DateTime $var
     * @return $this
     */
    public function setUsageEndDateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\DateTime::class);
        $this->usage_end_date_time = $var;

        return $this;
    }

    /**
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_start_date = 3;</code>
     * @return \Google\Type\Date|null
     */
    public function getInvoiceStartDate()
    {
        return $this->invoice_start_date;
    }

    public function hasInvoiceStartDate()
    {
        return isset($this->invoice_start_date);
    }

    public function clearInvoiceStartDate()
    {
        unset($this->invoice_start_date);
    }

    /**
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_start_date = 3;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setInvoiceStartDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->invoice_start_date = $var;

        return $this;
    }

    /**
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_end_date = 4;</code>
     * @return \Google\Type\Date|null
     */
    public function getInvoiceEndDate()
    {
        return $this->invoice_end_date;
    }

    public function hasInvoiceEndDate()
    {
        return isset($this->invoice_end_date);
    }

    public function clearInvoiceEndDate()
    {
        unset($this->invoice_end_date);
    }

    /**
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     *
     * Generated from protobuf field <code>.google.type.Date invoice_end_date = 4;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setInvoiceEndDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->invoice_end_date = $var;

        return $this;
    }

}

