google-api-client 0.9.8 → 0.9.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +63 -110
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
  12. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
  13. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  16. data/generated/google/apis/admin_directory_v1.rb +1 -1
  17. data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
  18. data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
  19. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  20. data/generated/google/apis/admin_reports_v1.rb +3 -3
  21. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  22. data/generated/google/apis/adsense_v1_4.rb +1 -1
  23. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  24. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  26. data/generated/google/apis/analytics_v3.rb +1 -1
  27. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  28. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  29. data/generated/google/apis/analytics_v3/service.rb +217 -0
  30. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  31. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  32. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  33. data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
  34. data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
  35. data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
  36. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  37. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
  38. data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
  39. data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
  40. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  41. data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
  42. data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
  43. data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
  44. data/generated/google/apis/appsactivity_v1.rb +1 -1
  45. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  46. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  47. data/generated/google/apis/appstate_v1.rb +1 -1
  48. data/generated/google/apis/bigquery_v2.rb +1 -1
  49. data/generated/google/apis/bigquery_v2/classes.rb +277 -20
  50. data/generated/google/apis/bigquery_v2/representations.rb +86 -0
  51. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  52. data/generated/google/apis/books_v1.rb +2 -2
  53. data/generated/google/apis/books_v1/classes.rb +79 -1
  54. data/generated/google/apis/books_v1/representations.rb +34 -0
  55. data/generated/google/apis/books_v1/service.rb +7 -3
  56. data/generated/google/apis/calendar_v3.rb +1 -1
  57. data/generated/google/apis/civicinfo_v2.rb +3 -2
  58. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  59. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  60. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  61. data/generated/google/apis/classroom_v1.rb +1 -1
  62. data/generated/google/apis/classroom_v1/classes.rb +183 -37
  63. data/generated/google/apis/classroom_v1/representations.rb +74 -9
  64. data/generated/google/apis/classroom_v1/service.rb +403 -38
  65. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  66. data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
  67. data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
  68. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  69. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  70. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  71. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  72. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  73. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
  74. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
  75. data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
  76. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  77. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
  78. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
  79. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
  80. data/generated/google/apis/compute_beta.rb +1 -1
  81. data/generated/google/apis/compute_beta/classes.rb +2299 -434
  82. data/generated/google/apis/compute_beta/representations.rb +752 -33
  83. data/generated/google/apis/compute_beta/service.rb +6067 -3153
  84. data/generated/google/apis/compute_v1.rb +1 -1
  85. data/generated/google/apis/compute_v1/classes.rb +1681 -207
  86. data/generated/google/apis/compute_v1/representations.rb +552 -0
  87. data/generated/google/apis/compute_v1/service.rb +2797 -1171
  88. data/generated/google/apis/content_v2.rb +1 -1
  89. data/generated/google/apis/content_v2/classes.rb +757 -1
  90. data/generated/google/apis/content_v2/representations.rb +337 -0
  91. data/generated/google/apis/content_v2/service.rb +244 -0
  92. data/generated/google/apis/dataflow_v1b3.rb +38 -0
  93. data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
  94. data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
  95. data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
  96. data/generated/google/apis/dataproc_v1.rb +2 -2
  97. data/generated/google/apis/dataproc_v1/classes.rb +213 -68
  98. data/generated/google/apis/dataproc_v1/representations.rb +38 -0
  99. data/generated/google/apis/dataproc_v1/service.rb +78 -48
  100. data/generated/google/apis/datastore_v1.rb +38 -0
  101. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  102. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  103. data/generated/google/apis/datastore_v1/service.rb +259 -0
  104. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  105. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  106. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  107. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  108. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  109. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  110. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  111. data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
  112. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  113. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  114. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  115. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  116. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  117. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  118. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  119. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  120. data/generated/google/apis/dns_v1.rb +1 -1
  121. data/generated/google/apis/dns_v1/classes.rb +1 -1
  122. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  123. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  124. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  125. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  126. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  127. data/generated/google/apis/drive_v2.rb +1 -1
  128. data/generated/google/apis/drive_v2/classes.rb +27 -3
  129. data/generated/google/apis/drive_v2/representations.rb +4 -0
  130. data/generated/google/apis/drive_v2/service.rb +16 -3
  131. data/generated/google/apis/drive_v3.rb +1 -1
  132. data/generated/google/apis/drive_v3/classes.rb +50 -16
  133. data/generated/google/apis/drive_v3/representations.rb +4 -0
  134. data/generated/google/apis/drive_v3/service.rb +12 -2
  135. data/generated/google/apis/fitness_v1.rb +8 -2
  136. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  137. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  138. data/generated/google/apis/fitness_v1/service.rb +17 -18
  139. data/generated/google/apis/fusiontables_v2.rb +1 -1
  140. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  141. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  142. data/generated/google/apis/games_management_v1management.rb +1 -1
  143. data/generated/google/apis/games_v1.rb +1 -1
  144. data/generated/google/apis/genomics_v1.rb +2 -4
  145. data/generated/google/apis/genomics_v1/classes.rb +143 -34
  146. data/generated/google/apis/genomics_v1/representations.rb +48 -11
  147. data/generated/google/apis/genomics_v1/service.rb +35 -37
  148. data/generated/google/apis/gmail_v1.rb +10 -1
  149. data/generated/google/apis/gmail_v1/classes.rb +542 -4
  150. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  151. data/generated/google/apis/gmail_v1/service.rb +898 -1
  152. data/generated/google/apis/groupssettings_v1.rb +1 -1
  153. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  154. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  155. data/generated/google/apis/iam_v1.rb +2 -2
  156. data/generated/google/apis/iam_v1/classes.rb +181 -206
  157. data/generated/google/apis/iam_v1/representations.rb +36 -45
  158. data/generated/google/apis/iam_v1/service.rb +101 -67
  159. data/generated/google/apis/identitytoolkit_v3.rb +4 -1
  160. data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
  161. data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
  162. data/generated/google/apis/language_v1beta1.rb +36 -0
  163. data/generated/google/apis/language_v1beta1/classes.rb +599 -0
  164. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  165. data/generated/google/apis/language_v1beta1/service.rb +152 -0
  166. data/generated/google/apis/logging_v2beta1.rb +6 -6
  167. data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
  168. data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
  169. data/generated/google/apis/logging_v2beta1/service.rb +290 -209
  170. data/generated/google/apis/mirror_v1.rb +2 -2
  171. data/generated/google/apis/mirror_v1/service.rb +1 -1
  172. data/generated/google/apis/monitoring_v3.rb +45 -0
  173. data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
  174. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  175. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  176. data/generated/google/apis/oauth2_v2.rb +1 -1
  177. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  178. data/generated/google/apis/plus_domains_v1.rb +1 -1
  179. data/generated/google/apis/plus_v1.rb +1 -1
  180. data/generated/google/apis/pubsub_v1.rb +1 -1
  181. data/generated/google/apis/pubsub_v1/classes.rb +10 -9
  182. data/generated/google/apis/pubsub_v1/service.rb +128 -27
  183. data/generated/google/apis/qpx_express_v1.rb +1 -1
  184. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  185. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  186. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  187. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  188. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  189. data/generated/google/apis/script_v1.rb +1 -1
  190. data/generated/google/apis/script_v1/classes.rb +6 -0
  191. data/generated/google/apis/script_v1/representations.rb +1 -0
  192. data/generated/google/apis/sheets_v4.rb +1 -1
  193. data/generated/google/apis/sheets_v4/classes.rb +910 -89
  194. data/generated/google/apis/sheets_v4/representations.rb +194 -10
  195. data/generated/google/apis/sheets_v4/service.rb +216 -49
  196. data/generated/google/apis/slides_v1.rb +49 -0
  197. data/generated/google/apis/slides_v1/classes.rb +3926 -0
  198. data/generated/google/apis/slides_v1/representations.rb +1722 -0
  199. data/generated/google/apis/slides_v1/service.rb +202 -0
  200. data/generated/google/apis/speech_v1beta1.rb +34 -0
  201. data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
  202. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  203. data/generated/google/apis/speech_v1beta1/service.rb +271 -0
  204. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  205. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
  206. data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
  207. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  208. data/generated/google/apis/storage_v1.rb +1 -1
  209. data/generated/google/apis/storage_v1/classes.rb +43 -18
  210. data/generated/google/apis/storage_v1/representations.rb +4 -1
  211. data/generated/google/apis/storage_v1/service.rb +5 -2
  212. data/generated/google/apis/translate_v2.rb +2 -2
  213. data/generated/google/apis/translate_v2/service.rb +1 -1
  214. data/generated/google/apis/vision_v1.rb +1 -1
  215. data/generated/google/apis/vision_v1/classes.rb +12 -11
  216. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  217. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  218. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  219. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  220. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  221. data/generated/google/apis/youtube_v3.rb +1 -1
  222. data/generated/google/apis/youtube_v3/classes.rb +183 -21
  223. data/generated/google/apis/youtube_v3/representations.rb +85 -4
  224. data/generated/google/apis/youtube_v3/service.rb +41 -5
  225. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  226. data/google-api-client.gemspec +2 -1
  227. data/lib/google/apis/core/api_command.rb +4 -0
  228. data/lib/google/apis/core/base_service.rb +10 -4
  229. data/lib/google/apis/core/download.rb +7 -2
  230. data/lib/google/apis/core/http_command.rb +5 -1
  231. data/lib/google/apis/core/upload.rb +7 -1
  232. data/lib/google/apis/errors.rb +2 -2
  233. data/lib/google/apis/generator/annotator.rb +6 -0
  234. data/lib/google/apis/version.rb +1 -1
  235. data/samples/cli/lib/samples/bigquery.rb +101 -0
  236. data/samples/cli/lib/samples/sheets.rb +61 -0
  237. data/sync.rb +71 -0
  238. metadata +55 -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,152 @@
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::CloudNaturalLanguageService.new
34
+ #
35
+ # @see https://cloud.google.com/natural-language/
36
+ class CloudNaturalLanguageService < 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
+ # A convenience method that provides all the features that analyzeSentiment,
82
+ # analyzeEntities, and analyzeSyntax provide in one call.
83
+ # @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object
84
+ # @param [String] quota_user
85
+ # Available to use for quota purposes for server-side applications. Can be any
86
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
87
+ # @param [String] fields
88
+ # Selector specifying which fields to include in a partial response.
89
+ # @param [Google::Apis::RequestOptions] options
90
+ # Request-specific options
91
+ #
92
+ # @yield [result, err] Result & error if block supplied
93
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnnotateTextResponse] parsed result object
94
+ # @yieldparam err [StandardError] error object if request failed
95
+ #
96
+ # @return [Google::Apis::LanguageV1beta1::AnnotateTextResponse]
97
+ #
98
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
99
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
100
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
101
+ def annotate_document_text(annotate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
102
+ command = make_simple_command(:post, 'v1beta1/documents:annotateText', options)
103
+ command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation
104
+ command.request_object = annotate_text_request_object
105
+ command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation
106
+ command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse
107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
108
+ command.query['fields'] = fields unless fields.nil?
109
+ execute_or_queue_command(command, &block)
110
+ end
111
+
112
+ # Finds named entities (currently finds proper names) in the text,
113
+ # entity types, salience, mentions for each entity, and other properties.
114
+ # @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
115
+ # @param [String] quota_user
116
+ # Available to use for quota purposes for server-side applications. Can be any
117
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
118
+ # @param [String] fields
119
+ # Selector specifying which fields to include in a partial response.
120
+ # @param [Google::Apis::RequestOptions] options
121
+ # Request-specific options
122
+ #
123
+ # @yield [result, err] Result & error if block supplied
124
+ # @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse] parsed result object
125
+ # @yieldparam err [StandardError] error object if request failed
126
+ #
127
+ # @return [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse]
128
+ #
129
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
130
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
131
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
132
+ def analyze_document_entities(analyze_entities_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
133
+ command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options)
134
+ command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation
135
+ command.request_object = analyze_entities_request_object
136
+ command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation
137
+ command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse
138
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
139
+ command.query['fields'] = fields unless fields.nil?
140
+ execute_or_queue_command(command, &block)
141
+ end
142
+
143
+ protected
144
+
145
+ def apply_command_defaults(command)
146
+ command.query['key'] = key unless key.nil?
147
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
148
+ end
149
+ end
150
+ end
151
+ end
152
+ end
@@ -18,14 +18,14 @@ require 'google/apis/logging_v2beta1/representations.rb'
18
18
 
19
19
  module Google
20
20
  module Apis
21
- # Google Cloud Logging API
21
+ # Stackdriver Logging API
22
22
  #
23
- # Writes log entries and manages your logs, log sinks, and logs-based metrics.
23
+ # Writes log entries and manages your Stackdriver Logging configuration.
24
24
  #
25
25
  # @see https://cloud.google.com/logging/docs/
26
26
  module LoggingV2beta1
27
27
  VERSION = 'V2beta1'
28
- REVISION = '20160322'
28
+ REVISION = '20161107'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -33,14 +33,14 @@ module Google
33
33
  # View your data across Google Cloud Platform services
34
34
  AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
35
35
 
36
- # Administrate log data for your projects
37
- AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
38
-
39
36
  # View log data for your projects
40
37
  AUTH_LOGGING_READ = 'https://www.googleapis.com/auth/logging.read'
41
38
 
42
39
  # Submit log data for your projects
43
40
  AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
41
+
42
+ # Administrate log data for your projects
43
+ AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
44
44
  end
45
45
  end
46
46
  end