Validation based on regular expressions.

Generated from protobuf field <code>.google.cloud.dataproc.v1beta2.RegexValidation regex = 1;</code>
@param \Google\Cloud\Dataproc\V1beta2\RegexValidation $var
@return $this
437111
public function setRegex($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\RegexValidation::class);
        $this->writeOneof(1, $var);

        return $this;
    }
679028
public function setParameters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->parameters = $arr;

        return $this;
    }
870432
public function setPatents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Patent::class);
        $this->patents = $arr;

        return $this;
    }
1283156
public function setAllowedValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_values = $arr;

        return $this;
    }
938225
public function regex($rule) {
        $this->check_role = 'regex';
        $this->rule = $rule;
        $result = $this->checkRegex($this->value, $rule);
        $this->checkResult($result);
        return $this;
    }
106237
public function setMethods($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
        $this->methods = $arr;

        return $this;
    }
1108785
public function setAnchors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Attrpubapi\Anchor::class);
        $this->anchors = $arr;

        return $this;
    }
126001
public function setLabels($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }
696823
public function setText($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->text = $arr;

        return $this;
    }
1060666
public function setInstance($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Spanner\Admin\Instance\V1\Instance::class);
        $this->instance = $var;

        return $this;
    }
1209361
public function setGroup($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class);
        $this->group = $var;

        return $this;
    }
371204
public function setPhoneNumbers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4beta1\Phone::class);
        $this->phone_numbers = $arr;

        return $this;
    }
341545
public function setDataset($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\Dataset::class);
        $this->dataset = $var;

        return $this;
    }
1279848
public function setAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span_TimeEvent_Annotation::class);
        $this->writeOneof(2, $var);

        return $this;
    }
305412
public function setBlocks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class);
        $this->blocks = $arr;

        return $this;
    }
1359354
public function setValueRangeFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class);
        $this->writeOneof(15, $var);

        return $this;
    }
756799
public function setValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->values = $arr;

        return $this;
    }