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

namespace Google\Cloud\Dataplex\V1\Asset;

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

/**
 * Status of discovery for an asset.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Asset.DiscoveryStatus</code>
 */
class DiscoveryStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * The current status of the discovery feature.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;</code>
     */
    protected $state = 0;
    /**
     * Additional information about the current state.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     */
    protected $message = '';
    /**
     * Last update time of the status.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3;</code>
     */
    protected $update_time = null;
    /**
     * The start time of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_run_time = 4;</code>
     */
    protected $last_run_time = null;
    /**
     * Data Stats of the asset reported by discovery.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6;</code>
     */
    protected $stats = null;
    /**
     * The duration of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration last_run_duration = 7;</code>
     */
    protected $last_run_duration = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $state
     *           The current status of the discovery feature.
     *     @type string $message
     *           Additional information about the current state.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Last update time of the status.
     *     @type \Google\Protobuf\Timestamp $last_run_time
     *           The start time of the last discovery run.
     *     @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $stats
     *           Data Stats of the asset reported by discovery.
     *     @type \Google\Protobuf\Duration $last_run_duration
     *           The duration of the last discovery run.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The current status of the discovery feature.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The current status of the discovery feature.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Additional information about the current state.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Additional information about the current state.
     *
     * Generated from protobuf field <code>string message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * Last update time of the status.
     *
     * 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);
    }

    /**
     * Last update time of the status.
     *
     * 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;
    }

    /**
     * The start time of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_run_time = 4;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastRunTime()
    {
        return $this->last_run_time;
    }

    public function hasLastRunTime()
    {
        return isset($this->last_run_time);
    }

    public function clearLastRunTime()
    {
        unset($this->last_run_time);
    }

    /**
     * The start time of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_run_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastRunTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_run_time = $var;

        return $this;
    }

    /**
     * Data Stats of the asset reported by discovery.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6;</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats|null
     */
    public function getStats()
    {
        return $this->stats;
    }

    public function hasStats()
    {
        return isset($this->stats);
    }

    public function clearStats()
    {
        unset($this->stats);
    }

    /**
     * Data Stats of the asset reported by discovery.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6;</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $var
     * @return $this
     */
    public function setStats($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats::class);
        $this->stats = $var;

        return $this;
    }

    /**
     * The duration of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration last_run_duration = 7;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getLastRunDuration()
    {
        return $this->last_run_duration;
    }

    public function hasLastRunDuration()
    {
        return isset($this->last_run_duration);
    }

    public function clearLastRunDuration()
    {
        unset($this->last_run_duration);
    }

    /**
     * The duration of the last discovery run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration last_run_duration = 7;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setLastRunDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->last_run_duration = $var;

        return $this;
    }

}


