<?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.Hook</code>
 */
class Hook extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>string description = 2;</code>
     */
    protected $description = '';
    /**
     * Generated from protobuf field <code>string target_method = 3;</code>
     */
    protected $target_method = '';
    /**
     * Generated from protobuf field <code>repeated .couchbase.internal.hooks.v1.HookAction actions = 4;</code>
     */
    private $actions;

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

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Generated from protobuf field <code>string description = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string target_method = 3;</code>
     * @return string
     */
    public function getTargetMethod()
    {
        return $this->target_method;
    }

    /**
     * Generated from protobuf field <code>string target_method = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetMethod($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_method = $var;

        return $this;
    }

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

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

        return $this;
    }

}

