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

/**
 * A rule for transforming a value.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.PrimitiveTransformation</code>
 */
class PrimitiveTransformation extends \Google\Protobuf\Internal\Message
{
    protected $transformation;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dlp\V2\ReplaceValueConfig $replace_config
     *     @type \Google\Cloud\Dlp\V2\RedactConfig $redact_config
     *     @type \Google\Cloud\Dlp\V2\CharacterMaskConfig $character_mask_config
     *     @type \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig $crypto_replace_ffx_fpe_config
     *     @type \Google\Cloud\Dlp\V2\FixedSizeBucketingConfig $fixed_size_bucketing_config
     *     @type \Google\Cloud\Dlp\V2\BucketingConfig $bucketing_config
     *     @type \Google\Cloud\Dlp\V2\ReplaceWithInfoTypeConfig $replace_with_info_type_config
     *     @type \Google\Cloud\Dlp\V2\TimePartConfig $time_part_config
     *     @type \Google\Cloud\Dlp\V2\CryptoHashConfig $crypto_hash_config
     *     @type \Google\Cloud\Dlp\V2\DateShiftConfig $date_shift_config
     *     @type \Google\Cloud\Dlp\V2\CryptoDeterministicConfig $crypto_deterministic_config
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1;</code>
     * @return \Google\Cloud\Dlp\V2\ReplaceValueConfig
     */
    public function getReplaceConfig()
    {
        return $this->readOneof(1);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1;</code>
     * @param \Google\Cloud\Dlp\V2\ReplaceValueConfig $var
     * @return $this
     */
    public function setReplaceConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ReplaceValueConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RedactConfig redact_config = 2;</code>
     * @return \Google\Cloud\Dlp\V2\RedactConfig
     */
    public function getRedactConfig()
    {
        return $this->readOneof(2);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.RedactConfig redact_config = 2;</code>
     * @param \Google\Cloud\Dlp\V2\RedactConfig $var
     * @return $this
     */
    public function setRedactConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\RedactConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3;</code>
     * @return \Google\Cloud\Dlp\V2\CharacterMaskConfig
     */
    public function getCharacterMaskConfig()
    {
        return $this->readOneof(3);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3;</code>
     * @param \Google\Cloud\Dlp\V2\CharacterMaskConfig $var
     * @return $this
     */
    public function setCharacterMaskConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CharacterMaskConfig::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4;</code>
     * @return \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig
     */
    public function getCryptoReplaceFfxFpeConfig()
    {
        return $this->readOneof(4);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4;</code>
     * @param \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig $var
     * @return $this
     */
    public function setCryptoReplaceFfxFpeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5;</code>
     * @return \Google\Cloud\Dlp\V2\FixedSizeBucketingConfig
     */
    public function getFixedSizeBucketingConfig()
    {
        return $this->readOneof(5);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5;</code>
     * @param \Google\Cloud\Dlp\V2\FixedSizeBucketingConfig $var
     * @return $this
     */
    public function setFixedSizeBucketingConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FixedSizeBucketingConfig::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.BucketingConfig bucketing_config = 6;</code>
     * @return \Google\Cloud\Dlp\V2\BucketingConfig
     */
    public function getBucketingConfig()
    {
        return $this->readOneof(6);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.BucketingConfig bucketing_config = 6;</code>
     * @param \Google\Cloud\Dlp\V2\BucketingConfig $var
     * @return $this
     */
    public function setBucketingConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BucketingConfig::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7;</code>
     * @return \Google\Cloud\Dlp\V2\ReplaceWithInfoTypeConfig
     */
    public function getReplaceWithInfoTypeConfig()
    {
        return $this->readOneof(7);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7;</code>
     * @param \Google\Cloud\Dlp\V2\ReplaceWithInfoTypeConfig $var
     * @return $this
     */
    public function setReplaceWithInfoTypeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ReplaceWithInfoTypeConfig::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TimePartConfig time_part_config = 8;</code>
     * @return \Google\Cloud\Dlp\V2\TimePartConfig
     */
    public function getTimePartConfig()
    {
        return $this->readOneof(8);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.TimePartConfig time_part_config = 8;</code>
     * @param \Google\Cloud\Dlp\V2\TimePartConfig $var
     * @return $this
     */
    public function setTimePartConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\TimePartConfig::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9;</code>
     * @return \Google\Cloud\Dlp\V2\CryptoHashConfig
     */
    public function getCryptoHashConfig()
    {
        return $this->readOneof(9);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9;</code>
     * @param \Google\Cloud\Dlp\V2\CryptoHashConfig $var
     * @return $this
     */
    public function setCryptoHashConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CryptoHashConfig::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11;</code>
     * @return \Google\Cloud\Dlp\V2\DateShiftConfig
     */
    public function getDateShiftConfig()
    {
        return $this->readOneof(11);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11;</code>
     * @param \Google\Cloud\Dlp\V2\DateShiftConfig $var
     * @return $this
     */
    public function setDateShiftConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\DateShiftConfig::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12;</code>
     * @return \Google\Cloud\Dlp\V2\CryptoDeterministicConfig
     */
    public function getCryptoDeterministicConfig()
    {
        return $this->readOneof(12);
    }

    /**
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12;</code>
     * @param \Google\Cloud\Dlp\V2\CryptoDeterministicConfig $var
     * @return $this
     */
    public function setCryptoDeterministicConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CryptoDeterministicConfig::class);
        $this->writeOneof(12, $var);

        return $this;
    }

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

}

