<?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>
     */
    private $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>
     */
    private $field_id = null;
    /**
     * Location within a `ContentItem.Table`.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TableLocation table_location = 3;</code>
     */
    private $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 isset($this->record_key) ? $this->record_key : null;
    }

    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 isset($this->field_id) ? $this->field_id : null;
    }

    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 isset($this->table_location) ? $this->table_location : null;
    }

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

}

