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

namespace Google\Cloud\ModelArmor\V1\MaliciousUriFilterResult;

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

/**
 * Information regarding malicious URI and its location within the input
 * content.
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1.MaliciousUriFilterResult.MaliciousUriMatchedItem</code>
 */
class MaliciousUriMatchedItem extends \Google\Protobuf\Internal\Message
{
    /**
     * Malicious URI.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     */
    protected $uri = '';
    /**
     * List of locations where Malicious URI is identified.
     * The `locations` field is supported only for plaintext content i.e.
     * ByteItemType.PLAINTEXT_UTF8
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.RangeInfo locations = 2;</code>
     */
    private $locations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $uri
     *           Malicious URI.
     *     @type array<\Google\Cloud\ModelArmor\V1\RangeInfo>|\Google\Protobuf\Internal\RepeatedField $locations
     *           List of locations where Malicious URI is identified.
     *           The `locations` field is supported only for plaintext content i.e.
     *           ByteItemType.PLAINTEXT_UTF8
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Malicious URI.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * Malicious URI.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * List of locations where Malicious URI is identified.
     * The `locations` field is supported only for plaintext content i.e.
     * ByteItemType.PLAINTEXT_UTF8
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.RangeInfo locations = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLocations()
    {
        return $this->locations;
    }

    /**
     * List of locations where Malicious URI is identified.
     * The `locations` field is supported only for plaintext content i.e.
     * ByteItemType.PLAINTEXT_UTF8
     *
     * Generated from protobuf field <code>repeated .google.cloud.modelarmor.v1.RangeInfo locations = 2;</code>
     * @param array<\Google\Cloud\ModelArmor\V1\RangeInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ModelArmor\V1\RangeInfo::class);
        $this->locations = $arr;

        return $this;
    }

}


