<?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
     *           Replace with a specified value.
     *     @type \Google\Cloud\Dlp\V2\RedactConfig $redact_config
     *           Redact
     *     @type \Google\Cloud\Dlp\V2\CharacterMaskConfig $character_mask_config
     *           Mask
     *     @type \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig $crypto_replace_ffx_fpe_config
     *           Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig
     *           instead. Fpe is computationally expensive incurring latency costs.
     *     @type \Google\Cloud\Dlp\V2\FixedSizeBucketingConfig $fixed_size_bucketing_config
     *           Fixed size bucketing
     *     @type \Google\Cloud\Dlp\V2\BucketingConfig $bucketing_config
     *           Bucketing
     *     @type \Google\Cloud\Dlp\V2\ReplaceWithInfoTypeConfig $replace_with_info_type_config
     *           Replace with infotype
     *     @type \Google\Cloud\Dlp\V2\TimePartConfig $time_part_config
     *           Time extraction
     *     @type \Google\Cloud\Dlp\V2\CryptoHashConfig $crypto_hash_config
     *           Crypto
     *     @type \Google\Cloud\Dlp\V2\DateShiftConfig $date_shift_config
     *           Date Shift
     *     @type \Google\Cloud\Dlp\V2\CryptoDeterministicConfig $crypto_deterministic_config
     *           Deterministic Crypto
     *     @type \Google\Cloud\Dlp\V2\ReplaceDictionaryConfig $replace_dictionary_config
     *           Replace with a value randomly drawn (with replacement) from a dictionary.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

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

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

    /**
     * Replace with a specified value.
     *
     * 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;
    }

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

    public function hasRedactConfig()
    {
        return $this->hasOneof(2);
    }

    /**
     * Redact
     *
     * 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;
    }

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

    public function hasCharacterMaskConfig()
    {
        return $this->hasOneof(3);
    }

    /**
     * Mask
     *
     * 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;
    }

    /**
     * Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig
     * instead. Fpe is computationally expensive incurring latency costs.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4;</code>
     * @return \Google\Cloud\Dlp\V2\CryptoReplaceFfxFpeConfig|null
     */
    public function getCryptoReplaceFfxFpeConfig()
    {
        return $this->readOneof(4);
    }

    public function hasCryptoReplaceFfxFpeConfig()
    {
        return $this->hasOneof(4);
    }

    /**
     * Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig
     * instead. Fpe is computationally expensive incurring latency costs.
     *
     * 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;
    }

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

    public function hasFixedSizeBucketingConfig()
    {
        return $this->hasOneof(5);
    }

    /**
     * Fixed size bucketing
     *
     * 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;
    }

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

    public function hasBucketingConfig()
    {
        return $this->hasOneof(6);
    }

    /**
     * Bucketing
     *
     * 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;
    }

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

    public function hasReplaceWithInfoTypeConfig()
    {
        return $this->hasOneof(7);
    }

    /**
     * Replace with infotype
     *
     * 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;
    }

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

    public function hasTimePartConfig()
    {
        return $this->hasOneof(8);
    }

    /**
     * Time extraction
     *
     * 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;
    }

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

    public function hasCryptoHashConfig()
    {
        return $this->hasOneof(9);
    }

    /**
     * Crypto
     *
     * 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;
    }

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

    public function hasDateShiftConfig()
    {
        return $this->hasOneof(11);
    }

    /**
     * Date Shift
     *
     * 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;
    }

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

    public function hasCryptoDeterministicConfig()
    {
        return $this->hasOneof(12);
    }

    /**
     * Deterministic Crypto
     *
     * 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;
    }

    /**
     * Replace with a value randomly drawn (with replacement) from a dictionary.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13;</code>
     * @return \Google\Cloud\Dlp\V2\ReplaceDictionaryConfig|null
     */
    public function getReplaceDictionaryConfig()
    {
        return $this->readOneof(13);
    }

    public function hasReplaceDictionaryConfig()
    {
        return $this->hasOneof(13);
    }

    /**
     * Replace with a value randomly drawn (with replacement) from a dictionary.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13;</code>
     * @param \Google\Cloud\Dlp\V2\ReplaceDictionaryConfig $var
     * @return $this
     */
    public function setReplaceDictionaryConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ReplaceDictionaryConfig::class);
        $this->writeOneof(13, $var);

        return $this;
    }

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

}

