<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Message for a date time object.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.DateTime</code>
 */
class DateTime extends \Google\Protobuf\Internal\Message
{
    /**
     * One or more of the following must be set. All fields are optional, but
     * when set must be valid date or time values.
     *
     * Generated from protobuf field <code>.google.type.Date date = 1;</code>
     */
    private $date = null;
    /**
     * Generated from protobuf field <code>.google.type.DayOfWeek day_of_week = 2;</code>
     */
    private $day_of_week = 0;
    /**
     * Generated from protobuf field <code>.google.type.TimeOfDay time = 3;</code>
     */
    private $time = null;
    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;</code>
     */
    private $time_zone = null;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * One or more of the following must be set. All fields are optional, but
     * when set must be valid date or time values.
     *
     * Generated from protobuf field <code>.google.type.Date date = 1;</code>
     * @return \Google\Type\Date
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * One or more of the following must be set. All fields are optional, but
     * when set must be valid date or time values.
     *
     * Generated from protobuf field <code>.google.type.Date date = 1;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->date = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.type.DayOfWeek day_of_week = 2;</code>
     * @return int
     */
    public function getDayOfWeek()
    {
        return $this->day_of_week;
    }

    /**
     * Generated from protobuf field <code>.google.type.DayOfWeek day_of_week = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setDayOfWeek($var)
    {
        GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class);
        $this->day_of_week = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.type.TimeOfDay time = 3;</code>
     * @return \Google\Type\TimeOfDay
     */
    public function getTime()
    {
        return $this->time;
    }

    /**
     * Generated from protobuf field <code>.google.type.TimeOfDay time = 3;</code>
     * @param \Google\Type\TimeOfDay $var
     * @return $this
     */
    public function setTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class);
        $this->time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;</code>
     * @return \Google\Cloud\Dlp\V2\DateTime_TimeZone
     */
    public function getTimeZone()
    {
        return $this->time_zone;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4;</code>
     * @param \Google\Cloud\Dlp\V2\DateTime_TimeZone $var
     * @return $this
     */
    public function setTimeZone($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\DateTime_TimeZone::class);
        $this->time_zone = $var;

        return $this;
    }

}

