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

/**
 * Location of a finding within a row or record.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.RecordLocation</code>
 */
class RecordLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * Key of the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RecordKey record_key = 1;</code>
     */
    protected $record_key = null;
    /**
     * Field id of the field containing the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field_id = 2;</code>
     */
    protected $field_id = null;
    /**
     * Location within a `ContentItem.Table`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TableLocation table_location = 3;</code>
     */
    protected $table_location = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\RecordKey $record_key
     *           Key of the finding.
     *     @type \Google\Cloud\Dlp\V2\FieldId $field_id
     *           Field id of the field containing the finding.
     *     @type \Google\Cloud\Dlp\V2\TableLocation $table_location
     *           Location within a `ContentItem.Table`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Key of the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RecordKey record_key = 1;</code>
     * @return \Google\Cloud\Dlp\V2\RecordKey|null
     */
    public function getRecordKey()
    {
        return $this->record_key;
    }

    public function hasRecordKey()
    {
        return isset($this->record_key);
    }

    public function clearRecordKey()
    {
        unset($this->record_key);
    }

    /**
     * Key of the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RecordKey record_key = 1;</code>
     * @param \Google\Cloud\Dlp\V2\RecordKey $var
     * @return $this
     */
    public function setRecordKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\RecordKey::class);
        $this->record_key = $var;

        return $this;
    }

    /**
     * Field id of the field containing the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field_id = 2;</code>
     * @return \Google\Cloud\Dlp\V2\FieldId|null
     */
    public function getFieldId()
    {
        return $this->field_id;
    }

    public function hasFieldId()
    {
        return isset($this->field_id);
    }

    public function clearFieldId()
    {
        unset($this->field_id);
    }

    /**
     * Field id of the field containing the finding.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FieldId field_id = 2;</code>
     * @param \Google\Cloud\Dlp\V2\FieldId $var
     * @return $this
     */
    public function setFieldId($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class);
        $this->field_id = $var;

        return $this;
    }

    /**
     * Location within a `ContentItem.Table`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TableLocation table_location = 3;</code>
     * @return \Google\Cloud\Dlp\V2\TableLocation|null
     */
    public function getTableLocation()
    {
        return $this->table_location;
    }

    public function hasTableLocation()
    {
        return isset($this->table_location);
    }

    public function clearTableLocation()
    {
        unset($this->table_location);
    }

    /**
     * Location within a `ContentItem.Table`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TableLocation table_location = 3;</code>
     * @param \Google\Cloud\Dlp\V2\TableLocation $var
     * @return $this
     */
    public function setTableLocation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\TableLocation::class);
        $this->table_location = $var;

        return $this;
    }

}

