<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: couchbase/internal/hooks/v1/hooks.proto

namespace Couchbase\Protostellar\Generated\Internal\Hooks\V1;

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

/**
 * Generated from protobuf message <code>couchbase.internal.hooks.v1.HookCondition</code>
 */
class HookCondition extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef left = 1;</code>
     */
    protected $left = null;
    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ComparisonOperator op = 2;</code>
     */
    protected $op = 0;
    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef right = 3;</code>
     */
    protected $right = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef $left
     *     @type int $op
     *     @type \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef $right
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Internal\Hooks\V1\Hooks::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef left = 1;</code>
     * @return \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef|null
     */
    public function getLeft()
    {
        return $this->left;
    }

    public function hasLeft()
    {
        return isset($this->left);
    }

    public function clearLeft()
    {
        unset($this->left);
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef left = 1;</code>
     * @param \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef $var
     * @return $this
     */
    public function setLeft($var)
    {
        GPBUtil::checkMessage($var, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef::class);
        $this->left = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ComparisonOperator op = 2;</code>
     * @return int
     */
    public function getOp()
    {
        return $this->op;
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ComparisonOperator op = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setOp($var)
    {
        GPBUtil::checkEnum($var, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ComparisonOperator::class);
        $this->op = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef right = 3;</code>
     * @return \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef|null
     */
    public function getRight()
    {
        return $this->right;
    }

    public function hasRight()
    {
        return isset($this->right);
    }

    public function clearRight()
    {
        unset($this->right);
    }

    /**
     * Generated from protobuf field <code>.couchbase.internal.hooks.v1.ValueRef right = 3;</code>
     * @param \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef $var
     * @return $this
     */
    public function setRight($var)
    {
        GPBUtil::checkMessage($var, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\ValueRef::class);
        $this->right = $var;

        return $this;
    }

}

