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

namespace Google\Cloud\SecurityCenter\V1;

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

/**
 * Response of asset discovery run
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.RunAssetDiscoveryResponse</code>
 */
class RunAssetDiscoveryResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The state of an asset discovery run.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1;</code>
     */
    private $state = 0;
    /**
     * The duration between asset discovery run start and end
     *
     * Generated from protobuf field <code>.google.protobuf.Duration duration = 2;</code>
     */
    private $duration = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $state
     *           The state of an asset discovery run.
     *     @type \Google\Protobuf\Duration $duration
     *           The duration between asset discovery run start and end
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\RunAssetDiscoveryResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * The state of an asset discovery run.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The state of an asset discovery run.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse_State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * The duration between asset discovery run start and end
     *
     * Generated from protobuf field <code>.google.protobuf.Duration duration = 2;</code>
     * @return \Google\Protobuf\Duration
     */
    public function getDuration()
    {
        return $this->duration;
    }

    /**
     * The duration between asset discovery run start and end
     *
     * Generated from protobuf field <code>.google.protobuf.Duration duration = 2;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->duration = $var;

        return $this;
    }

}

