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

namespace Google\Cloud\VMMigration\V1;

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

/**
 * ReplicationSync contain information about the last replica sync to the cloud.
 *
 * Generated from protobuf message <code>google.cloud.vmmigration.v1.ReplicationSync</code>
 */
class ReplicationSync extends \Google\Protobuf\Internal\Message
{
    /**
     * The most updated snapshot created time in the source that finished
     * replication.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_sync_time = 1;</code>
     */
    private $last_sync_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $last_sync_time
     *           The most updated snapshot created time in the source that finished
     *           replication.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce();
        parent::__construct($data);
    }

    /**
     * The most updated snapshot created time in the source that finished
     * replication.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_sync_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastSyncTime()
    {
        return $this->last_sync_time;
    }

    public function hasLastSyncTime()
    {
        return isset($this->last_sync_time);
    }

    public function clearLastSyncTime()
    {
        unset($this->last_sync_time);
    }

    /**
     * The most updated snapshot created time in the source that finished
     * replication.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_sync_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastSyncTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_sync_time = $var;

        return $this;
    }

}

