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

namespace Google\Cloud\Dialogflow\V2\Tool;

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

/**
 * A ConnectorTool enabling using Integration Connectors Connections as tools.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Tool.ConnectorTool</code>
 */
class ConnectorTool extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The full resource name of the referenced Integration Connectors
     * Connection. Format: 'projects/{@*}locations/{@*}connections/*'
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Required. Actions for the tool to use.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Tool.ConnectorTool.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $actions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The full resource name of the referenced Integration Connectors
     *           Connection. Format: 'projects/{@*}locations/{@*}connections/*'
     *     @type \Google\Cloud\Dialogflow\V2\Tool\ConnectorTool\Action[] $actions
     *           Required. Actions for the tool to use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Tool::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The full resource name of the referenced Integration Connectors
     * Connection. Format: 'projects/{@*}locations/{@*}connections/*'
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The full resource name of the referenced Integration Connectors
     * Connection. Format: 'projects/{@*}locations/{@*}connections/*'
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. Actions for the tool to use.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Tool.ConnectorTool.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\Tool\ConnectorTool\Action>
     */
    public function getActions()
    {
        return $this->actions;
    }

    /**
     * Required. Actions for the tool to use.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Tool.ConnectorTool.Action actions = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dialogflow\V2\Tool\ConnectorTool\Action[] $var
     * @return $this
     */
    public function setActions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Tool\ConnectorTool\Action::class);
        $this->actions = $arr;

        return $this;
    }

}

