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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * The payload associated with Discovery data processing.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DiscoveryEvent</code>
 */
class DiscoveryEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * The log message.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     */
    private $message = '';
    /**
     * The id of the associated lake.
     *
     * Generated from protobuf field <code>string lake_id = 2;</code>
     */
    private $lake_id = '';
    /**
     * The id of the associated zone.
     *
     * Generated from protobuf field <code>string zone_id = 3;</code>
     */
    private $zone_id = '';
    /**
     * The id of the associated asset.
     *
     * Generated from protobuf field <code>string asset_id = 4;</code>
     */
    private $asset_id = '';
    /**
     * The data location associated with the event.
     *
     * Generated from protobuf field <code>string data_location = 5;</code>
     */
    private $data_location = '';
    /**
     * The type of the event being logged.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10;</code>
     */
    private $type = 0;
    protected $details;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $message
     *           The log message.
     *     @type string $lake_id
     *           The id of the associated lake.
     *     @type string $zone_id
     *           The id of the associated zone.
     *     @type string $asset_id
     *           The id of the associated asset.
     *     @type string $data_location
     *           The data location associated with the event.
     *     @type int $type
     *           The type of the event being logged.
     *     @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $config
     *           Details about discovery configuration in effect.
     *     @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $entity
     *           Details about the entity associated with the event.
     *     @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $partition
     *           Details about the partition associated with the event.
     *     @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $action
     *           Details about the action associated with the event.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce();
        parent::__construct($data);
    }

    /**
     * The log message.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * The log message.
     *
     * Generated from protobuf field <code>string message = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

    /**
     * The id of the associated lake.
     *
     * Generated from protobuf field <code>string lake_id = 2;</code>
     * @return string
     */
    public function getLakeId()
    {
        return $this->lake_id;
    }

    /**
     * The id of the associated lake.
     *
     * Generated from protobuf field <code>string lake_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLakeId($var)
    {
        GPBUtil::checkString($var, True);
        $this->lake_id = $var;

        return $this;
    }

    /**
     * The id of the associated zone.
     *
     * Generated from protobuf field <code>string zone_id = 3;</code>
     * @return string
     */
    public function getZoneId()
    {
        return $this->zone_id;
    }

    /**
     * The id of the associated zone.
     *
     * Generated from protobuf field <code>string zone_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setZoneId($var)
    {
        GPBUtil::checkString($var, True);
        $this->zone_id = $var;

        return $this;
    }

    /**
     * The id of the associated asset.
     *
     * Generated from protobuf field <code>string asset_id = 4;</code>
     * @return string
     */
    public function getAssetId()
    {
        return $this->asset_id;
    }

    /**
     * The id of the associated asset.
     *
     * Generated from protobuf field <code>string asset_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAssetId($var)
    {
        GPBUtil::checkString($var, True);
        $this->asset_id = $var;

        return $this;
    }

    /**
     * The data location associated with the event.
     *
     * Generated from protobuf field <code>string data_location = 5;</code>
     * @return string
     */
    public function getDataLocation()
    {
        return $this->data_location;
    }

    /**
     * The data location associated with the event.
     *
     * Generated from protobuf field <code>string data_location = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setDataLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_location = $var;

        return $this;
    }

    /**
     * The type of the event being logged.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of the event being logged.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EventType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Details about discovery configuration in effect.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20;</code>
     * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails|null
     */
    public function getConfig()
    {
        return $this->readOneof(20);
    }

    public function hasConfig()
    {
        return $this->hasOneof(20);
    }

    /**
     * Details about discovery configuration in effect.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20;</code>
     * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails::class);
        $this->writeOneof(20, $var);

        return $this;
    }

    /**
     * Details about the entity associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21;</code>
     * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails|null
     */
    public function getEntity()
    {
        return $this->readOneof(21);
    }

    public function hasEntity()
    {
        return $this->hasOneof(21);
    }

    /**
     * Details about the entity associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21;</code>
     * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $var
     * @return $this
     */
    public function setEntity($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails::class);
        $this->writeOneof(21, $var);

        return $this;
    }

    /**
     * Details about the partition associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22;</code>
     * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails|null
     */
    public function getPartition()
    {
        return $this->readOneof(22);
    }

    public function hasPartition()
    {
        return $this->hasOneof(22);
    }

    /**
     * Details about the partition associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22;</code>
     * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $var
     * @return $this
     */
    public function setPartition($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails::class);
        $this->writeOneof(22, $var);

        return $this;
    }

    /**
     * Details about the action associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23;</code>
     * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails|null
     */
    public function getAction()
    {
        return $this->readOneof(23);
    }

    public function hasAction()
    {
        return $this->hasOneof(23);
    }

    /**
     * Details about the action associated with the event.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23;</code>
     * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $var
     * @return $this
     */
    public function setAction($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails::class);
        $this->writeOneof(23, $var);

        return $this;
    }

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

}

