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

/**
 * The configuration that controls how the data will change.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.DeidentifyConfig</code>
 */
class DeidentifyConfig extends \Google\Protobuf\Internal\Message
{
    protected $transformation;

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

    /**
     * Treat the dataset as free-form text and apply the same free text
     * transformation everywhere.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1;</code>
     * @return \Google\Cloud\Dlp\V2\InfoTypeTransformations
     */
    public function getInfoTypeTransformations()
    {
        return $this->readOneof(1);
    }

    /**
     * Treat the dataset as free-form text and apply the same free text
     * transformation everywhere.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1;</code>
     * @param \Google\Cloud\Dlp\V2\InfoTypeTransformations $var
     * @return $this
     */
    public function setInfoTypeTransformations($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InfoTypeTransformations::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Treat the dataset as structured. Transformations can be applied to
     * specific locations within structured datasets, such as transforming
     * a column within a table.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RecordTransformations record_transformations = 2;</code>
     * @return \Google\Cloud\Dlp\V2\RecordTransformations
     */
    public function getRecordTransformations()
    {
        return $this->readOneof(2);
    }

    /**
     * Treat the dataset as structured. Transformations can be applied to
     * specific locations within structured datasets, such as transforming
     * a column within a table.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RecordTransformations record_transformations = 2;</code>
     * @param \Google\Cloud\Dlp\V2\RecordTransformations $var
     * @return $this
     */
    public function setRecordTransformations($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\RecordTransformations::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

