<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/taskqueue/v1/message.proto

namespace Temporal\Api\Taskqueue\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.taskqueue.v1.ConfigMetadata</code>
 */
class ConfigMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Reason for why the config was set.
     *
     * Generated from protobuf field <code>string reason = 1;</code>
     */
    protected $reason = '';
    /**
     * Identity of the last updater.
     * Set by the request's identity field.
     *
     * Generated from protobuf field <code>string update_identity = 2;</code>
     */
    protected $update_identity = '';
    /**
     * Time of the last update.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3;</code>
     */
    protected $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $reason
     *           Reason for why the config was set.
     *     @type string $update_identity
     *           Identity of the last updater.
     *           Set by the request's identity field.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Time of the last update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Reason for why the config was set.
     *
     * Generated from protobuf field <code>string reason = 1;</code>
     * @return string
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Reason for why the config was set.
     *
     * Generated from protobuf field <code>string reason = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkString($var, True);
        $this->reason = $var;

        return $this;
    }

    /**
     * Identity of the last updater.
     * Set by the request's identity field.
     *
     * Generated from protobuf field <code>string update_identity = 2;</code>
     * @return string
     */
    public function getUpdateIdentity()
    {
        return $this->update_identity;
    }

    /**
     * Identity of the last updater.
     * Set by the request's identity field.
     *
     * Generated from protobuf field <code>string update_identity = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUpdateIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->update_identity = $var;

        return $this;
    }

    /**
     * Time of the last update.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Time of the last update.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

