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

namespace Google\Cloud\Dialogflow\V2\ToolCallResult;

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

/**
 * An error produced by the tool call.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.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\V2\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;
    }

}

