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

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

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

/**
 * Generated from protobuf message <code>couchbase.internal.hooks.v1.HookAction.If</code>
 */
class PBIf extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookCondition cond = 1;</code>
     */
    private $cond;
    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction match = 2;</code>
     */
    private $match;
    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction no_match = 3;</code>
     */
    private $no_match;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookCondition>|\Google\Protobuf\Internal\RepeatedField $cond
     *     @type array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction>|\Google\Protobuf\Internal\RepeatedField $match
     *     @type array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction>|\Google\Protobuf\Internal\RepeatedField $no_match
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Internal\Hooks\V1\Hooks::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookCondition cond = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCond()
    {
        return $this->cond;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookCondition cond = 1;</code>
     * @param array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookCondition>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCond($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookCondition::class);
        $this->cond = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction match = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMatch()
    {
        return $this->match;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction match = 2;</code>
     * @param array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMatch($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction::class);
        $this->match = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction no_match = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNoMatch()
    {
        return $this->no_match;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction no_match = 3;</code>
     * @param array<\Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNoMatch($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction::class);
        $this->no_match = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PBIf::class, \Couchbase\Protostellar\Generated\Internal\Hooks\V1\HookAction_If::class);

