class Google::Apis::ScriptV1::Operation
A representation of an execution of an Apps Script function started with run. The execution response does not arrive until the function finishes executing. The maximum execution runtime is listed in the [Apps Script quotas guide](/ apps-script/guides/services/quotas#current_limitations). After execution has started, it can have one of four outcomes: - If the script function returns successfully, the response field contains 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 contains a Status
object. The `Status` object's `details` field contains an array with a single ExecutionError
object that provides information about the nature of the error. - If the execution has not yet completed, the done field is `false` and the neither the `response` nor `error` fields are present. - If the `run` call itself fails (for example, because of a malformed request or an authorization error), the method returns an HTTP response code in the 4XX range with a different format for the response body. Client libraries automatically convert a 4XX response into an exception class.
Attributes
This field indicates whether the script execution has completed. A completed execution has a populated `response` field containing the ExecutionResponse
from function that was executed. Corresponds to the JSON property `done` @return [Boolean]
This field indicates whether the script execution has completed. A completed execution has a populated `response` field containing the ExecutionResponse
from function that was executed. Corresponds to the JSON property `done` @return [Boolean]
If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains this `Status` object. Corresponds to the JSON property `error` @return [Google::Apis::ScriptV1::Status]
If the script function returns successfully, this field contains an ExecutionResponse
object with the function's return value. Corresponds to the JSON property `response` @return [Hash<String,Object>]
Public Class Methods
# File lib/google/apis/script_v1/classes.rb, line 901 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/script_v1/classes.rb, line 906 def update!(**args) @done = args[:done] if args.key?(:done) @error = args[:error] if args.key?(:error) @response = args[:response] if args.key?(:response) end