Operation class

The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to limitations in Apps Script. If the script function returns successfully, the response field will contain an ExecutionResponse object with the function's return value in the object's result field.

If the script function (or Apps Script itself) throws an exception, the error field will contain a Status object. The Status object's details field will contain an array with a single ExecutionError object that provides information about the nature of the error.

If the run call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.

Constructors

Operation()
Operation.fromJson(Map _json)

Properties

done bool
This field is not used.
read / write
error Status
If a run call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a Status object. The Status object's details field will contain an array with a single ExecutionError object that provides information about the nature of the error.
read / write
metadata Map<String, Object>
This field is not used. [...]
read / write
name String
This field is not used.
read / write
response Map<String, Object>
If the script function returns successfully, this field will contain an ExecutionResponse object with the function's return value as the object's result field. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

toJson() Map
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited