<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/v2/data.proto

namespace Google\Cloud\Bigtable\V2;

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

/**
 * A RowFilter which evaluates one of two possible RowFilters, depending on
 * whether or not a predicate RowFilter outputs any cells from the input row.
 * IMPORTANT NOTE: The predicate filter does not execute atomically with the
 * true and false filters, which may lead to inconsistent or unexpected
 * results. Additionally, Condition filters have poor performance, especially
 * when filters are set for the false condition.
 *
 * Generated from protobuf message <code>google.bigtable.v2.RowFilter.Condition</code>
 */
class RowFilter_Condition extends \Google\Protobuf\Internal\Message
{
    /**
     * If `predicate_filter` outputs any cells, then `true_filter` will be
     * evaluated on the input row. Otherwise, `false_filter` will be evaluated.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter predicate_filter = 1;</code>
     */
    private $predicate_filter = null;
    /**
     * The filter to apply to the input row if `predicate_filter` returns any
     * results. If not provided, no results will be returned in the true case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter true_filter = 2;</code>
     */
    private $true_filter = null;
    /**
     * The filter to apply to the input row if `predicate_filter` does not
     * return any results. If not provided, no results will be returned in the
     * false case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter false_filter = 3;</code>
     */
    private $false_filter = null;

    public function __construct() {
        \GPBMetadata\Google\Bigtable\V2\Data::initOnce();
        parent::__construct();
    }

    /**
     * If `predicate_filter` outputs any cells, then `true_filter` will be
     * evaluated on the input row. Otherwise, `false_filter` will be evaluated.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter predicate_filter = 1;</code>
     * @return \Google\Cloud\Bigtable\V2\RowFilter
     */
    public function getPredicateFilter()
    {
        return $this->predicate_filter;
    }

    /**
     * If `predicate_filter` outputs any cells, then `true_filter` will be
     * evaluated on the input row. Otherwise, `false_filter` will be evaluated.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter predicate_filter = 1;</code>
     * @param \Google\Cloud\Bigtable\V2\RowFilter $var
     * @return $this
     */
    public function setPredicateFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
        $this->predicate_filter = $var;

        return $this;
    }

    /**
     * The filter to apply to the input row if `predicate_filter` returns any
     * results. If not provided, no results will be returned in the true case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter true_filter = 2;</code>
     * @return \Google\Cloud\Bigtable\V2\RowFilter
     */
    public function getTrueFilter()
    {
        return $this->true_filter;
    }

    /**
     * The filter to apply to the input row if `predicate_filter` returns any
     * results. If not provided, no results will be returned in the true case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter true_filter = 2;</code>
     * @param \Google\Cloud\Bigtable\V2\RowFilter $var
     * @return $this
     */
    public function setTrueFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
        $this->true_filter = $var;

        return $this;
    }

    /**
     * The filter to apply to the input row if `predicate_filter` does not
     * return any results. If not provided, no results will be returned in the
     * false case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter false_filter = 3;</code>
     * @return \Google\Cloud\Bigtable\V2\RowFilter
     */
    public function getFalseFilter()
    {
        return $this->false_filter;
    }

    /**
     * The filter to apply to the input row if `predicate_filter` does not
     * return any results. If not provided, no results will be returned in the
     * false case.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.RowFilter false_filter = 3;</code>
     * @param \Google\Cloud\Bigtable\V2\RowFilter $var
     * @return $this
     */
    public function setFalseFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class);
        $this->false_filter = $var;

        return $this;
    }

}

