<?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;

/**
 * Target used to match against for Discovery.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.DiscoveryTarget</code>
 */
class DiscoveryTarget extends \Google\Protobuf\Internal\Message
{
    protected $target;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\BigQueryDiscoveryTarget $big_query_target
     *           BigQuery target for Discovery. The first target to match a table will be
     *           the one applied.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * BigQuery target for Discovery. The first target to match a table will be
     * the one applied.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.BigQueryDiscoveryTarget big_query_target = 1;</code>
     * @return \Google\Cloud\Dlp\V2\BigQueryDiscoveryTarget|null
     */
    public function getBigQueryTarget()
    {
        return $this->readOneof(1);
    }

    public function hasBigQueryTarget()
    {
        return $this->hasOneof(1);
    }

    /**
     * BigQuery target for Discovery. The first target to match a table will be
     * the one applied.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.BigQueryDiscoveryTarget big_query_target = 1;</code>
     * @param \Google\Cloud\Dlp\V2\BigQueryDiscoveryTarget $var
     * @return $this
     */
    public function setBigQueryTarget($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BigQueryDiscoveryTarget::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

