google-api-client 0.9.28 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -4
  3. data/CHANGELOG.md +10 -0
  4. data/api_names.yaml +36512 -36326
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +41 -41
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +13 -13
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +110 -110
  9. data/generated/google/apis/adsense_v1_4.rb +1 -1
  10. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  11. data/generated/google/apis/analyticsreporting_v4.rb +3 -3
  12. data/generated/google/apis/analyticsreporting_v4/classes.rb +845 -845
  13. data/generated/google/apis/analyticsreporting_v4/representations.rb +184 -184
  14. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  15. data/generated/google/apis/androidenterprise_v1/classes.rb +5 -5
  16. data/generated/google/apis/androidenterprise_v1/service.rb +3 -1
  17. data/generated/google/apis/appstate_v1.rb +1 -1
  18. data/generated/google/apis/calendar_v3.rb +1 -1
  19. data/generated/google/apis/classroom_v1.rb +22 -25
  20. data/generated/google/apis/classroom_v1/classes.rb +998 -907
  21. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  22. data/generated/google/apis/classroom_v1/service.rb +1269 -1061
  23. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  24. data/generated/google/apis/cloudbuild_v1/classes.rb +322 -322
  25. data/generated/google/apis/cloudbuild_v1/representations.rb +88 -88
  26. data/generated/google/apis/cloudbuild_v1/service.rb +57 -57
  27. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  28. data/generated/google/apis/clouddebugger_v2/classes.rb +311 -311
  29. data/generated/google/apis/clouddebugger_v2/representations.rb +92 -92
  30. data/generated/google/apis/clouddebugger_v2/service.rb +41 -41
  31. data/generated/google/apis/cloudkms_v1beta1.rb +1 -1
  32. data/generated/google/apis/cloudkms_v1beta1/classes.rb +611 -611
  33. data/generated/google/apis/cloudkms_v1beta1/representations.rb +124 -124
  34. data/generated/google/apis/cloudkms_v1beta1/service.rb +254 -248
  35. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  36. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +116 -116
  37. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +28 -28
  38. data/generated/google/apis/cloudresourcemanager_v1/service.rb +257 -257
  39. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  40. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +394 -394
  41. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +79 -79
  42. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +269 -269
  43. data/generated/google/apis/cloudtrace_v1.rb +8 -8
  44. data/generated/google/apis/cloudtrace_v1/classes.rb +90 -84
  45. data/generated/google/apis/cloudtrace_v1/representations.rb +22 -22
  46. data/generated/google/apis/cloudtrace_v1/service.rb +40 -35
  47. data/generated/google/apis/compute_beta.rb +1 -1
  48. data/generated/google/apis/compute_beta/classes.rb +406 -31
  49. data/generated/google/apis/compute_beta/representations.rb +154 -0
  50. data/generated/google/apis/compute_beta/service.rb +262 -9
  51. data/generated/google/apis/compute_v1.rb +1 -1
  52. data/generated/google/apis/compute_v1/classes.rb +17 -20
  53. data/generated/google/apis/content_v2.rb +1 -1
  54. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  55. data/generated/google/apis/dataflow_v1b3/classes.rb +3226 -2847
  56. data/generated/google/apis/dataflow_v1b3/representations.rb +825 -677
  57. data/generated/google/apis/dataflow_v1b3/service.rb +175 -175
  58. data/generated/google/apis/dataproc_v1.rb +2 -2
  59. data/generated/google/apis/dataproc_v1/classes.rb +1213 -1136
  60. data/generated/google/apis/dataproc_v1/representations.rb +262 -244
  61. data/generated/google/apis/dataproc_v1/service.rb +298 -243
  62. data/generated/google/apis/datastore_v1.rb +4 -4
  63. data/generated/google/apis/datastore_v1/classes.rb +728 -728
  64. data/generated/google/apis/datastore_v1/representations.rb +167 -167
  65. data/generated/google/apis/datastore_v1/service.rb +68 -68
  66. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  67. data/generated/google/apis/drive_v2.rb +1 -1
  68. data/generated/google/apis/drive_v3.rb +1 -1
  69. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  70. data/generated/google/apis/games_management_v1management.rb +1 -1
  71. data/generated/google/apis/games_v1.rb +1 -1
  72. data/generated/google/apis/genomics_v1.rb +7 -7
  73. data/generated/google/apis/genomics_v1/classes.rb +932 -932
  74. data/generated/google/apis/genomics_v1/representations.rb +205 -205
  75. data/generated/google/apis/genomics_v1/service.rb +1228 -1228
  76. data/generated/google/apis/gmail_v1.rb +1 -1
  77. data/generated/google/apis/iam_v1/classes.rb +440 -440
  78. data/generated/google/apis/iam_v1/representations.rb +94 -94
  79. data/generated/google/apis/iam_v1/service.rb +60 -60
  80. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  81. data/generated/google/apis/identitytoolkit_v3/classes.rb +21 -1
  82. data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -0
  83. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  84. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  85. data/generated/google/apis/kgsearch_v1/service.rb +21 -21
  86. data/generated/google/apis/language_v1beta1.rb +1 -1
  87. data/generated/google/apis/language_v1beta1/classes.rb +232 -232
  88. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  89. data/generated/google/apis/logging_v2beta1.rb +1 -1
  90. data/generated/google/apis/logging_v2beta1/classes.rb +345 -337
  91. data/generated/google/apis/logging_v2beta1/representations.rb +55 -55
  92. data/generated/google/apis/logging_v2beta1/service.rb +331 -306
  93. data/generated/google/apis/monitoring_v3.rb +1 -1
  94. data/generated/google/apis/monitoring_v3/classes.rb +253 -253
  95. data/generated/google/apis/monitoring_v3/representations.rb +58 -58
  96. data/generated/google/apis/monitoring_v3/service.rb +135 -135
  97. data/generated/google/apis/people_v1.rb +15 -16
  98. data/generated/google/apis/people_v1/classes.rb +985 -855
  99. data/generated/google/apis/people_v1/representations.rb +227 -220
  100. data/generated/google/apis/people_v1/service.rb +58 -52
  101. data/generated/google/apis/plus_domains_v1.rb +1 -1
  102. data/generated/google/apis/plus_v1.rb +1 -1
  103. data/generated/google/apis/pubsub_v1.rb +1 -1
  104. data/generated/google/apis/pubsub_v1/classes.rb +257 -257
  105. data/generated/google/apis/pubsub_v1/representations.rb +83 -83
  106. data/generated/google/apis/pubsub_v1/service.rb +390 -390
  107. data/generated/google/apis/script_v1.rb +17 -17
  108. data/generated/google/apis/script_v1/classes.rb +149 -141
  109. data/generated/google/apis/script_v1/representations.rb +26 -27
  110. data/generated/google/apis/script_v1/service.rb +9 -8
  111. data/generated/google/apis/sheets_v4.rb +1 -1
  112. data/generated/google/apis/sheets_v4/classes.rb +4223 -4188
  113. data/generated/google/apis/sheets_v4/representations.rb +850 -834
  114. data/generated/google/apis/sheets_v4/service.rb +192 -192
  115. data/generated/google/apis/slides_v1.rb +1 -1
  116. data/generated/google/apis/slides_v1/classes.rb +927 -800
  117. data/generated/google/apis/slides_v1/representations.rb +253 -211
  118. data/generated/google/apis/speech_v1beta1.rb +1 -1
  119. data/generated/google/apis/speech_v1beta1/classes.rb +94 -107
  120. data/generated/google/apis/speech_v1beta1/representations.rb +24 -36
  121. data/generated/google/apis/speech_v1beta1/service.rb +51 -54
  122. data/generated/google/apis/storage_v1.rb +1 -1
  123. data/generated/google/apis/vision_v1.rb +1 -1
  124. data/generated/google/apis/vision_v1/classes.rb +888 -885
  125. data/generated/google/apis/vision_v1/representations.rb +139 -139
  126. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  127. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -1
  128. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  129. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  130. data/generated/google/apis/youtubereporting_v1/classes.rb +80 -80
  131. data/generated/google/apis/youtubereporting_v1/representations.rb +23 -23
  132. data/generated/google/apis/youtubereporting_v1/service.rb +51 -51
  133. data/google-api-client.gemspec +2 -2
  134. data/lib/google/apis/core/api_command.rb +1 -1
  135. data/lib/google/apis/core/json_representation.rb +2 -2
  136. data/lib/google/apis/version.rb +1 -1
  137. data/samples/cli/lib/samples/you_tube.rb +4 -1
  138. 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 = '20160801'
28
+ REVISION = '20170209'
29
29
 
30
- # View and manage your mail
31
- AUTH_SCOPE = 'https://mail.google.com/'
30
+ # View and manage the files in your Google Drive
31
+ AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
32
32
 
33
- # Manage your calendars
34
- CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds'
33
+ # View and manage your spreadsheets in Google Drive
34
+ AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
35
35
 
36
- # Manage your contacts
37
- M8_FEEDS = 'https://www.google.com/m8/feeds'
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
- # View and manage forms that this application has been installed in
52
- AUTH_FORMS_CURRENTONLY = 'https://www.googleapis.com/auth/forms.currentonly'
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 your spreadsheets in Google Drive
58
- AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
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 request to run the function in a script. The script is identified by the
26
- # specified `script_id`. Executing a function on a script will return results
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 to execute in the given script. The name does not
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 parameters to be passed to the function being executed. The type for each
38
- # parameter should match the expected type in Apps Script. Parameters cannot be
39
- # Apps Script-specific objects (such as a `Document` or `Calendar`); they can
40
- # only be primitive types such as a `string`, `number`, `array`, `object`, or `
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
- @parameters = args[:parameters] if args.key?(:parameters)
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
- # The response will not arrive until the function finishes executing. The
73
- # maximum runtime is listed in the guide to [limitations in Apps Script](https://
74
- # developers.google.com/apps-script/guides/services/quotas#current_limitations).
75
- # If the script function returns successfully, the `response` field will contain
76
- # an `ExecutionResponse` object with the function's return value in the object's
77
- # `result` field.
78
- # If the script function (or Apps Script itself) throws an exception, the `error`
79
- # field will contain a `Status` object. The `Status` object's `details` field
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
- # This field is not used.
90
- # Corresponds to the JSON property `name`
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 :name
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
- # If a `run` call succeeds but the script function (or Apps Script itself)
106
- # throws an exception, the response body's `error` field will contain this `
107
- # Status` object.
108
- # Corresponds to the JSON property `error`
109
- # @return [Google::Apis::ScriptV1::Status]
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
- # If the script function returns successfully, this field will contain an `
113
- # ExecutionResponse` object with the function's return value as the object's `
114
- # result` field.
115
- # Corresponds to the JSON property `response`
116
- # @return [Hash<String,Object>]
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
- @name = args[:name] if args.key?(:name)
126
- @metadata = args[:metadata] if args.key?(:metadata)
127
- @done = args[:done] if args.key?(:done)
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
- # The status code, which should be an enum value of google.rpc.Code.
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 should be in English. Any user-facing
145
- # error message should be localized and sent in the google.rpc.Status.details
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
- # An object that provides information about the nature of an error in the Apps
170
- # Script Execution API. If an `run` call succeeds but the script function (or
171
- # Apps Script itself) throws an exception, the response body's `error` field
172
- # will contain a `Status` object. The `Status` object's `details` field will
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
- # An array of objects that provide a stack trace through the script to show
178
- # where the execution failed, with the deepest call first.
179
- # Corresponds to the JSON property `scriptStackTraceElements`
180
- # @return [Array<Google::Apis::ScriptV1::ScriptStackTraceElement>]
181
- attr_accessor :script_stack_trace_elements
182
-
183
- # The error message thrown by Apps Script, usually localized into the user's
184
- # language.
185
- # Corresponds to the JSON property `errorMessage`
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 &mdash;
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 :error_message
145
+ attr_accessor :session_state
188
146
 
189
- # The error type, for example `TypeError` or `ReferenceError`. If the error type
190
- # is unavailable, this field is not included.
191
- # Corresponds to the JSON property `errorType`
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 :error_type
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
- @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements)
202
- @error_message = args[:error_message] if args.key?(:error_message)
203
- @error_type = args[:error_type] if args.key?(:error_type)
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
- # A stack trace through the script that shows where the execution failed.
208
- class ScriptStackTraceElement
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 name of the function that failed.
212
- # Corresponds to the JSON property `function`
213
- # @return [String]
214
- attr_accessor :function
215
-
216
- # The line number where the script failed.
217
- # Corresponds to the JSON property `lineNumber`
218
- # @return [Fixnum]
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
- @function = args[:function] if args.key?(:function)
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
- # An object that provides the return value of a function executed through the
233
- # Apps Script Execution API. If an `run` call succeeds and the script function
234
- # returns successfully, the response body's `response` field will contain this `
235
- # ExecutionResponse` object.
236
- class ExecutionResponse
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
- # The return value of the script function. The type will match the type returned
240
- # in Apps Script. Functions called through the Execution API cannot return Apps
241
- # Script-specific objects (such as a `Document` or `Calendar`); they can only
242
- # return primitive types such as a `string`, `number`, `array`, `object`, or `
243
- # boolean`.
244
- # Corresponds to the JSON property `result`
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 `status`
235
+ # This field is not used.
236
+ # Corresponds to the JSON property `name`
250
237
  # @return [String]
251
- attr_accessor :status
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
- @result = args[:result] if args.key?(:result)
260
- @status = args[:status] if args.key?(:status)
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 ExecutionRequest
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 Operation
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 ExecutionError
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 ScriptStackTraceElement
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 ExecutionResponse
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 ExecutionRequest
61
+ class ScriptStackTraceElement
62
62
  # @private
63
63
  class Representation < Google::Apis::Core::JsonRepresentation
64
64
  property :function, as: 'function'
65
- collection :parameters, as: 'parameters'
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 Operation
69
+ class ExecutionError
72
70
  # @private
73
71
  class Representation < Google::Apis::Core::JsonRepresentation
74
- property :name, as: 'name'
75
- hash :metadata, as: 'metadata'
76
- property :done, as: 'done'
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 ExecutionError
88
+ class ExecutionRequest
93
89
  # @private
94
90
  class Representation < Google::Apis::Core::JsonRepresentation
95
- collection :script_stack_trace_elements, as: 'scriptStackTraceElements', class: Google::Apis::ScriptV1::ScriptStackTraceElement, decorator: Google::Apis::ScriptV1::ScriptStackTraceElement::Representation
96
-
97
- property :error_message, as: 'errorMessage'
98
- property :error_type, as: 'errorType'
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 ScriptStackTraceElement
98
+ class ExecutionResponse
103
99
  # @private
104
100
  class Representation < Google::Apis::Core::JsonRepresentation
105
- property :function, as: 'function'
106
- property :line_number, as: 'lineNumber'
101
+ property :result, as: 'result'
107
102
  end
108
103
  end
109
104
 
110
- class ExecutionResponse
105
+ class Operation
111
106
  # @private
112
107
  class Representation < Google::Apis::Core::JsonRepresentation
113
- property :result, as: 'result'
114
- property :status, as: 'status'
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