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

namespace Google\Cloud\Dlp\V2beta1;

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

/**
 * Custom information type provided by the user. Used to find domain-specific
 * sensitive information configurable to the data in question.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2beta1.CustomInfoType</code>
 */
class CustomInfoType extends \Google\Protobuf\Internal\Message
{
    /**
     * Info type configuration. All custom info types must have configurations
     * that do not conflict with built-in info types or other custom info types.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     */
    private $info_type = null;
    protected $type;

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

    /**
     * Info type configuration. All custom info types must have configurations
     * that do not conflict with built-in info types or other custom info types.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @return \Google\Cloud\Dlp\V2beta1\InfoType
     */
    public function getInfoType()
    {
        return $this->info_type;
    }

    /**
     * Info type configuration. All custom info types must have configurations
     * that do not conflict with built-in info types or other custom info types.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @param \Google\Cloud\Dlp\V2beta1\InfoType $var
     * @return $this
     */
    public function setInfoType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class);
        $this->info_type = $var;

        return $this;
    }

    /**
     * Dictionary-based custom info type.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CustomInfoType.Dictionary dictionary = 2;</code>
     * @return \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary
     */
    public function getDictionary()
    {
        return $this->readOneof(2);
    }

    /**
     * Dictionary-based custom info type.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.CustomInfoType.Dictionary dictionary = 2;</code>
     * @param \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary $var
     * @return $this
     */
    public function setDictionary($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\CustomInfoType_Dictionary::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

