google-api-client 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/api_names.yaml +395 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
  10. data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
  11. data/generated/google/apis/admin_reports_v1.rb +3 -3
  12. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analytics_v3/service.rb +39 -0
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  19. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  20. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  21. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
  22. data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
  23. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
  25. data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
  26. data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
  27. data/generated/google/apis/appstate_v1.rb +1 -1
  28. data/generated/google/apis/bigquery_v2.rb +1 -1
  29. data/generated/google/apis/bigquery_v2/classes.rb +32 -37
  30. data/generated/google/apis/bigquery_v2/service.rb +10 -2
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/calendar_v3/classes.rb +205 -0
  33. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  34. data/generated/google/apis/classroom_v1.rb +22 -25
  35. data/generated/google/apis/classroom_v1/classes.rb +998 -907
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1269 -1061
  38. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  39. data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
  40. data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
  41. data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
  42. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  43. data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
  44. data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
  45. data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
  46. data/generated/google/apis/cloudkms_v1.rb +1 -1
  47. data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
  48. data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
  49. data/generated/google/apis/cloudkms_v1/service.rb +228 -228
  50. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
  59. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  60. data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
  61. data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
  62. data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
  63. data/generated/google/apis/compute_beta.rb +1 -1
  64. data/generated/google/apis/compute_beta/classes.rb +116 -0
  65. data/generated/google/apis/compute_beta/representations.rb +48 -0
  66. data/generated/google/apis/compute_beta/service.rb +46 -1
  67. data/generated/google/apis/compute_v1.rb +1 -1
  68. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
  71. data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
  74. data/generated/google/apis/dataproc_v1/representations.rb +255 -253
  75. data/generated/google/apis/dataproc_v1/service.rb +100 -100
  76. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  77. data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
  78. data/generated/google/apis/dns_v1.rb +1 -1
  79. data/generated/google/apis/dns_v2beta1.rb +1 -1
  80. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2/classes.rb +3 -1
  83. data/generated/google/apis/drive_v3.rb +1 -1
  84. data/generated/google/apis/drive_v3/classes.rb +3 -1
  85. data/generated/google/apis/fusiontables_v2.rb +1 -1
  86. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  87. data/generated/google/apis/games_management_v1management.rb +1 -1
  88. data/generated/google/apis/games_v1.rb +1 -1
  89. data/generated/google/apis/genomics_v1.rb +7 -7
  90. data/generated/google/apis/genomics_v1/classes.rb +959 -959
  91. data/generated/google/apis/genomics_v1/representations.rb +238 -238
  92. data/generated/google/apis/genomics_v1/service.rb +996 -996
  93. data/generated/google/apis/iam_v1.rb +1 -1
  94. data/generated/google/apis/iam_v1/classes.rb +440 -440
  95. data/generated/google/apis/iam_v1/representations.rb +94 -94
  96. data/generated/google/apis/iam_v1/service.rb +170 -173
  97. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  98. data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
  99. data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
  100. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  101. data/generated/google/apis/language_v1beta1.rb +1 -1
  102. data/generated/google/apis/language_v1beta1/classes.rb +427 -427
  103. data/generated/google/apis/language_v1beta1/representations.rb +113 -113
  104. data/generated/google/apis/language_v1beta1/service.rb +25 -24
  105. data/generated/google/apis/licensing_v1.rb +2 -2
  106. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  107. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  108. data/generated/google/apis/licensing_v1/service.rb +1 -1
  109. data/generated/google/apis/logging_v2beta1.rb +1 -1
  110. data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
  111. data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
  112. data/generated/google/apis/logging_v2beta1/service.rb +261 -261
  113. data/generated/google/apis/manufacturers_v1.rb +1 -1
  114. data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
  115. data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
  116. data/generated/google/apis/manufacturers_v1/service.rb +11 -11
  117. data/generated/google/apis/mirror_v1.rb +1 -1
  118. data/generated/google/apis/monitoring_v3.rb +7 -7
  119. data/generated/google/apis/monitoring_v3/classes.rb +668 -670
  120. data/generated/google/apis/monitoring_v3/representations.rb +140 -140
  121. data/generated/google/apis/monitoring_v3/service.rb +208 -208
  122. data/generated/google/apis/partners_v2.rb +1 -1
  123. data/generated/google/apis/partners_v2/classes.rb +505 -505
  124. data/generated/google/apis/partners_v2/representations.rb +118 -118
  125. data/generated/google/apis/partners_v2/service.rb +275 -275
  126. data/generated/google/apis/people_v1.rb +1 -1
  127. data/generated/google/apis/people_v1/classes.rb +1037 -1031
  128. data/generated/google/apis/people_v1/representations.rb +247 -246
  129. data/generated/google/apis/people_v1/service.rb +20 -20
  130. data/generated/google/apis/plus_domains_v1.rb +1 -1
  131. data/generated/google/apis/plus_v1.rb +1 -1
  132. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  133. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
  134. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
  135. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
  136. data/generated/google/apis/pubsub_v1.rb +4 -4
  137. data/generated/google/apis/pubsub_v1/classes.rb +131 -132
  138. data/generated/google/apis/pubsub_v1/representations.rb +35 -35
  139. data/generated/google/apis/pubsub_v1/service.rb +399 -408
  140. data/generated/google/apis/reseller_v1.rb +1 -1
  141. data/generated/google/apis/reseller_v1/classes.rb +9 -0
  142. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  143. data/generated/google/apis/script_v1.rb +9 -9
  144. data/generated/google/apis/script_v1/classes.rb +110 -110
  145. data/generated/google/apis/script_v1/representations.rb +26 -26
  146. data/generated/google/apis/sheets_v4.rb +4 -4
  147. data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
  148. data/generated/google/apis/sheets_v4/representations.rb +856 -856
  149. data/generated/google/apis/sheets_v4/service.rb +106 -106
  150. data/generated/google/apis/slides_v1.rb +4 -4
  151. data/generated/google/apis/slides_v1/classes.rb +2923 -2841
  152. data/generated/google/apis/slides_v1/representations.rb +722 -691
  153. data/generated/google/apis/slides_v1/service.rb +58 -15
  154. data/generated/google/apis/speech_v1beta1.rb +1 -1
  155. data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
  156. data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
  157. data/generated/google/apis/speech_v1beta1/service.rb +70 -70
  158. data/generated/google/apis/storage_v1.rb +1 -1
  159. data/generated/google/apis/storage_v1/classes.rb +151 -0
  160. data/generated/google/apis/storage_v1/representations.rb +45 -0
  161. data/generated/google/apis/storage_v1/service.rb +248 -0
  162. data/generated/google/apis/vision_v1.rb +1 -1
  163. data/generated/google/apis/vision_v1/classes.rb +1227 -1221
  164. data/generated/google/apis/vision_v1/representations.rb +217 -215
  165. data/generated/google/apis/webmasters_v3.rb +1 -1
  166. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  167. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  168. data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
  169. data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
  170. data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
  171. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  172. data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
  173. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  174. data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
  175. data/lib/google/apis/version.rb +1 -1
  176. metadata +2 -2
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/google-apps/reseller/
26
26
  module ResellerV1
27
27
  VERSION = 'V1'
28
- REVISION = '20170216'
28
+ REVISION = '20170228'
29
29
 
30
30
  # Manage users on your domain
31
31
  AUTH_APPS_ORDER = 'https://www.googleapis.com/auth/apps.order'
@@ -452,6 +452,14 @@ module Google
452
452
  # @return [String]
453
453
  attr_accessor :sku_id
454
454
 
455
+ # Read-only external display name for a product's SKU assigned to a customer in
456
+ # the subscription. SKU names are subject to change at Google's discretion. For
457
+ # products and SKUs available in this version of the API, see Product and SKU
458
+ # IDs.
459
+ # Corresponds to the JSON property `skuName`
460
+ # @return [String]
461
+ attr_accessor :sku_name
462
+
455
463
  # This is an optional property.
456
464
  # Corresponds to the JSON property `status`
457
465
  # @return [String]
@@ -513,6 +521,7 @@ module Google
513
521
  @resource_ui_url = args[:resource_ui_url] if args.key?(:resource_ui_url)
514
522
  @seats = args[:seats] if args.key?(:seats)
515
523
  @sku_id = args[:sku_id] if args.key?(:sku_id)
524
+ @sku_name = args[:sku_name] if args.key?(:sku_name)
516
525
  @status = args[:status] if args.key?(:status)
517
526
  @subscription_id = args[:subscription_id] if args.key?(:subscription_id)
518
527
  @suspension_reasons = args[:suspension_reasons] if args.key?(:suspension_reasons)
@@ -194,6 +194,7 @@ module Google
194
194
  property :seats, as: 'seats', class: Google::Apis::ResellerV1::Seats, decorator: Google::Apis::ResellerV1::Seats::Representation
195
195
 
196
196
  property :sku_id, as: 'skuId'
197
+ property :sku_name, as: 'skuName'
197
198
  property :status, as: 'status'
198
199
  property :subscription_id, as: 'subscriptionId'
199
200
  collection :suspension_reasons, as: 'suspensionReasons'
@@ -25,7 +25,10 @@ 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 = '20170228'
28
+ REVISION = '20170321'
29
+
30
+ # View your email address
31
+ AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
29
32
 
30
33
  # Manage your calendars
31
34
  CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds'
@@ -39,26 +42,23 @@ module Google
39
42
  # View and manage the files in your Google Drive
40
43
  AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
41
44
 
42
- # View and manage your spreadsheets in Google Drive
43
- AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
44
-
45
45
  # Read, send, delete, and manage your email
46
46
  AUTH_SCOPE = 'https://mail.google.com/'
47
47
 
48
- # View and manage the provisioning of users on your domain
49
- AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
48
+ # View and manage your spreadsheets in Google Drive
49
+ AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
50
50
 
51
51
  # View and manage the provisioning of groups on your domain
52
52
  AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group'
53
53
 
54
+ # View and manage the provisioning of users on your domain
55
+ AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user'
56
+
54
57
  # View and manage your forms in Google Drive
55
58
  AUTH_FORMS = 'https://www.googleapis.com/auth/forms'
56
59
 
57
60
  # Manage your contacts
58
61
  M8_FEEDS = 'https://www.google.com/m8/feeds'
59
-
60
- # View your email address
61
- AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
62
62
  end
63
63
  end
64
64
  end
@@ -22,117 +22,28 @@ module Google
22
22
  module Apis
23
23
  module ScriptV1
24
24
 
25
- # An object that provides the return value of a function executed through the
26
- # Apps Script Execution API. If a
27
- # `run` call succeeds and the
28
- # script function returns successfully, the response body's
29
- # `response` field contains this
30
- # `ExecutionResponse` object.
31
- class ExecutionResponse
32
- include Google::Apis::Core::Hashable
33
-
34
- # The return value of the script function. The type matches the object type
35
- # returned in Apps Script. Functions called through the Execution API cannot
36
- # return Apps Script-specific objects (such as a `Document` or a `Calendar`);
37
- # they can only return primitive types such as a `string`, `number`, `array`,
38
- # `object`, or `boolean`.
39
- # Corresponds to the JSON property `result`
40
- # @return [Object]
41
- attr_accessor :result
42
-
43
- def initialize(**args)
44
- update!(**args)
45
- end
46
-
47
- # Update properties of this object
48
- def update!(**args)
49
- @result = args[:result] if args.key?(:result)
50
- end
51
- end
52
-
53
- # The response will not arrive until the function finishes executing. The
54
- # maximum runtime is listed in the guide to [limitations in Apps Script](https://
55
- # developers.google.com/apps-script/guides/services/quotas#current_limitations).
56
- # <p>If the script function returns successfully, the `response` field will
57
- # contain an `ExecutionResponse` object with the function's return value in the
58
- # object's `result` field.</p>
59
- # <p>If the script function (or Apps Script itself) throws an exception, the `
60
- # error` field will contain a `Status` object. The `Status` object's `details`
61
- # field will contain an array with a single `ExecutionError` object that
62
- # provides information about the nature of the error.</p>
63
- # <p>If the `run` call itself fails (for example, because of a malformed request
64
- # or an authorization error), the method will return an HTTP response code in
65
- # the 4XX range with a different format for the response body. Client libraries
66
- # will automatically convert a 4XX response into an exception class.</p>
67
- class Operation
68
- include Google::Apis::Core::Hashable
69
-
70
- # This field is not used.
71
- # Corresponds to the JSON property `done`
72
- # @return [Boolean]
73
- attr_accessor :done
74
- alias_method :done?, :done
75
-
76
- # If the script function returns successfully, this field will contain an `
77
- # ExecutionResponse` object with the function's return value as the object's `
78
- # result` field.
79
- # Corresponds to the JSON property `response`
80
- # @return [Hash<String,Object>]
81
- attr_accessor :response
82
-
83
- # This field is not used.
84
- # Corresponds to the JSON property `name`
85
- # @return [String]
86
- attr_accessor :name
87
-
88
- # If a `run` call succeeds but the script function (or Apps Script itself)
89
- # throws an exception, the response body's `error` field will contain this `
90
- # Status` object.
91
- # Corresponds to the JSON property `error`
92
- # @return [Google::Apis::ScriptV1::Status]
93
- attr_accessor :error
94
-
95
- # This field is not used.
96
- # Corresponds to the JSON property `metadata`
97
- # @return [Hash<String,Object>]
98
- attr_accessor :metadata
99
-
100
- def initialize(**args)
101
- update!(**args)
102
- end
103
-
104
- # Update properties of this object
105
- def update!(**args)
106
- @done = args[:done] if args.key?(:done)
107
- @response = args[:response] if args.key?(:response)
108
- @name = args[:name] if args.key?(:name)
109
- @error = args[:error] if args.key?(:error)
110
- @metadata = args[:metadata] if args.key?(:metadata)
111
- end
112
- end
113
-
114
25
  # A stack trace through the script that shows where the execution failed.
115
26
  class ScriptStackTraceElement
116
27
  include Google::Apis::Core::Hashable
117
28
 
118
- # The line number where the script failed.
119
- # Corresponds to the JSON property `lineNumber`
120
- # @return [Fixnum]
121
- attr_accessor :line_number
122
-
123
29
  # The name of the function that failed.
124
30
  # Corresponds to the JSON property `function`
125
31
  # @return [String]
126
32
  attr_accessor :function
127
33
 
34
+ # The line number where the script failed.
35
+ # Corresponds to the JSON property `lineNumber`
36
+ # @return [Fixnum]
37
+ attr_accessor :line_number
38
+
128
39
  def initialize(**args)
129
40
  update!(**args)
130
41
  end
131
42
 
132
43
  # Update properties of this object
133
44
  def update!(**args)
134
- @line_number = args[:line_number] if args.key?(:line_number)
135
45
  @function = args[:function] if args.key?(:function)
46
+ @line_number = args[:line_number] if args.key?(:line_number)
136
47
  end
137
48
  end
138
49
 
@@ -219,20 +130,6 @@ module Google
219
130
  class ExecutionRequest
220
131
  include Google::Apis::Core::Hashable
221
132
 
222
- # For Android add-ons only. An ID that represents the user's current session
223
- # in the Android app for Google Docs or Sheets, included as extra data in the
224
- # [`Intent`](https://developer.android.com/guide/components/intents-filters.html)
225
- # that launches the add-on. When an Android add-on is run with a session
226
- # state, it gains the privileges of a
227
- # [bound](https://developers.google.com/apps-script/guides/bound) script &mdash;
228
- # that is, it can access information like the user's current cursor position
229
- # (in Docs) or selected cell (in Sheets). To retrieve the state, call
230
- # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`.
231
- # Optional.
232
- # Corresponds to the JSON property `sessionState`
233
- # @return [String]
234
- attr_accessor :session_state
235
-
236
133
  # The name of the function to execute in the given script. The name does not
237
134
  # include parentheses or parameters.
238
135
  # Corresponds to the JSON property `function`
@@ -256,16 +153,119 @@ module Google
256
153
  # @return [Array<Object>]
257
154
  attr_accessor :parameters
258
155
 
156
+ # For Android add-ons only. An ID that represents the user's current session
157
+ # in the Android app for Google Docs or Sheets, included as extra data in the
158
+ # [`Intent`](https://developer.android.com/guide/components/intents-filters.html)
159
+ # that launches the add-on. When an Android add-on is run with a session
160
+ # state, it gains the privileges of a
161
+ # [bound](https://developers.google.com/apps-script/guides/bound) script &mdash;
162
+ # that is, it can access information like the user's current cursor position
163
+ # (in Docs) or selected cell (in Sheets). To retrieve the state, call
164
+ # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`.
165
+ # Optional.
166
+ # Corresponds to the JSON property `sessionState`
167
+ # @return [String]
168
+ attr_accessor :session_state
169
+
259
170
  def initialize(**args)
260
171
  update!(**args)
261
172
  end
262
173
 
263
174
  # Update properties of this object
264
175
  def update!(**args)
265
- @session_state = args[:session_state] if args.key?(:session_state)
266
176
  @function = args[:function] if args.key?(:function)
267
177
  @dev_mode = args[:dev_mode] if args.key?(:dev_mode)
268
178
  @parameters = args[:parameters] if args.key?(:parameters)
179
+ @session_state = args[:session_state] if args.key?(:session_state)
180
+ end
181
+ end
182
+
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
190
+ include Google::Apis::Core::Hashable
191
+
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
200
+
201
+ def initialize(**args)
202
+ update!(**args)
203
+ end
204
+
205
+ # Update properties of this object
206
+ def update!(**args)
207
+ @result = args[:result] if args.key?(:result)
208
+ end
209
+ end
210
+
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
226
+ include Google::Apis::Core::Hashable
227
+
228
+ # This field is not used.
229
+ # Corresponds to the JSON property `done`
230
+ # @return [Boolean]
231
+ attr_accessor :done
232
+ alias_method :done?, :done
233
+
234
+ # If the script function returns successfully, this field will contain an `
235
+ # ExecutionResponse` object with the function's return value as the object's `
236
+ # result` field.
237
+ # Corresponds to the JSON property `response`
238
+ # @return [Hash<String,Object>]
239
+ attr_accessor :response
240
+
241
+ # This field is not used.
242
+ # Corresponds to the JSON property `name`
243
+ # @return [String]
244
+ attr_accessor :name
245
+
246
+ # If a `run` call succeeds but the script function (or Apps Script itself)
247
+ # throws an exception, the response body's `error` field will contain this `
248
+ # Status` object.
249
+ # Corresponds to the JSON property `error`
250
+ # @return [Google::Apis::ScriptV1::Status]
251
+ attr_accessor :error
252
+
253
+ # This field is not used.
254
+ # Corresponds to the JSON property `metadata`
255
+ # @return [Hash<String,Object>]
256
+ attr_accessor :metadata
257
+
258
+ def initialize(**args)
259
+ update!(**args)
260
+ end
261
+
262
+ # Update properties of this object
263
+ def update!(**args)
264
+ @done = args[:done] if args.key?(:done)
265
+ @response = args[:response] if args.key?(:response)
266
+ @name = args[:name] if args.key?(:name)
267
+ @error = args[:error] if args.key?(:error)
268
+ @metadata = args[:metadata] if args.key?(:metadata)
269
269
  end
270
270
  end
271
271
  end
@@ -22,18 +22,6 @@ module Google
22
22
  module Apis
23
23
  module ScriptV1
24
24
 
25
- class ExecutionResponse
26
- class Representation < Google::Apis::Core::JsonRepresentation; end
27
-
28
- include Google::Apis::Core::JsonObjectSupport
29
- end
30
-
31
- class Operation
32
- class Representation < Google::Apis::Core::JsonRepresentation; end
33
-
34
- include Google::Apis::Core::JsonObjectSupport
35
- end
36
-
37
25
  class ScriptStackTraceElement
38
26
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
27
 
@@ -59,29 +47,22 @@ module Google
59
47
  end
60
48
 
61
49
  class ExecutionResponse
62
- # @private
63
- class Representation < Google::Apis::Core::JsonRepresentation
64
- property :result, as: 'result'
65
- end
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
66
53
  end
67
54
 
68
55
  class Operation
69
- # @private
70
- class Representation < Google::Apis::Core::JsonRepresentation
71
- property :done, as: 'done'
72
- hash :response, as: 'response'
73
- property :name, as: 'name'
74
- property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
57
 
76
- hash :metadata, as: 'metadata'
77
- end
58
+ include Google::Apis::Core::JsonObjectSupport
78
59
  end
79
60
 
80
61
  class ScriptStackTraceElement
81
62
  # @private
82
63
  class Representation < Google::Apis::Core::JsonRepresentation
83
- property :line_number, as: 'lineNumber'
84
64
  property :function, as: 'function'
65
+ property :line_number, as: 'lineNumber'
85
66
  end
86
67
  end
87
68
 
@@ -107,10 +88,29 @@ module Google
107
88
  class ExecutionRequest
108
89
  # @private
109
90
  class Representation < Google::Apis::Core::JsonRepresentation
110
- property :session_state, as: 'sessionState'
111
91
  property :function, as: 'function'
112
92
  property :dev_mode, as: 'devMode'
113
93
  collection :parameters, as: 'parameters'
94
+ property :session_state, as: 'sessionState'
95
+ end
96
+ end
97
+
98
+ class ExecutionResponse
99
+ # @private
100
+ class Representation < Google::Apis::Core::JsonRepresentation
101
+ property :result, as: 'result'
102
+ end
103
+ end
104
+
105
+ class Operation
106
+ # @private
107
+ class Representation < Google::Apis::Core::JsonRepresentation
108
+ property :done, as: 'done'
109
+ hash :response, as: 'response'
110
+ property :name, as: 'name'
111
+ property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation
112
+
113
+ hash :metadata, as: 'metadata'
114
114
  end
115
115
  end
116
116
  end
@@ -25,7 +25,10 @@ module Google
25
25
  # @see https://developers.google.com/sheets/
26
26
  module SheetsV4
27
27
  VERSION = 'V4'
28
- REVISION = '20170303'
28
+ REVISION = '20170323'
29
+
30
+ # View and manage your spreadsheets in Google Drive
31
+ AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
29
32
 
30
33
  # View and manage the files in your Google Drive
31
34
  AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -35,9 +38,6 @@ module Google
35
38
 
36
39
  # View your Google Spreadsheets
37
40
  AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly'
38
-
39
- # View and manage your spreadsheets in Google Drive
40
- AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets'
41
41
  end
42
42
  end
43
43
  end