<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/storage.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Custom information type based on a dictionary of words or phrases. This can
 * be used to match sensitive information specific to the data, such as a list
 * of employee IDs or job titles.
 * Dictionary words are case-insensitive and all characters other than letters
 * and digits in the unicode [Basic Multilingual
 * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
 * will be replaced with whitespace when scanning for matches, so the
 * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
 * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
 * surrounding any match must be of a different type than the adjacent
 * characters within the word, so letters must be next to non-letters and
 * digits next to non-digits. For example, the dictionary word "jen" will
 * match the first three letters of the text "jen123" but will return no
 * matches for "jennifer".
 * Dictionary words containing a large number of characters that are not
 * letters or digits may result in unexpected findings because such characters
 * are treated as whitespace.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.CustomInfoType.Dictionary</code>
 */
class CustomInfoType_Dictionary extends \Google\Protobuf\Internal\Message
{
    protected $source;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2\Storage::initOnce();
        parent::__construct();
    }

    /**
     * List of words or phrases to search for.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary_WordList
     */
    public function getWordList()
    {
        return $this->readOneof(1);
    }

    /**
     * List of words or phrases to search for.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     * @param \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary_WordList $var
     * @return $this
     */
    public function setWordList($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary_WordList::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

