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

/**
 * Replace each input value with a value randomly selected from the dictionary.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.ReplaceDictionaryConfig</code>
 */
class ReplaceDictionaryConfig extends \Google\Protobuf\Internal\Message
{
    protected $type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\CustomInfoType\Dictionary\WordList $word_list
     *           A list of words to select from for random replacement. The
     *           [limits](https://cloud.google.com/dlp/limits) page contains details about
     *           the size limits of dictionaries.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of words to select from for random replacement. The
     * [limits](https://cloud.google.com/dlp/limits) page contains details about
     * the size limits of dictionaries.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
     * @return \Google\Cloud\Dlp\V2\CustomInfoType\Dictionary\WordList|null
     */
    public function getWordList()
    {
        return $this->readOneof(1);
    }

    public function hasWordList()
    {
        return $this->hasOneof(1);
    }

    /**
     * A list of words to select from for random replacement. The
     * [limits](https://cloud.google.com/dlp/limits) page contains details about
     * the size limits of dictionaries.
     *
     * 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 getType()
    {
        return $this->whichOneof("type");
    }

}

