google-api-client 0.9.28 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -4
- data/CHANGELOG.md +10 -0
- data/api_names.yaml +36512 -36326
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +41 -41
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +13 -13
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +110 -110
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4.rb +3 -3
- data/generated/google/apis/analyticsreporting_v4/classes.rb +845 -845
- data/generated/google/apis/analyticsreporting_v4/representations.rb +184 -184
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +5 -5
- data/generated/google/apis/androidenterprise_v1/service.rb +3 -1
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +22 -25
- data/generated/google/apis/classroom_v1/classes.rb +998 -907
- data/generated/google/apis/classroom_v1/representations.rb +240 -240
- data/generated/google/apis/classroom_v1/service.rb +1269 -1061
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +322 -322
- data/generated/google/apis/cloudbuild_v1/representations.rb +88 -88
- data/generated/google/apis/cloudbuild_v1/service.rb +57 -57
- data/generated/google/apis/clouddebugger_v2.rb +4 -4
- data/generated/google/apis/clouddebugger_v2/classes.rb +311 -311
- data/generated/google/apis/clouddebugger_v2/representations.rb +92 -92
- data/generated/google/apis/clouddebugger_v2/service.rb +41 -41
- data/generated/google/apis/cloudkms_v1beta1.rb +1 -1
- data/generated/google/apis/cloudkms_v1beta1/classes.rb +611 -611
- data/generated/google/apis/cloudkms_v1beta1/representations.rb +124 -124
- data/generated/google/apis/cloudkms_v1beta1/service.rb +254 -248
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +116 -116
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +28 -28
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +257 -257
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +394 -394
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +79 -79
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +269 -269
- data/generated/google/apis/cloudtrace_v1.rb +8 -8
- data/generated/google/apis/cloudtrace_v1/classes.rb +90 -84
- data/generated/google/apis/cloudtrace_v1/representations.rb +22 -22
- data/generated/google/apis/cloudtrace_v1/service.rb +40 -35
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +406 -31
- data/generated/google/apis/compute_beta/representations.rb +154 -0
- data/generated/google/apis/compute_beta/service.rb +262 -9
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +17 -20
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +3226 -2847
- data/generated/google/apis/dataflow_v1b3/representations.rb +825 -677
- data/generated/google/apis/dataflow_v1b3/service.rb +175 -175
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +1213 -1136
- data/generated/google/apis/dataproc_v1/representations.rb +262 -244
- data/generated/google/apis/dataproc_v1/service.rb +298 -243
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +728 -728
- data/generated/google/apis/datastore_v1/representations.rb +167 -167
- data/generated/google/apis/datastore_v1/service.rb +68 -68
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +932 -932
- data/generated/google/apis/genomics_v1/representations.rb +205 -205
- data/generated/google/apis/genomics_v1/service.rb +1228 -1228
- data/generated/google/apis/gmail_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +440 -440
- data/generated/google/apis/iam_v1/representations.rb +94 -94
- data/generated/google/apis/iam_v1/service.rb +60 -60
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +21 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
- data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
- data/generated/google/apis/kgsearch_v1/service.rb +21 -21
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +232 -232
- data/generated/google/apis/language_v1beta1/representations.rb +75 -75
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +345 -337
- data/generated/google/apis/logging_v2beta1/representations.rb +55 -55
- data/generated/google/apis/logging_v2beta1/service.rb +331 -306
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +253 -253
- data/generated/google/apis/monitoring_v3/representations.rb +58 -58
- data/generated/google/apis/monitoring_v3/service.rb +135 -135
- data/generated/google/apis/people_v1.rb +15 -16
- data/generated/google/apis/people_v1/classes.rb +985 -855
- data/generated/google/apis/people_v1/representations.rb +227 -220
- data/generated/google/apis/people_v1/service.rb +58 -52
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +257 -257
- data/generated/google/apis/pubsub_v1/representations.rb +83 -83
- data/generated/google/apis/pubsub_v1/service.rb +390 -390
- data/generated/google/apis/script_v1.rb +17 -17
- data/generated/google/apis/script_v1/classes.rb +149 -141
- data/generated/google/apis/script_v1/representations.rb +26 -27
- data/generated/google/apis/script_v1/service.rb +9 -8
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +4223 -4188
- data/generated/google/apis/sheets_v4/representations.rb +850 -834
- data/generated/google/apis/sheets_v4/service.rb +192 -192
- data/generated/google/apis/slides_v1.rb +1 -1
- data/generated/google/apis/slides_v1/classes.rb +927 -800
- data/generated/google/apis/slides_v1/representations.rb +253 -211
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +94 -107
- data/generated/google/apis/speech_v1beta1/representations.rb +24 -36
- data/generated/google/apis/speech_v1beta1/service.rb +51 -54
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +888 -885
- data/generated/google/apis/vision_v1/representations.rb +139 -139
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/service.rb +5 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1/classes.rb +80 -80
- data/generated/google/apis/youtubereporting_v1/representations.rb +23 -23
- data/generated/google/apis/youtubereporting_v1/service.rb +51 -51
- data/google-api-client.gemspec +2 -2
- data/lib/google/apis/core/api_command.rb +1 -1
- data/lib/google/apis/core/json_representation.rb +2 -2
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/you_tube.rb +4 -1
- metadata +36 -30
@@ -25,16 +25,16 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/apps-script/execution/rest/v1/scripts/run
|
26
26
|
module ScriptV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170209'
|
29
29
|
|
30
|
-
# View and manage your
|
31
|
-
|
30
|
+
# View and manage the files in your Google Drive
|
31
|
+
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
32
32
|
|
33
|
-
#
|
34
|
-
|
33
|
+
# View and manage your spreadsheets in Google Drive
|
34
|
+
AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
|
35
35
|
|
36
|
-
#
|
37
|
-
|
36
|
+
# View and manage your mail
|
37
|
+
AUTH_SCOPE = 'https://mail.google.com/'
|
38
38
|
|
39
39
|
# View and manage the provisioning of groups on your domain
|
40
40
|
AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group'
|
@@ -42,23 +42,23 @@ module Google
|
|
42
42
|
# View and manage the provisioning of users on your domain
|
43
43
|
AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
|
44
44
|
|
45
|
-
# View and manage the files in your Google Drive
|
46
|
-
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
47
|
-
|
48
45
|
# View and manage your forms in Google Drive
|
49
46
|
AUTH_FORMS = 'https://www.googleapis.com/auth/forms'
|
50
47
|
|
51
|
-
#
|
52
|
-
|
48
|
+
# Manage your contacts
|
49
|
+
M8_FEEDS = 'https://www.google.com/m8/feeds'
|
50
|
+
|
51
|
+
# View your email address
|
52
|
+
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
53
|
+
|
54
|
+
# Manage your calendars
|
55
|
+
CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds'
|
53
56
|
|
54
57
|
# View and manage your Google Groups
|
55
58
|
AUTH_GROUPS = 'https://www.googleapis.com/auth/groups'
|
56
59
|
|
57
|
-
# View and manage
|
58
|
-
|
59
|
-
|
60
|
-
# View your email address
|
61
|
-
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
60
|
+
# View and manage forms that this application has been installed in
|
61
|
+
AUTH_FORMS_CURRENTONLY = 'https://www.googleapis.com/auth/forms.currentonly'
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
@@ -22,39 +22,19 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module ScriptV1
|
24
24
|
|
25
|
-
# A
|
26
|
-
|
27
|
-
# based on the implementation of the script.
|
28
|
-
class ExecutionRequest
|
25
|
+
# A stack trace through the script that shows where the execution failed.
|
26
|
+
class ScriptStackTraceElement
|
29
27
|
include Google::Apis::Core::Hashable
|
30
28
|
|
31
|
-
# The name of the function
|
32
|
-
# include parentheses or parameters.
|
29
|
+
# The name of the function that failed.
|
33
30
|
# Corresponds to the JSON property `function`
|
34
31
|
# @return [String]
|
35
32
|
attr_accessor :function
|
36
33
|
|
37
|
-
# The
|
38
|
-
#
|
39
|
-
#
|
40
|
-
|
41
|
-
# boolean`. Optional.
|
42
|
-
# Corresponds to the JSON property `parameters`
|
43
|
-
# @return [Array<Object>]
|
44
|
-
attr_accessor :parameters
|
45
|
-
|
46
|
-
# This field is not used.
|
47
|
-
# Corresponds to the JSON property `sessionState`
|
48
|
-
# @return [String]
|
49
|
-
attr_accessor :session_state
|
50
|
-
|
51
|
-
# If `true` and the user is an owner of the script, the script runs at the most
|
52
|
-
# recently saved version rather than the version deployed for use with the
|
53
|
-
# Execution API. Optional; default is `false`.
|
54
|
-
# Corresponds to the JSON property `devMode`
|
55
|
-
# @return [Boolean]
|
56
|
-
attr_accessor :dev_mode
|
57
|
-
alias_method :dev_mode?, :dev_mode
|
34
|
+
# The line number where the script failed.
|
35
|
+
# Corresponds to the JSON property `lineNumber`
|
36
|
+
# @return [Fixnum]
|
37
|
+
attr_accessor :line_number
|
58
38
|
|
59
39
|
def initialize(**args)
|
60
40
|
update!(**args)
|
@@ -63,58 +43,37 @@ module Google
|
|
63
43
|
# Update properties of this object
|
64
44
|
def update!(**args)
|
65
45
|
@function = args[:function] if args.key?(:function)
|
66
|
-
@
|
67
|
-
@session_state = args[:session_state] if args.key?(:session_state)
|
68
|
-
@dev_mode = args[:dev_mode] if args.key?(:dev_mode)
|
46
|
+
@line_number = args[:line_number] if args.key?(:line_number)
|
69
47
|
end
|
70
48
|
end
|
71
49
|
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
# `
|
78
|
-
#
|
79
|
-
|
80
|
-
# will contain an array with a single `ExecutionError` object that provides
|
81
|
-
# information about the nature of the error.
|
82
|
-
# If the `run` call itself fails (for example, because of a malformed request or
|
83
|
-
# an authorization error), the method will return an HTTP response code in the
|
84
|
-
# 4XX range with a different format for the response body. Client libraries will
|
85
|
-
# automatically convert a 4XX response into an exception class.
|
86
|
-
class Operation
|
50
|
+
# An object that provides information about the nature of an error in the Apps
|
51
|
+
# Script Execution API. If an
|
52
|
+
# `run` call succeeds but the
|
53
|
+
# script function (or Apps Script itself) throws an exception, the response
|
54
|
+
# body's `error` field contains a
|
55
|
+
# `Status` object. The `Status` object's `details` field
|
56
|
+
# contains an array with a single one of these `ExecutionError` objects.
|
57
|
+
class ExecutionError
|
87
58
|
include Google::Apis::Core::Hashable
|
88
59
|
|
89
|
-
#
|
90
|
-
#
|
60
|
+
# The error type, for example `TypeError` or `ReferenceError`. If the error
|
61
|
+
# type is unavailable, this field is not included.
|
62
|
+
# Corresponds to the JSON property `errorType`
|
91
63
|
# @return [String]
|
92
|
-
attr_accessor :
|
93
|
-
|
94
|
-
# This field is not used.
|
95
|
-
# Corresponds to the JSON property `metadata`
|
96
|
-
# @return [Hash<String,Object>]
|
97
|
-
attr_accessor :metadata
|
98
|
-
|
99
|
-
# This field is not used.
|
100
|
-
# Corresponds to the JSON property `done`
|
101
|
-
# @return [Boolean]
|
102
|
-
attr_accessor :done
|
103
|
-
alias_method :done?, :done
|
64
|
+
attr_accessor :error_type
|
104
65
|
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
|
110
|
-
attr_accessor :error
|
66
|
+
# The error message thrown by Apps Script, usually localized into the user's
|
67
|
+
# language.
|
68
|
+
# Corresponds to the JSON property `errorMessage`
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :error_message
|
111
71
|
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
|
117
|
-
attr_accessor :response
|
72
|
+
# An array of objects that provide a stack trace through the script to show
|
73
|
+
# where the execution failed, with the deepest call first.
|
74
|
+
# Corresponds to the JSON property `scriptStackTraceElements`
|
75
|
+
# @return [Array<Google::Apis::ScriptV1::ScriptStackTraceElement>]
|
76
|
+
attr_accessor :script_stack_trace_elements
|
118
77
|
|
119
78
|
def initialize(**args)
|
120
79
|
update!(**args)
|
@@ -122,11 +81,9 @@ module Google
|
|
122
81
|
|
123
82
|
# Update properties of this object
|
124
83
|
def update!(**args)
|
125
|
-
@
|
126
|
-
@
|
127
|
-
@
|
128
|
-
@error = args[:error] if args.key?(:error)
|
129
|
-
@response = args[:response] if args.key?(:response)
|
84
|
+
@error_type = args[:error_type] if args.key?(:error_type)
|
85
|
+
@error_message = args[:error_message] if args.key?(:error_message)
|
86
|
+
@script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements)
|
130
87
|
end
|
131
88
|
end
|
132
89
|
|
@@ -136,61 +93,79 @@ module Google
|
|
136
93
|
class Status
|
137
94
|
include Google::Apis::Core::Hashable
|
138
95
|
|
139
|
-
#
|
96
|
+
# An array that contains a single `ExecutionError` object that provides
|
97
|
+
# information about the nature of the error.
|
98
|
+
# Corresponds to the JSON property `details`
|
99
|
+
# @return [Array<Hash<String,Object>>]
|
100
|
+
attr_accessor :details
|
101
|
+
|
102
|
+
# The status code. For this API, this value will always be 3, corresponding to
|
103
|
+
# an INVALID_ARGUMENT error.
|
140
104
|
# Corresponds to the JSON property `code`
|
141
105
|
# @return [Fixnum]
|
142
106
|
attr_accessor :code
|
143
107
|
|
144
|
-
# A developer-facing error message, which
|
145
|
-
#
|
146
|
-
# field, or localized by the client.
|
108
|
+
# A developer-facing error message, which is in English. Any user-facing error
|
109
|
+
# message is localized and sent in the [`google.rpc.Status.details`](google.rpc.
|
110
|
+
# Status.details) field, or localized by the client.
|
147
111
|
# Corresponds to the JSON property `message`
|
148
112
|
# @return [String]
|
149
113
|
attr_accessor :message
|
150
114
|
|
151
|
-
# An array that contains a single `ExecutionError` object that provides
|
152
|
-
# information about the nature of the error.
|
153
|
-
# Corresponds to the JSON property `details`
|
154
|
-
# @return [Array<Hash<String,Object>>]
|
155
|
-
attr_accessor :details
|
156
|
-
|
157
115
|
def initialize(**args)
|
158
116
|
update!(**args)
|
159
117
|
end
|
160
118
|
|
161
119
|
# Update properties of this object
|
162
120
|
def update!(**args)
|
121
|
+
@details = args[:details] if args.key?(:details)
|
163
122
|
@code = args[:code] if args.key?(:code)
|
164
123
|
@message = args[:message] if args.key?(:message)
|
165
|
-
@details = args[:details] if args.key?(:details)
|
166
124
|
end
|
167
125
|
end
|
168
126
|
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
|
173
|
-
# contain an array with a single one of these `ExecutionError` objects.
|
174
|
-
class ExecutionError
|
127
|
+
# A request to run the function in a script. The script is identified by the
|
128
|
+
# specified `script_id`. Executing a function on a script returns results
|
129
|
+
# based on the implementation of the script.
|
130
|
+
class ExecutionRequest
|
175
131
|
include Google::Apis::Core::Hashable
|
176
132
|
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
|
182
|
-
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
133
|
+
# For Android add-ons only. An ID that represents the user's current session
|
134
|
+
# in the Android app for Google Docs or Sheets, included as extra data in the
|
135
|
+
# [`Intent`](https://developer.android.com/guide/components/intents-filters.html)
|
136
|
+
# that launches the add-on. When an Android add-on is run with a session
|
137
|
+
# state, it gains the privileges of a
|
138
|
+
# [bound](https://developers.google.com/apps-script/guides/bound) script —
|
139
|
+
# that is, it can access information like the user's current cursor position
|
140
|
+
# (in Docs) or selected cell (in Sheets). To retrieve the state, call
|
141
|
+
# `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`.
|
142
|
+
# Optional.
|
143
|
+
# Corresponds to the JSON property `sessionState`
|
186
144
|
# @return [String]
|
187
|
-
attr_accessor :
|
145
|
+
attr_accessor :session_state
|
188
146
|
|
189
|
-
# The
|
190
|
-
#
|
191
|
-
# Corresponds to the JSON property `
|
147
|
+
# The name of the function to execute in the given script. The name does not
|
148
|
+
# include parentheses or parameters.
|
149
|
+
# Corresponds to the JSON property `function`
|
192
150
|
# @return [String]
|
193
|
-
attr_accessor :
|
151
|
+
attr_accessor :function
|
152
|
+
|
153
|
+
# If `true` and the user is an owner of the script, the script runs at the
|
154
|
+
# most recently saved version rather than the version deployed for use with
|
155
|
+
# the Execution API. Optional; default is `false`.
|
156
|
+
# Corresponds to the JSON property `devMode`
|
157
|
+
# @return [Boolean]
|
158
|
+
attr_accessor :dev_mode
|
159
|
+
alias_method :dev_mode?, :dev_mode
|
160
|
+
|
161
|
+
# The parameters to be passed to the function being executed. The object type
|
162
|
+
# for each parameter should match the expected type in Apps Script.
|
163
|
+
# Parameters cannot be Apps Script-specific object types (such as a
|
164
|
+
# `Document` or a `Calendar`); they can only be primitive types such as
|
165
|
+
# `string`, `number`, `array`, `object`, or `boolean`. Optional.
|
166
|
+
# Corresponds to the JSON property `parameters`
|
167
|
+
# @return [Array<Object>]
|
168
|
+
attr_accessor :parameters
|
194
169
|
|
195
170
|
def initialize(**args)
|
196
171
|
update!(**args)
|
@@ -198,25 +173,30 @@ module Google
|
|
198
173
|
|
199
174
|
# Update properties of this object
|
200
175
|
def update!(**args)
|
201
|
-
@
|
202
|
-
@
|
203
|
-
@
|
176
|
+
@session_state = args[:session_state] if args.key?(:session_state)
|
177
|
+
@function = args[:function] if args.key?(:function)
|
178
|
+
@dev_mode = args[:dev_mode] if args.key?(:dev_mode)
|
179
|
+
@parameters = args[:parameters] if args.key?(:parameters)
|
204
180
|
end
|
205
181
|
end
|
206
182
|
|
207
|
-
#
|
208
|
-
|
183
|
+
# An object that provides the return value of a function executed through the
|
184
|
+
# Apps Script Execution API. If a
|
185
|
+
# `run` call succeeds and the
|
186
|
+
# script function returns successfully, the response body's
|
187
|
+
# `response` field contains this
|
188
|
+
# `ExecutionResponse` object.
|
189
|
+
class ExecutionResponse
|
209
190
|
include Google::Apis::Core::Hashable
|
210
191
|
|
211
|
-
# The
|
212
|
-
#
|
213
|
-
#
|
214
|
-
|
215
|
-
|
216
|
-
#
|
217
|
-
#
|
218
|
-
|
219
|
-
attr_accessor :line_number
|
192
|
+
# The return value of the script function. The type matches the object type
|
193
|
+
# returned in Apps Script. Functions called through the Execution API cannot
|
194
|
+
# return Apps Script-specific objects (such as a `Document` or a `Calendar`);
|
195
|
+
# they can only return primitive types such as a `string`, `number`, `array`,
|
196
|
+
# `object`, or `boolean`.
|
197
|
+
# Corresponds to the JSON property `result`
|
198
|
+
# @return [Object]
|
199
|
+
attr_accessor :result
|
220
200
|
|
221
201
|
def initialize(**args)
|
222
202
|
update!(**args)
|
@@ -224,31 +204,56 @@ module Google
|
|
224
204
|
|
225
205
|
# Update properties of this object
|
226
206
|
def update!(**args)
|
227
|
-
@
|
228
|
-
@line_number = args[:line_number] if args.key?(:line_number)
|
207
|
+
@result = args[:result] if args.key?(:result)
|
229
208
|
end
|
230
209
|
end
|
231
210
|
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
|
211
|
+
# The response will not arrive until the function finishes executing. The
|
212
|
+
# maximum runtime is listed in the guide to [limitations in Apps Script](https://
|
213
|
+
# developers.google.com/apps-script/guides/services/quotas#current_limitations).
|
214
|
+
# <p>If the script function returns successfully, the `response` field will
|
215
|
+
# contain an `ExecutionResponse` object with the function's return value in the
|
216
|
+
# object's `result` field.</p>
|
217
|
+
# <p>If the script function (or Apps Script itself) throws an exception, the `
|
218
|
+
# error` field will contain a `Status` object. The `Status` object's `details`
|
219
|
+
# field will contain an array with a single `ExecutionError` object that
|
220
|
+
# provides information about the nature of the error.</p>
|
221
|
+
# <p>If the `run` call itself fails (for example, because of a malformed request
|
222
|
+
# or an authorization error), the method will return an HTTP response code in
|
223
|
+
# the 4XX range with a different format for the response body. Client libraries
|
224
|
+
# will automatically convert a 4XX response into an exception class.</p>
|
225
|
+
class Operation
|
237
226
|
include Google::Apis::Core::Hashable
|
238
227
|
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
|
245
|
-
# @return [Object]
|
246
|
-
attr_accessor :result
|
228
|
+
# If the script function returns successfully, this field will contain an `
|
229
|
+
# ExecutionResponse` object with the function's return value as the object's `
|
230
|
+
# result` field.
|
231
|
+
# Corresponds to the JSON property `response`
|
232
|
+
# @return [Hash<String,Object>]
|
233
|
+
attr_accessor :response
|
247
234
|
|
248
|
-
#
|
249
|
-
# Corresponds to the JSON property `
|
235
|
+
# This field is not used.
|
236
|
+
# Corresponds to the JSON property `name`
|
250
237
|
# @return [String]
|
251
|
-
attr_accessor :
|
238
|
+
attr_accessor :name
|
239
|
+
|
240
|
+
# If a `run` call succeeds but the script function (or Apps Script itself)
|
241
|
+
# throws an exception, the response body's `error` field will contain this `
|
242
|
+
# Status` object.
|
243
|
+
# Corresponds to the JSON property `error`
|
244
|
+
# @return [Google::Apis::ScriptV1::Status]
|
245
|
+
attr_accessor :error
|
246
|
+
|
247
|
+
# This field is not used.
|
248
|
+
# Corresponds to the JSON property `metadata`
|
249
|
+
# @return [Hash<String,Object>]
|
250
|
+
attr_accessor :metadata
|
251
|
+
|
252
|
+
# This field is not used.
|
253
|
+
# Corresponds to the JSON property `done`
|
254
|
+
# @return [Boolean]
|
255
|
+
attr_accessor :done
|
256
|
+
alias_method :done?, :done
|
252
257
|
|
253
258
|
def initialize(**args)
|
254
259
|
update!(**args)
|
@@ -256,8 +261,11 @@ module Google
|
|
256
261
|
|
257
262
|
# Update properties of this object
|
258
263
|
def update!(**args)
|
259
|
-
@
|
260
|
-
@
|
264
|
+
@response = args[:response] if args.key?(:response)
|
265
|
+
@name = args[:name] if args.key?(:name)
|
266
|
+
@error = args[:error] if args.key?(:error)
|
267
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
268
|
+
@done = args[:done] if args.key?(:done)
|
261
269
|
end
|
262
270
|
end
|
263
271
|
end
|
@@ -22,13 +22,13 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module ScriptV1
|
24
24
|
|
25
|
-
class
|
25
|
+
class ScriptStackTraceElement
|
26
26
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
27
|
|
28
28
|
include Google::Apis::Core::JsonObjectSupport
|
29
29
|
end
|
30
30
|
|
31
|
-
class
|
31
|
+
class ExecutionError
|
32
32
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
33
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
@@ -40,78 +40,77 @@ module Google
|
|
40
40
|
include Google::Apis::Core::JsonObjectSupport
|
41
41
|
end
|
42
42
|
|
43
|
-
class
|
43
|
+
class ExecutionRequest
|
44
44
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
45
|
|
46
46
|
include Google::Apis::Core::JsonObjectSupport
|
47
47
|
end
|
48
48
|
|
49
|
-
class
|
49
|
+
class ExecutionResponse
|
50
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
51
|
|
52
52
|
include Google::Apis::Core::JsonObjectSupport
|
53
53
|
end
|
54
54
|
|
55
|
-
class
|
55
|
+
class Operation
|
56
56
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
57
|
|
58
58
|
include Google::Apis::Core::JsonObjectSupport
|
59
59
|
end
|
60
60
|
|
61
|
-
class
|
61
|
+
class ScriptStackTraceElement
|
62
62
|
# @private
|
63
63
|
class Representation < Google::Apis::Core::JsonRepresentation
|
64
64
|
property :function, as: 'function'
|
65
|
-
|
66
|
-
property :session_state, as: 'sessionState'
|
67
|
-
property :dev_mode, as: 'devMode'
|
65
|
+
property :line_number, as: 'lineNumber'
|
68
66
|
end
|
69
67
|
end
|
70
68
|
|
71
|
-
class
|
69
|
+
class ExecutionError
|
72
70
|
# @private
|
73
71
|
class Representation < Google::Apis::Core::JsonRepresentation
|
74
|
-
property :
|
75
|
-
|
76
|
-
|
77
|
-
property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
|
72
|
+
property :error_type, as: 'errorType'
|
73
|
+
property :error_message, as: 'errorMessage'
|
74
|
+
collection :script_stack_trace_elements, as: 'scriptStackTraceElements', class: Google::Apis::ScriptV1::ScriptStackTraceElement, decorator: Google::Apis::ScriptV1::ScriptStackTraceElement::Representation
|
78
75
|
|
79
|
-
hash :response, as: 'response'
|
80
76
|
end
|
81
77
|
end
|
82
78
|
|
83
79
|
class Status
|
84
80
|
# @private
|
85
81
|
class Representation < Google::Apis::Core::JsonRepresentation
|
82
|
+
collection :details, as: 'details'
|
86
83
|
property :code, as: 'code'
|
87
84
|
property :message, as: 'message'
|
88
|
-
collection :details, as: 'details'
|
89
85
|
end
|
90
86
|
end
|
91
87
|
|
92
|
-
class
|
88
|
+
class ExecutionRequest
|
93
89
|
# @private
|
94
90
|
class Representation < Google::Apis::Core::JsonRepresentation
|
95
|
-
|
96
|
-
|
97
|
-
property :
|
98
|
-
|
91
|
+
property :session_state, as: 'sessionState'
|
92
|
+
property :function, as: 'function'
|
93
|
+
property :dev_mode, as: 'devMode'
|
94
|
+
collection :parameters, as: 'parameters'
|
99
95
|
end
|
100
96
|
end
|
101
97
|
|
102
|
-
class
|
98
|
+
class ExecutionResponse
|
103
99
|
# @private
|
104
100
|
class Representation < Google::Apis::Core::JsonRepresentation
|
105
|
-
property :
|
106
|
-
property :line_number, as: 'lineNumber'
|
101
|
+
property :result, as: 'result'
|
107
102
|
end
|
108
103
|
end
|
109
104
|
|
110
|
-
class
|
105
|
+
class Operation
|
111
106
|
# @private
|
112
107
|
class Representation < Google::Apis::Core::JsonRepresentation
|
113
|
-
|
114
|
-
property :
|
108
|
+
hash :response, as: 'response'
|
109
|
+
property :name, as: 'name'
|
110
|
+
property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
|
111
|
+
|
112
|
+
hash :metadata, as: 'metadata'
|
113
|
+
property :done, as: 'done'
|
115
114
|
end
|
116
115
|
end
|
117
116
|
end
|