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

namespace Google\Cloud\Functions\V1;

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

/**
 * Response of `CallFunction` method.
 *
 * Generated from protobuf message <code>google.cloud.functions.v1.CallFunctionResponse</code>
 */
class CallFunctionResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Execution id of function invocation.
     *
     * Generated from protobuf field <code>string execution_id = 1;</code>
     */
    private $execution_id = '';
    /**
     * Result populated for successful execution of synchronous function. Will
     * not be populated if function does not return a result through context.
     *
     * Generated from protobuf field <code>string result = 2;</code>
     */
    private $result = '';
    /**
     * Either system or user-function generated error. Set if execution
     * was not successful.
     *
     * Generated from protobuf field <code>string error = 3;</code>
     */
    private $error = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $execution_id
     *           Execution id of function invocation.
     *     @type string $result
     *           Result populated for successful execution of synchronous function. Will
     *           not be populated if function does not return a result through context.
     *     @type string $error
     *           Either system or user-function generated error. Set if execution
     *           was not successful.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Functions\V1\Functions::initOnce();
        parent::__construct($data);
    }

    /**
     * Execution id of function invocation.
     *
     * Generated from protobuf field <code>string execution_id = 1;</code>
     * @return string
     */
    public function getExecutionId()
    {
        return $this->execution_id;
    }

    /**
     * Execution id of function invocation.
     *
     * Generated from protobuf field <code>string execution_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setExecutionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->execution_id = $var;

        return $this;
    }

    /**
     * Result populated for successful execution of synchronous function. Will
     * not be populated if function does not return a result through context.
     *
     * Generated from protobuf field <code>string result = 2;</code>
     * @return string
     */
    public function getResult()
    {
        return $this->result;
    }

    /**
     * Result populated for successful execution of synchronous function. Will
     * not be populated if function does not return a result through context.
     *
     * Generated from protobuf field <code>string result = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkString($var, True);
        $this->result = $var;

        return $this;
    }

    /**
     * Either system or user-function generated error. Set if execution
     * was not successful.
     *
     * Generated from protobuf field <code>string error = 3;</code>
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * Either system or user-function generated error. Set if execution
     * was not successful.
     *
     * Generated from protobuf field <code>string error = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkString($var, True);
        $this->error = $var;

        return $this;
    }

}

