<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/modelarmor/v1beta/service.proto

namespace Google\Cloud\ModelArmor\V1beta\SdpFinding;

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

/**
 * Location of this Sensitive Data Protection Finding within input content.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1beta.SdpFinding.SdpFindingLocation</code>
 */
class SdpFindingLocation extends \Google\Protobuf\Internal\Message
{
    /**
     * Zero-based byte offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Note that when the content is not textual, this references
     * the UTF-8 encoded textual representation of the content.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo byte_range = 1;</code>
     */
    protected $byte_range = null;
    /**
     * Unicode character offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Provided when the content is text.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo codepoint_range = 2;</code>
     */
    protected $codepoint_range = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ModelArmor\V1beta\RangeInfo $byte_range
     *           Zero-based byte offsets delimiting the finding.
     *           These are relative to the finding's containing element.
     *           Note that when the content is not textual, this references
     *           the UTF-8 encoded textual representation of the content.
     *     @type \Google\Cloud\ModelArmor\V1beta\RangeInfo $codepoint_range
     *           Unicode character offsets delimiting the finding.
     *           These are relative to the finding's containing element.
     *           Provided when the content is text.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Zero-based byte offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Note that when the content is not textual, this references
     * the UTF-8 encoded textual representation of the content.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo byte_range = 1;</code>
     * @return \Google\Cloud\ModelArmor\V1beta\RangeInfo|null
     */
    public function getByteRange()
    {
        return $this->byte_range;
    }

    public function hasByteRange()
    {
        return isset($this->byte_range);
    }

    public function clearByteRange()
    {
        unset($this->byte_range);
    }

    /**
     * Zero-based byte offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Note that when the content is not textual, this references
     * the UTF-8 encoded textual representation of the content.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo byte_range = 1;</code>
     * @param \Google\Cloud\ModelArmor\V1beta\RangeInfo $var
     * @return $this
     */
    public function setByteRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ModelArmor\V1beta\RangeInfo::class);
        $this->byte_range = $var;

        return $this;
    }

    /**
     * Unicode character offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Provided when the content is text.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo codepoint_range = 2;</code>
     * @return \Google\Cloud\ModelArmor\V1beta\RangeInfo|null
     */
    public function getCodepointRange()
    {
        return $this->codepoint_range;
    }

    public function hasCodepointRange()
    {
        return isset($this->codepoint_range);
    }

    public function clearCodepointRange()
    {
        unset($this->codepoint_range);
    }

    /**
     * Unicode character offsets delimiting the finding.
     * These are relative to the finding's containing element.
     * Provided when the content is text.
     *
     * Generated from protobuf field <code>.google.cloud.modelarmor.v1beta.RangeInfo codepoint_range = 2;</code>
     * @param \Google\Cloud\ModelArmor\V1beta\RangeInfo $var
     * @return $this
     */
    public function setCodepointRange($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ModelArmor\V1beta\RangeInfo::class);
        $this->codepoint_range = $var;

        return $this;
    }

}


