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

namespace Google\Cloud\Dlp\V2beta1;

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

/**
 * A transformation to apply to text that is identified as a specific
 * info_type.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2beta1.InfoTypeTransformations.InfoTypeTransformation</code>
 */
class InfoTypeTransformations_InfoTypeTransformation extends \Google\Protobuf\Internal\Message
{
    /**
     * Info types to apply the transformation to. Empty list will match all
     * available info types for this transformation.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1;</code>
     */
    private $info_types;
    /**
     * Primitive transformation to apply to the info type. [required]
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2;</code>
     */
    private $primitive_transformation = null;

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

    /**
     * Info types to apply the transformation to. Empty list will match all
     * available info types for this transformation.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInfoTypes()
    {
        return $this->info_types;
    }

    /**
     * Info types to apply the transformation to. Empty list will match all
     * available info types for this transformation.
     *
     * Generated from protobuf field <code>repeated .google.privacy.dlp.v2beta1.InfoType info_types = 1;</code>
     * @param \Google\Cloud\Dlp\V2beta1\InfoType[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInfoTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dlp\V2beta1\InfoType::class);
        $this->info_types = $arr;

        return $this;
    }

    /**
     * Primitive transformation to apply to the info type. [required]
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2;</code>
     * @return \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation
     */
    public function getPrimitiveTransformation()
    {
        return $this->primitive_transformation;
    }

    /**
     * Primitive transformation to apply to the info type. [required]
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.PrimitiveTransformation primitive_transformation = 2;</code>
     * @param \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation $var
     * @return $this
     */
    public function setPrimitiveTransformation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\PrimitiveTransformation::class);
        $this->primitive_transformation = $var;

        return $this;
    }

}

