google-api-client 0.9.8 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +61 -110
  6. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +160 -9
  8. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +46 -0
  9. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -8
  10. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  11. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +6 -0
  14. data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +2 -2
  16. data/generated/google/apis/admin_reports_v1.rb +3 -3
  17. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  18. data/generated/google/apis/adsense_v1_4.rb +1 -1
  19. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  20. data/generated/google/apis/analytics_v3.rb +1 -1
  21. data/generated/google/apis/analytics_v3/classes.rb +371 -1
  22. data/generated/google/apis/analytics_v3/representations.rb +135 -0
  23. data/generated/google/apis/analytics_v3/service.rb +218 -0
  24. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  25. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  26. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  27. data/generated/google/apis/androidenterprise_v1/classes.rb +722 -48
  28. data/generated/google/apis/androidenterprise_v1/representations.rb +305 -0
  29. data/generated/google/apis/androidenterprise_v1/service.rb +1180 -146
  30. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  31. data/generated/google/apis/androidpublisher_v2/classes.rb +9 -8
  32. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  33. data/generated/google/apis/appengine_v1beta5/classes.rb +430 -288
  34. data/generated/google/apis/appengine_v1beta5/representations.rb +84 -10
  35. data/generated/google/apis/appengine_v1beta5/service.rb +285 -25
  36. data/generated/google/apis/appsactivity_v1.rb +1 -1
  37. data/generated/google/apis/appstate_v1.rb +1 -1
  38. data/generated/google/apis/bigquery_v2.rb +1 -1
  39. data/generated/google/apis/bigquery_v2/classes.rb +254 -6
  40. data/generated/google/apis/bigquery_v2/representations.rb +85 -0
  41. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  42. data/generated/google/apis/books_v1.rb +2 -2
  43. data/generated/google/apis/books_v1/classes.rb +77 -0
  44. data/generated/google/apis/books_v1/representations.rb +34 -0
  45. data/generated/google/apis/books_v1/service.rb +7 -3
  46. data/generated/google/apis/calendar_v3.rb +1 -1
  47. data/generated/google/apis/civicinfo_v2.rb +3 -2
  48. data/generated/google/apis/civicinfo_v2/classes.rb +16 -4
  49. data/generated/google/apis/civicinfo_v2/representations.rb +2 -0
  50. data/generated/google/apis/civicinfo_v2/service.rb +8 -2
  51. data/generated/google/apis/classroom_v1.rb +1 -1
  52. data/generated/google/apis/classroom_v1/classes.rb +176 -37
  53. data/generated/google/apis/classroom_v1/representations.rb +73 -9
  54. data/generated/google/apis/classroom_v1/service.rb +392 -37
  55. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  56. data/generated/google/apis/cloudbuild_v1/classes.rb +320 -12
  57. data/generated/google/apis/cloudbuild_v1/representations.rb +136 -2
  58. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  59. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  60. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  61. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  62. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  63. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +157 -3
  64. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
  65. data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
  66. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  67. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
  68. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
  69. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
  70. data/generated/google/apis/compute_beta.rb +1 -1
  71. data/generated/google/apis/compute_beta/classes.rb +1620 -199
  72. data/generated/google/apis/compute_beta/representations.rb +563 -0
  73. data/generated/google/apis/compute_beta/service.rb +5123 -2690
  74. data/generated/google/apis/compute_v1.rb +1 -1
  75. data/generated/google/apis/compute_v1/classes.rb +1717 -295
  76. data/generated/google/apis/compute_v1/representations.rb +536 -0
  77. data/generated/google/apis/compute_v1/service.rb +2038 -1041
  78. data/generated/google/apis/content_v2.rb +1 -1
  79. data/generated/google/apis/content_v2/classes.rb +709 -1
  80. data/generated/google/apis/content_v2/representations.rb +319 -0
  81. data/generated/google/apis/content_v2/service.rb +244 -0
  82. data/generated/google/apis/datastore_v1.rb +38 -0
  83. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  84. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  85. data/generated/google/apis/datastore_v1/service.rb +259 -0
  86. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  87. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  88. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  89. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  90. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  91. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  92. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  93. data/generated/google/apis/deploymentmanager_v2/service.rb +162 -50
  94. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  95. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  96. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  97. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  98. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  99. data/generated/google/apis/dfareporting_v2_6/classes.rb +11585 -0
  100. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  101. data/generated/google/apis/dfareporting_v2_6/service.rb +9006 -0
  102. data/generated/google/apis/dns_v1.rb +1 -1
  103. data/generated/google/apis/dns_v1/classes.rb +1 -1
  104. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  105. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  106. data/generated/google/apis/drive_v2.rb +1 -1
  107. data/generated/google/apis/drive_v2/classes.rb +11 -3
  108. data/generated/google/apis/drive_v2/representations.rb +2 -0
  109. data/generated/google/apis/drive_v2/service.rb +8 -2
  110. data/generated/google/apis/drive_v3.rb +1 -1
  111. data/generated/google/apis/drive_v3/classes.rb +36 -16
  112. data/generated/google/apis/drive_v3/representations.rb +2 -0
  113. data/generated/google/apis/drive_v3/service.rb +4 -1
  114. data/generated/google/apis/fitness_v1.rb +8 -2
  115. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  116. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  117. data/generated/google/apis/fitness_v1/service.rb +17 -18
  118. data/generated/google/apis/fusiontables_v2.rb +1 -1
  119. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  120. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  121. data/generated/google/apis/games_management_v1management.rb +1 -1
  122. data/generated/google/apis/games_v1.rb +1 -1
  123. data/generated/google/apis/genomics_v1.rb +2 -4
  124. data/generated/google/apis/genomics_v1/classes.rb +111 -9
  125. data/generated/google/apis/genomics_v1/representations.rb +36 -0
  126. data/generated/google/apis/genomics_v1/service.rb +4 -7
  127. data/generated/google/apis/gmail_v1.rb +7 -1
  128. data/generated/google/apis/gmail_v1/classes.rb +540 -0
  129. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  130. data/generated/google/apis/gmail_v1/service.rb +898 -1
  131. data/generated/google/apis/groupssettings_v1.rb +1 -1
  132. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  133. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  134. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  135. data/generated/google/apis/identitytoolkit_v3/classes.rb +154 -1
  136. data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
  137. data/generated/google/apis/language_v1beta1.rb +36 -0
  138. data/generated/google/apis/language_v1beta1/classes.rb +596 -0
  139. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  140. data/generated/google/apis/language_v1beta1/service.rb +154 -0
  141. data/generated/google/apis/mirror_v1.rb +2 -2
  142. data/generated/google/apis/mirror_v1/service.rb +1 -1
  143. data/generated/google/apis/monitoring_v3.rb +45 -0
  144. data/generated/google/apis/monitoring_v3/classes.rb +1328 -0
  145. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  146. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  147. data/generated/google/apis/oauth2_v2.rb +1 -1
  148. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  149. data/generated/google/apis/plus_domains_v1.rb +1 -1
  150. data/generated/google/apis/plus_v1.rb +1 -1
  151. data/generated/google/apis/qpx_express_v1.rb +1 -1
  152. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  153. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  154. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  155. data/generated/google/apis/script_v1.rb +1 -1
  156. data/generated/google/apis/script_v1/classes.rb +6 -0
  157. data/generated/google/apis/script_v1/representations.rb +1 -0
  158. data/generated/google/apis/sheets_v4.rb +1 -1
  159. data/generated/google/apis/sheets_v4/classes.rb +35 -0
  160. data/generated/google/apis/sheets_v4/representations.rb +16 -0
  161. data/generated/google/apis/sheets_v4/service.rb +55 -0
  162. data/generated/google/apis/speech_v1beta1.rb +34 -0
  163. data/generated/google/apis/speech_v1beta1/classes.rb +521 -0
  164. data/generated/google/apis/speech_v1beta1/representations.rb +219 -0
  165. data/generated/google/apis/speech_v1beta1/service.rb +268 -0
  166. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  167. data/generated/google/apis/sqladmin_v1beta4/classes.rb +26 -8
  168. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
  169. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  170. data/generated/google/apis/storage_v1.rb +1 -1
  171. data/generated/google/apis/storage_v1/classes.rb +19 -10
  172. data/generated/google/apis/translate_v2.rb +2 -2
  173. data/generated/google/apis/translate_v2/service.rb +1 -1
  174. data/generated/google/apis/vision_v1.rb +1 -1
  175. data/generated/google/apis/vision_v1/classes.rb +10 -9
  176. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  177. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  178. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  179. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  180. data/generated/google/apis/youtube_v3.rb +1 -1
  181. data/generated/google/apis/youtube_v3/classes.rb +163 -2
  182. data/generated/google/apis/youtube_v3/representations.rb +82 -0
  183. data/generated/google/apis/youtube_v3/service.rb +6 -2
  184. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  185. data/google-api-client.gemspec +2 -1
  186. data/lib/google/apis/core/api_command.rb +4 -0
  187. data/lib/google/apis/core/base_service.rb +10 -4
  188. data/lib/google/apis/core/download.rb +7 -2
  189. data/lib/google/apis/core/http_command.rb +5 -1
  190. data/lib/google/apis/core/upload.rb +7 -1
  191. data/lib/google/apis/errors.rb +2 -2
  192. data/lib/google/apis/generator/annotator.rb +6 -0
  193. data/lib/google/apis/version.rb +1 -1
  194. data/samples/cli/lib/samples/bigquery.rb +101 -0
  195. data/samples/cli/lib/samples/sheets.rb +61 -0
  196. data/sync.rb +71 -0
  197. metadata +43 -13
@@ -0,0 +1,289 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module LanguageV1beta1
24
+
25
+ class Document
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class TextSpan
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Status
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class AnalyzeEntitiesRequest
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class EntityMention
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class AnalyzeSentimentRequest
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class AnalyzeSentimentResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class DependencyEdge
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class AnnotateTextRequest
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class Sentence
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Features
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class PartOfSpeech
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class AnnotateTextResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class Entity
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Sentiment
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Token
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class AnalyzeEntitiesResponse
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class Document
128
+ # @private
129
+ class Representation < Google::Apis::Core::JsonRepresentation
130
+ property :language, as: 'language'
131
+ property :gcs_content_uri, as: 'gcsContentUri'
132
+ property :type, as: 'type'
133
+ property :content, as: 'content'
134
+ end
135
+ end
136
+
137
+ class TextSpan
138
+ # @private
139
+ class Representation < Google::Apis::Core::JsonRepresentation
140
+ property :begin_offset, as: 'beginOffset'
141
+ property :content, as: 'content'
142
+ end
143
+ end
144
+
145
+ class Status
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ property :code, as: 'code'
149
+ collection :details, as: 'details'
150
+ property :message, as: 'message'
151
+ end
152
+ end
153
+
154
+ class AnalyzeEntitiesRequest
155
+ # @private
156
+ class Representation < Google::Apis::Core::JsonRepresentation
157
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
158
+
159
+ property :encoding_type, as: 'encodingType'
160
+ end
161
+ end
162
+
163
+ class EntityMention
164
+ # @private
165
+ class Representation < Google::Apis::Core::JsonRepresentation
166
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
167
+
168
+ end
169
+ end
170
+
171
+ class AnalyzeSentimentRequest
172
+ # @private
173
+ class Representation < Google::Apis::Core::JsonRepresentation
174
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
175
+
176
+ end
177
+ end
178
+
179
+ class AnalyzeSentimentResponse
180
+ # @private
181
+ class Representation < Google::Apis::Core::JsonRepresentation
182
+ property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
183
+
184
+ property :language, as: 'language'
185
+ end
186
+ end
187
+
188
+ class DependencyEdge
189
+ # @private
190
+ class Representation < Google::Apis::Core::JsonRepresentation
191
+ property :head_token_index, as: 'headTokenIndex'
192
+ property :label, as: 'label'
193
+ end
194
+ end
195
+
196
+ class AnnotateTextRequest
197
+ # @private
198
+ class Representation < Google::Apis::Core::JsonRepresentation
199
+ property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
200
+
201
+ property :encoding_type, as: 'encodingType'
202
+ property :features, as: 'features', class: Google::Apis::LanguageV1beta1::Features, decorator: Google::Apis::LanguageV1beta1::Features::Representation
203
+
204
+ end
205
+ end
206
+
207
+ class Sentence
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
211
+
212
+ end
213
+ end
214
+
215
+ class Features
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ property :extract_document_sentiment, as: 'extractDocumentSentiment'
219
+ property :extract_entities, as: 'extractEntities'
220
+ property :extract_syntax, as: 'extractSyntax'
221
+ end
222
+ end
223
+
224
+ class PartOfSpeech
225
+ # @private
226
+ class Representation < Google::Apis::Core::JsonRepresentation
227
+ property :tag, as: 'tag'
228
+ end
229
+ end
230
+
231
+ class AnnotateTextResponse
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
235
+
236
+ property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
237
+
238
+ property :language, as: 'language'
239
+ collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
240
+
241
+ collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
242
+
243
+ end
244
+ end
245
+
246
+ class Entity
247
+ # @private
248
+ class Representation < Google::Apis::Core::JsonRepresentation
249
+ hash :metadata, as: 'metadata'
250
+ property :salience, as: 'salience'
251
+ property :type, as: 'type'
252
+ collection :mentions, as: 'mentions', class: Google::Apis::LanguageV1beta1::EntityMention, decorator: Google::Apis::LanguageV1beta1::EntityMention::Representation
253
+
254
+ property :name, as: 'name'
255
+ end
256
+ end
257
+
258
+ class Sentiment
259
+ # @private
260
+ class Representation < Google::Apis::Core::JsonRepresentation
261
+ property :polarity, as: 'polarity'
262
+ property :magnitude, as: 'magnitude'
263
+ end
264
+ end
265
+
266
+ class Token
267
+ # @private
268
+ class Representation < Google::Apis::Core::JsonRepresentation
269
+ property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
270
+
271
+ property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
272
+
273
+ property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
274
+
275
+ property :lemma, as: 'lemma'
276
+ end
277
+ end
278
+
279
+ class AnalyzeEntitiesResponse
280
+ # @private
281
+ class Representation < Google::Apis::Core::JsonRepresentation
282
+ collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
283
+
284
+ property :language, as: 'language'
285
+ end
286
+ end
287
+ end
288
+ end
289
+ end
@@ -0,0 +1,154 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module LanguageV1beta1
23
+ # Google Cloud Natural Language API
24
+ #
25
+ # Google Cloud Natural Language API provides natural language understanding
26
+ # technologies to developers. Examples include sentiment analysis, entity
27
+ # recognition, and text annotations.
28
+ #
29
+ # @example
30
+ # require 'google/apis/language_v1beta1'
31
+ #
32
+ # Language = Google::Apis::LanguageV1beta1 # Alias the module
33
+ # service = Language::CloudNaturalLanguageAPIService.new
34
+ #
35
+ # @see https://cloud.google.com/natural-language/
36
+ class CloudNaturalLanguageAPIService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://language.googleapis.com/', '')
49
+ end
50
+
51
+ # Analyzes the sentiment of the provided text.
52
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest] analyze_sentiment_request_object
53
+ # @param [String] quota_user
54
+ # Available to use for quota purposes for server-side applications. Can be any
55
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [Google::Apis::RequestOptions] options
59
+ # Request-specific options
60
+ #
61
+ # @yield [result, err] Result & error if block supplied
62
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse] parsed result object
63
+ # @yieldparam err [StandardError] error object if request failed
64
+ #
65
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse]
66
+ #
67
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
68
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
69
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
70
+ def analyze_document_sentiment(analyze_sentiment_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
71
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeSentiment', options)
72
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest::Representation
73
+ command.request_object = analyze_sentiment_request_object
74
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse::Representation
75
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse
76
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ execute_or_queue_command(command, &block)
79
+ end
80
+
81
+ # Advanced API that analyzes the document and provides a full set of text
82
+ # annotations, including semantic, syntactic, and sentiment information. This
83
+ # API is intended for users who are familiar with machine learning and need
84
+ # in-depth text features to build upon.
85
+ # @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object
86
+ # @param [String] quota_user
87
+ # Available to use for quota purposes for server-side applications. Can be any
88
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [Google::Apis::RequestOptions] options
92
+ # Request-specific options
93
+ #
94
+ # @yield [result, err] Result & error if block supplied
95
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnnotateTextResponse] parsed result object
96
+ # @yieldparam err [StandardError] error object if request failed
97
+ #
98
+ # @return [Google::Apis::LanguageV1beta1::AnnotateTextResponse]
99
+ #
100
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
101
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
102
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
103
+ def annotate_document_text(annotate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
104
+ command = make_simple_command(:post, 'v1beta1/documents:annotateText', options)
105
+ command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation
106
+ command.request_object = annotate_text_request_object
107
+ command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation
108
+ command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse
109
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
110
+ command.query['fields'] = fields unless fields.nil?
111
+ execute_or_queue_command(command, &block)
112
+ end
113
+
114
+ # Finds named entities (currently finds proper names) in the text,
115
+ # entity types, salience, mentions for each entity, and other properties.
116
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
117
+ # @param [String] quota_user
118
+ # Available to use for quota purposes for server-side applications. Can be any
119
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
120
+ # @param [String] fields
121
+ # Selector specifying which fields to include in a partial response.
122
+ # @param [Google::Apis::RequestOptions] options
123
+ # Request-specific options
124
+ #
125
+ # @yield [result, err] Result & error if block supplied
126
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse] parsed result object
127
+ # @yieldparam err [StandardError] error object if request failed
128
+ #
129
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse]
130
+ #
131
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
132
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
133
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
134
+ def analyze_document_entities(analyze_entities_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
135
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options)
136
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation
137
+ command.request_object = analyze_entities_request_object
138
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation
139
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse
140
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
141
+ command.query['fields'] = fields unless fields.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ protected
146
+
147
+ def apply_command_defaults(command)
148
+ command.query['key'] = key unless key.nil?
149
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
150
+ end
151
+ end
152
+ end
153
+ end
154
+ end
@@ -20,12 +20,12 @@ module Google
20
20
  module Apis
21
21
  # Google Mirror API
22
22
  #
23
- # API for interacting with Glass users via the timeline.
23
+ # Interacts with Glass users via the timeline.
24
24
  #
25
25
  # @see https://developers.google.com/glass
26
26
  module MirrorV1
27
27
  VERSION = 'V1'
28
- REVISION = '20151206'
28
+ REVISION = '20160616'
29
29
 
30
30
  # View your location
31
31
  AUTH_GLASS_LOCATION = 'https://www.googleapis.com/auth/glass.location'