<?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;

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

/**
 * Generated from protobuf message <code>proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime</code>
 */
class HSMDateTime extends \Google\Protobuf\Internal\Message
{
    protected $datetimeOneof;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent $component
     *     @type \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeUnixEpoch $unixEpoch
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent component = 1;</code>
     * @return \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent|null
     */
    public function getComponent()
    {
        return $this->readOneof(1);
    }

    public function hasComponent()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent component = 1;</code>
     * @param \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent $var
     * @return $this
     */
    public function setComponent($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeComponent::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch unixEpoch = 2;</code>
     * @return \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeUnixEpoch|null
     */
    public function getUnixEpoch()
    {
        return $this->readOneof(2);
    }

    public function hasUnixEpoch()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch unixEpoch = 2;</code>
     * @param \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeUnixEpoch $var
     * @return $this
     */
    public function setUnixEpoch($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\HighlyStructuredMessage\HSMLocalizableParameter\HSMDateTime\HSMDateTimeUnixEpoch::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDatetimeOneof()
    {
        return $this->whichOneof("datetimeOneof");
    }

}

