Class: Google::Apis::ScriptV1::Operation
- Inherits:
-
Object
- Object
- Google::Apis::ScriptV1::Operation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/script_v1/classes.rb,
generated/google/apis/script_v1/representations.rb,
generated/google/apis/script_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#done ⇒ Boolean
(also: #done?)
This field is not used.
-
#error ⇒ Google::Apis::ScriptV1::Status
If a
runcall succeeds but the script function (or Apps Script itself) throws an exception, the response body'serrorfield will contain thisStatusobject. -
#metadata ⇒ Hash<String,Object>
This field is not used.
-
#name ⇒ String
This field is not used.
-
#response ⇒ Hash<String,Object>
If the script function returns successfully, this field will contain an
ExecutionResponseobject with the function's return value as the object'sresultfield.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Operation
constructor
A new instance of Operation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Operation
Returns a new instance of Operation
72 73 74 |
# File 'generated/google/apis/script_v1/classes.rb', line 72 def initialize(**args) update!(**args) end |
Instance Attribute Details
#done ⇒ Boolean Also known as: done?
This field is not used.
Corresponds to the JSON property done
69 70 71 |
# File 'generated/google/apis/script_v1/classes.rb', line 69 def done @done end |
#error ⇒ Google::Apis::ScriptV1::Status
If a run call succeeds but the script function (or Apps Script itself)
throws an exception, the response body's error field will contain this
Status object.
Corresponds to the JSON property error
59 60 61 |
# File 'generated/google/apis/script_v1/classes.rb', line 59 def error @error end |
#metadata ⇒ Hash<String,Object>
This field is not used.
Corresponds to the JSON property metadata
64 65 66 |
# File 'generated/google/apis/script_v1/classes.rb', line 64 def @metadata end |
#name ⇒ String
This field is not used.
Corresponds to the JSON property name
52 53 54 |
# File 'generated/google/apis/script_v1/classes.rb', line 52 def name @name end |
#response ⇒ Hash<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.
Corresponds to the JSON property response
47 48 49 |
# File 'generated/google/apis/script_v1/classes.rb', line 47 def response @response end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
77 78 79 80 81 82 83 |
# File 'generated/google/apis/script_v1/classes.rb', line 77 def update!(**args) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) @done = args[:done] if args.key?(:done) end |