<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime;

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

/**
 * Generated from protobuf message <code>proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent</code>
 */
class HSMDateTimeComponent extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType dayOfWeek = 1;</code>
     */
    protected $dayOfWeek = null;
    /**
     * Generated from protobuf field <code>optional uint32 year = 2;</code>
     */
    protected $year = null;
    /**
     * Generated from protobuf field <code>optional uint32 month = 3;</code>
     */
    protected $month = null;
    /**
     * Generated from protobuf field <code>optional uint32 dayOfMonth = 4;</code>
     */
    protected $dayOfMonth = null;
    /**
     * Generated from protobuf field <code>optional uint32 hour = 5;</code>
     */
    protected $hour = null;
    /**
     * Generated from protobuf field <code>optional uint32 minute = 6;</code>
     */
    protected $minute = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType calendar = 7;</code>
     */
    protected $calendar = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $dayOfWeek
     *     @type int $year
     *     @type int $month
     *     @type int $dayOfMonth
     *     @type int $hour
     *     @type int $minute
     *     @type int $calendar
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType dayOfWeek = 1;</code>
     * @return int
     */
    public function getDayOfWeek()
    {
        return isset($this->dayOfWeek) ? $this->dayOfWeek : 0;
    }

    public function hasDayOfWeek()
    {
        return isset($this->dayOfWeek);
    }

    public function clearDayOfWeek()
    {
        unset($this->dayOfWeek);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType dayOfWeek = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDayOfWeek($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent\DayOfWeekType::class);
        $this->dayOfWeek = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 year = 2;</code>
     * @return int
     */
    public function getYear()
    {
        return isset($this->year) ? $this->year : 0;
    }

    public function hasYear()
    {
        return isset($this->year);
    }

    public function clearYear()
    {
        unset($this->year);
    }

    /**
     * Generated from protobuf field <code>optional uint32 year = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setYear($var)
    {
        GPBUtil::checkUint32($var);
        $this->year = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 month = 3;</code>
     * @return int
     */
    public function getMonth()
    {
        return isset($this->month) ? $this->month : 0;
    }

    public function hasMonth()
    {
        return isset($this->month);
    }

    public function clearMonth()
    {
        unset($this->month);
    }

    /**
     * Generated from protobuf field <code>optional uint32 month = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMonth($var)
    {
        GPBUtil::checkUint32($var);
        $this->month = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 dayOfMonth = 4;</code>
     * @return int
     */
    public function getDayOfMonth()
    {
        return isset($this->dayOfMonth) ? $this->dayOfMonth : 0;
    }

    public function hasDayOfMonth()
    {
        return isset($this->dayOfMonth);
    }

    public function clearDayOfMonth()
    {
        unset($this->dayOfMonth);
    }

    /**
     * Generated from protobuf field <code>optional uint32 dayOfMonth = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setDayOfMonth($var)
    {
        GPBUtil::checkUint32($var);
        $this->dayOfMonth = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 hour = 5;</code>
     * @return int
     */
    public function getHour()
    {
        return isset($this->hour) ? $this->hour : 0;
    }

    public function hasHour()
    {
        return isset($this->hour);
    }

    public function clearHour()
    {
        unset($this->hour);
    }

    /**
     * Generated from protobuf field <code>optional uint32 hour = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setHour($var)
    {
        GPBUtil::checkUint32($var);
        $this->hour = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 minute = 6;</code>
     * @return int
     */
    public function getMinute()
    {
        return isset($this->minute) ? $this->minute : 0;
    }

    public function hasMinute()
    {
        return isset($this->minute);
    }

    public function clearMinute()
    {
        unset($this->minute);
    }

    /**
     * Generated from protobuf field <code>optional uint32 minute = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setMinute($var)
    {
        GPBUtil::checkUint32($var);
        $this->minute = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType calendar = 7;</code>
     * @return int
     */
    public function getCalendar()
    {
        return isset($this->calendar) ? $this->calendar : 0;
    }

    public function hasCalendar()
    {
        return isset($this->calendar);
    }

    public function clearCalendar()
    {
        unset($this->calendar);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType calendar = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setCalendar($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent\CalendarType::class);
        $this->calendar = $var;

        return $this;
    }

}

