<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Controls what and how to inspect for findings.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.InspectJobConfig</code>
 */
class InspectJobConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The data to scan.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.StorageConfig storage_config = 1;</code>
     */
    private $storage_config = null;
    /**
     * How and what to scan for.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     */
    private $inspect_config = null;
    /**
     * If provided, will be used as the default for all values in InspectConfig.
     * `inspect_config` will be merged into the values persisted as part of the
     * template.
     *
     * Generated from protobuf field <code>string inspect_template_name = 3;</code>
     */
    private $inspect_template_name = '';
    /**
     * Actions to execute at the completion of the job.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Action actions = 4;</code>
     */
    private $actions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\StorageConfig $storage_config
     *           The data to scan.
     *     @type \Google\Cloud\Dlp\V2\InspectConfig $inspect_config
     *           How and what to scan for.
     *     @type string $inspect_template_name
     *           If provided, will be used as the default for all values in InspectConfig.
     *           `inspect_config` will be merged into the values persisted as part of the
     *           template.
     *     @type array<\Google\Cloud\Dlp\V2\Action>|\Google\Protobuf\Internal\RepeatedField $actions
     *           Actions to execute at the completion of the job.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * The data to scan.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.StorageConfig storage_config = 1;</code>
     * @return \Google\Cloud\Dlp\V2\StorageConfig|null
     */
    public function getStorageConfig()
    {
        return $this->storage_config;
    }

    public function hasStorageConfig()
    {
        return isset($this->storage_config);
    }

    public function clearStorageConfig()
    {
        unset($this->storage_config);
    }

    /**
     * The data to scan.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.StorageConfig storage_config = 1;</code>
     * @param \Google\Cloud\Dlp\V2\StorageConfig $var
     * @return $this
     */
    public function setStorageConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StorageConfig::class);
        $this->storage_config = $var;

        return $this;
    }

    /**
     * How and what to scan for.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     * @return \Google\Cloud\Dlp\V2\InspectConfig|null
     */
    public function getInspectConfig()
    {
        return $this->inspect_config;
    }

    public function hasInspectConfig()
    {
        return isset($this->inspect_config);
    }

    public function clearInspectConfig()
    {
        unset($this->inspect_config);
    }

    /**
     * How and what to scan for.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
     * @param \Google\Cloud\Dlp\V2\InspectConfig $var
     * @return $this
     */
    public function setInspectConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InspectConfig::class);
        $this->inspect_config = $var;

        return $this;
    }

    /**
     * If provided, will be used as the default for all values in InspectConfig.
     * `inspect_config` will be merged into the values persisted as part of the
     * template.
     *
     * Generated from protobuf field <code>string inspect_template_name = 3;</code>
     * @return string
     */
    public function getInspectTemplateName()
    {
        return $this->inspect_template_name;
    }

    /**
     * If provided, will be used as the default for all values in InspectConfig.
     * `inspect_config` will be merged into the values persisted as part of the
     * template.
     *
     * Generated from protobuf field <code>string inspect_template_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setInspectTemplateName($var)
    {
        GPBUtil::checkString($var, True);
        $this->inspect_template_name = $var;

        return $this;
    }

    /**
     * Actions to execute at the completion of the job.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Action actions = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getActions()
    {
        return $this->actions;
    }

    /**
     * Actions to execute at the completion of the job.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2.Action actions = 4;</code>
     * @param array<\Google\Cloud\Dlp\V2\Action>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setActions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2\Action::class);
        $this->actions = $arr;

        return $this;
    }

}

