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

namespace Google\Cloud\Dataplex\V1\DataScan;

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

/**
 * DataScan execution settings.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataScan.ExecutionSpec</code>
 */
class ExecutionSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Spec related to how often and when a scan should be triggered.
     * If not specified, the default is OnDemand, which means the scan will not
     * run until the user calls RunDataScan API.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $trigger = null;
    protected $incremental;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dataplex\V1\Trigger $trigger
     *           Optional. Spec related to how often and when a scan should be triggered.
     *           If not specified, the default is OnDemand, which means the scan will not
     *           run until the user calls RunDataScan API.
     *     @type string $field
     *           Immutable. The unnested field (Date or Timestamp) that contains values
     *           that monotonically increase over time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Spec related to how often and when a scan should be triggered.
     * If not specified, the default is OnDemand, which means the scan will not
     * run until the user calls RunDataScan API.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dataplex\V1\Trigger|null
     */
    public function getTrigger()
    {
        return $this->trigger;
    }

    public function hasTrigger()
    {
        return isset($this->trigger);
    }

    public function clearTrigger()
    {
        unset($this->trigger);
    }

    /**
     * Optional. Spec related to how often and when a scan should be triggered.
     * If not specified, the default is OnDemand, which means the scan will not
     * run until the user calls RunDataScan API.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dataplex\V1\Trigger $var
     * @return $this
     */
    public function setTrigger($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger::class);
        $this->trigger = $var;

        return $this;
    }

    /**
     * Immutable. The unnested field (Date or Timestamp) that contains values
     * that monotonically increase over time.
     *
     * Generated from protobuf field <code>string field = 100 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getField()
    {
        return $this->readOneof(100);
    }

    public function hasField()
    {
        return $this->hasOneof(100);
    }

    /**
     * Immutable. The unnested field (Date or Timestamp) that contains values
     * that monotonically increase over time.
     *
     * Generated from protobuf field <code>string field = 100 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setField($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(100, $var);

        return $this;
    }

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

}


