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

namespace Google\Cloud\Dialogflow\Cx\V3\ToolCallResult;

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

/**
 * An error produced by the tool call.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.ToolCallResult.Error</code>
 */
class Error extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The error message of the function.
     *
     * Generated from protobuf field <code>string message = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $message
     *           Optional. The error message of the function.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\ToolCall::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The error message of the function.
     *
     * Generated from protobuf field <code>string message = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Optional. The error message of the function.
     *
     * Generated from protobuf field <code>string message = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->message = $var;

        return $this;
    }

}


