google-api-client 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/MIGRATING.md +22 -7
  4. data/README.md +4 -8
  5. data/api_names.yaml +1210 -37815
  6. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
  8. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
  9. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
  12. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
  13. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
  14. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
  16. data/generated/google/apis/admin_reports_v1.rb +1 -1
  17. data/generated/google/apis/adsense_v1_4.rb +1 -1
  18. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
  21. data/generated/google/apis/appengine_v1.rb +40 -0
  22. data/generated/google/apis/appengine_v1/classes.rb +2251 -0
  23. data/generated/google/apis/appengine_v1/representations.rb +858 -0
  24. data/generated/google/apis/appengine_v1/service.rb +894 -0
  25. data/generated/google/apis/bigquery_v2.rb +1 -1
  26. data/generated/google/apis/bigquery_v2/classes.rb +11 -6
  27. data/generated/google/apis/books_v1.rb +1 -1
  28. data/generated/google/apis/books_v1/classes.rb +26 -0
  29. data/generated/google/apis/books_v1/representations.rb +15 -0
  30. data/generated/google/apis/books_v1/service.rb +4 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
  35. data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
  36. data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
  37. data/generated/google/apis/clouddebugger_v2.rb +3 -3
  38. data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
  39. data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
  40. data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
  41. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
  42. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
  43. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
  44. data/generated/google/apis/cloudfunctions_v1.rb +35 -0
  45. data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
  46. data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
  47. data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
  48. data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
  49. data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
  50. data/generated/google/apis/cloudkms_v1/service.rb +194 -194
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
  59. data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
  60. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  61. data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
  62. data/generated/google/apis/compute_beta.rb +1 -1
  63. data/generated/google/apis/compute_beta/classes.rb +32 -7
  64. data/generated/google/apis/compute_beta/representations.rb +2 -0
  65. data/generated/google/apis/compute_beta/service.rb +11 -11
  66. data/generated/google/apis/compute_v1.rb +1 -1
  67. data/generated/google/apis/compute_v1/classes.rb +95 -2
  68. data/generated/google/apis/compute_v1/representations.rb +33 -0
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
  71. data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
  74. data/generated/google/apis/dataproc_v1/representations.rb +200 -200
  75. data/generated/google/apis/dataproc_v1/service.rb +356 -356
  76. data/generated/google/apis/datastore_v1.rb +4 -4
  77. data/generated/google/apis/datastore_v1/classes.rb +701 -690
  78. data/generated/google/apis/datastore_v1/representations.rb +160 -160
  79. data/generated/google/apis/datastore_v1/service.rb +52 -52
  80. data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
  81. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2.rb +1 -1
  83. data/generated/google/apis/drive_v2/classes.rb +158 -35
  84. data/generated/google/apis/drive_v2/representations.rb +39 -0
  85. data/generated/google/apis/drive_v2/service.rb +4 -4
  86. data/generated/google/apis/drive_v3.rb +1 -1
  87. data/generated/google/apis/drive_v3/classes.rb +162 -33
  88. data/generated/google/apis/drive_v3/representations.rb +39 -0
  89. data/generated/google/apis/drive_v3/service.rb +4 -4
  90. data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
  91. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
  92. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
  93. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
  94. data/generated/google/apis/firebaserules_v1.rb +41 -0
  95. data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
  96. data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
  97. data/generated/google/apis/firebaserules_v1/service.rb +495 -0
  98. data/generated/google/apis/games_v1/classes.rb +4 -0
  99. data/generated/google/apis/genomics_v1.rb +7 -7
  100. data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
  101. data/generated/google/apis/genomics_v1/representations.rb +387 -387
  102. data/generated/google/apis/genomics_v1/service.rb +1187 -1187
  103. data/generated/google/apis/gmail_v1/classes.rb +3 -0
  104. data/generated/google/apis/iam_v1.rb +1 -1
  105. data/generated/google/apis/iam_v1/classes.rb +123 -117
  106. data/generated/google/apis/iam_v1/representations.rb +33 -33
  107. data/generated/google/apis/iam_v1/service.rb +109 -109
  108. data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
  109. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  110. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  111. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  112. data/generated/google/apis/language_v1.rb +36 -0
  113. data/generated/google/apis/language_v1/classes.rb +757 -0
  114. data/generated/google/apis/language_v1/representations.rb +338 -0
  115. data/generated/google/apis/language_v1/service.rb +185 -0
  116. data/generated/google/apis/language_v1beta1/classes.rb +407 -407
  117. data/generated/google/apis/language_v1beta1/representations.rb +103 -103
  118. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  119. data/generated/google/apis/logging_v2.rb +46 -0
  120. data/generated/google/apis/logging_v2/classes.rb +1271 -0
  121. data/generated/google/apis/logging_v2/representations.rb +421 -0
  122. data/generated/google/apis/logging_v2/service.rb +1569 -0
  123. data/generated/google/apis/logging_v2beta1.rb +1 -1
  124. data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
  125. data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
  126. data/generated/google/apis/logging_v2beta1/service.rb +235 -235
  127. data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
  128. data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
  129. data/generated/google/apis/ml_v1.rb +34 -0
  130. data/generated/google/apis/ml_v1/classes.rb +1617 -0
  131. data/generated/google/apis/ml_v1/representations.rb +498 -0
  132. data/generated/google/apis/ml_v1/service.rb +769 -0
  133. data/generated/google/apis/monitoring_v3.rb +4 -4
  134. data/generated/google/apis/monitoring_v3/classes.rb +630 -630
  135. data/generated/google/apis/monitoring_v3/representations.rb +134 -134
  136. data/generated/google/apis/monitoring_v3/service.rb +240 -240
  137. data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
  138. data/generated/google/apis/partners_v2.rb +1 -1
  139. data/generated/google/apis/partners_v2/classes.rb +639 -639
  140. data/generated/google/apis/partners_v2/representations.rb +168 -168
  141. data/generated/google/apis/partners_v2/service.rb +381 -381
  142. data/generated/google/apis/people_v1.rb +10 -10
  143. data/generated/google/apis/people_v1/classes.rb +524 -524
  144. data/generated/google/apis/people_v1/representations.rb +143 -143
  145. data/generated/google/apis/people_v1/service.rb +30 -30
  146. data/generated/google/apis/plus_domains_v1.rb +1 -1
  147. data/generated/google/apis/plus_v1.rb +1 -1
  148. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
  149. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
  150. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
  151. data/generated/google/apis/pubsub_v1/classes.rb +175 -173
  152. data/generated/google/apis/pubsub_v1/representations.rb +53 -53
  153. data/generated/google/apis/pubsub_v1/service.rb +210 -210
  154. data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
  155. data/generated/google/apis/runtimeconfig_v1.rb +38 -0
  156. data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
  157. data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
  158. data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
  159. data/generated/google/apis/script_v1.rb +1 -1
  160. data/generated/google/apis/script_v1/classes.rb +6 -6
  161. data/generated/google/apis/script_v1/representations.rb +1 -1
  162. data/generated/google/apis/searchconsole_v1.rb +31 -0
  163. data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
  164. data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
  165. data/generated/google/apis/searchconsole_v1/service.rb +88 -0
  166. data/generated/google/apis/servicecontrol_v1.rb +38 -0
  167. data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
  168. data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
  169. data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
  170. data/generated/google/apis/servicemanagement_v1.rb +45 -0
  171. data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
  172. data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
  173. data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
  174. data/generated/google/apis/serviceuser_v1.rb +42 -0
  175. data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
  176. data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
  177. data/generated/google/apis/serviceuser_v1/service.rb +214 -0
  178. data/generated/google/apis/sheets_v4.rb +3 -3
  179. data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
  180. data/generated/google/apis/sheets_v4/representations.rb +381 -381
  181. data/generated/google/apis/sheets_v4/service.rb +48 -48
  182. data/generated/google/apis/slides_v1.rb +3 -3
  183. data/generated/google/apis/slides_v1/classes.rb +2860 -2860
  184. data/generated/google/apis/slides_v1/representations.rb +693 -693
  185. data/generated/google/apis/slides_v1/service.rb +30 -30
  186. data/generated/google/apis/sourcerepo_v1.rb +34 -0
  187. data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
  188. data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
  189. data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
  190. data/generated/google/apis/spanner_v1.rb +35 -0
  191. data/generated/google/apis/spanner_v1/classes.rb +3294 -0
  192. data/generated/google/apis/spanner_v1/representations.rb +984 -0
  193. data/generated/google/apis/spanner_v1/service.rb +1504 -0
  194. data/generated/google/apis/speech_v1beta1.rb +1 -1
  195. data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
  196. data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
  197. data/generated/google/apis/speech_v1beta1/service.rb +27 -27
  198. data/generated/google/apis/storage_v1.rb +1 -1
  199. data/generated/google/apis/storage_v1/classes.rb +131 -0
  200. data/generated/google/apis/storage_v1/representations.rb +51 -0
  201. data/generated/google/apis/storage_v1/service.rb +182 -0
  202. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  203. data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
  204. data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
  205. data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
  206. data/generated/google/apis/surveys_v2.rb +40 -0
  207. data/generated/google/apis/surveys_v2/classes.rb +806 -0
  208. data/generated/google/apis/surveys_v2/representations.rb +347 -0
  209. data/generated/google/apis/surveys_v2/service.rb +477 -0
  210. data/generated/google/apis/tagmanager_v2.rb +52 -0
  211. data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
  212. data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
  213. data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
  214. data/generated/google/apis/toolresults_v1beta3.rb +34 -0
  215. data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
  216. data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
  217. data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
  218. data/generated/google/apis/tracing_v1.rb +40 -0
  219. data/generated/google/apis/tracing_v1/classes.rb +664 -0
  220. data/generated/google/apis/tracing_v1/representations.rb +279 -0
  221. data/generated/google/apis/tracing_v1/service.rb +225 -0
  222. data/generated/google/apis/vision_v1.rb +1 -1
  223. data/generated/google/apis/vision_v1/classes.rb +1223 -1222
  224. data/generated/google/apis/vision_v1/representations.rb +234 -234
  225. data/generated/google/apis/vision_v1/service.rb +10 -10
  226. data/generated/google/apis/webfonts_v1.rb +33 -0
  227. data/generated/google/apis/webfonts_v1/classes.rb +113 -0
  228. data/generated/google/apis/webfonts_v1/representations.rb +62 -0
  229. data/generated/google/apis/webfonts_v1/service.rb +102 -0
  230. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  231. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  232. data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
  233. data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
  234. data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
  235. data/generated/google/apis/youtube_v3/classes.rb +1 -0
  236. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  237. data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
  238. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  239. data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
  240. data/lib/google/apis/generator/annotator.rb +5 -4
  241. data/lib/google/apis/generator/templates/_class.tmpl +3 -0
  242. data/lib/google/apis/version.rb +1 -1
  243. data/samples/cli/lib/samples/adsense.rb +99 -0
  244. data/samples/cli/lib/samples/analytics.rb +18 -0
  245. data/samples/cli/lib/samples/gmail.rb +33 -0
  246. data/samples/cli/lib/samples/vision.rb +69 -0
  247. metadata +89 -4
  248. data/sync.rb +0 -71
@@ -22,263 +22,20 @@ module Google
22
22
  module Apis
23
23
  module LanguageV1beta1
24
24
 
25
- # Represents the smallest syntactic building block of the text.
26
- class Token
27
- include Google::Apis::Core::Hashable
28
-
29
- # Represents part of speech information for a token.
30
- # Corresponds to the JSON property `partOfSpeech`
31
- # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
32
- attr_accessor :part_of_speech
33
-
34
- # Represents an output piece of text.
35
- # Corresponds to the JSON property `text`
36
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
37
- attr_accessor :text
38
-
39
- # Represents dependency parse tree information for a token.
40
- # Corresponds to the JSON property `dependencyEdge`
41
- # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
42
- attr_accessor :dependency_edge
43
-
44
- # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
45
- # Corresponds to the JSON property `lemma`
46
- # @return [String]
47
- attr_accessor :lemma
48
-
49
- def initialize(**args)
50
- update!(**args)
51
- end
52
-
53
- # Update properties of this object
54
- def update!(**args)
55
- @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
56
- @text = args[:text] if args.key?(:text)
57
- @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
58
- @lemma = args[:lemma] if args.key?(:lemma)
59
- end
60
- end
61
-
62
- # Represents an output piece of text.
63
- class TextSpan
64
- include Google::Apis::Core::Hashable
65
-
66
- # The content of the output text.
67
- # Corresponds to the JSON property `content`
68
- # @return [String]
69
- attr_accessor :content
70
-
71
- # The API calculates the beginning offset of the content in the original
72
- # document according to the EncodingType specified in the API request.
73
- # Corresponds to the JSON property `beginOffset`
74
- # @return [Fixnum]
75
- attr_accessor :begin_offset
76
-
77
- def initialize(**args)
78
- update!(**args)
79
- end
80
-
81
- # Update properties of this object
82
- def update!(**args)
83
- @content = args[:content] if args.key?(:content)
84
- @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
85
- end
86
- end
87
-
88
- # The `Status` type defines a logical error model that is suitable for different
89
- # programming environments, including REST APIs and RPC APIs. It is used by
90
- # [gRPC](https://github.com/grpc). The error model is designed to be:
91
- # - Simple to use and understand for most users
92
- # - Flexible enough to meet unexpected needs
93
- # # Overview
94
- # The `Status` message contains three pieces of data: error code, error message,
95
- # and error details. The error code should be an enum value of
96
- # google.rpc.Code, but it may accept additional error codes if needed. The
97
- # error message should be a developer-facing English message that helps
98
- # developers *understand* and *resolve* the error. If a localized user-facing
99
- # error message is needed, put the localized message in the error details or
100
- # localize it in the client. The optional error details may contain arbitrary
101
- # information about the error. There is a predefined set of error detail types
102
- # in the package `google.rpc` which can be used for common error conditions.
103
- # # Language mapping
104
- # The `Status` message is the logical representation of the error model, but it
105
- # is not necessarily the actual wire format. When the `Status` message is
106
- # exposed in different client libraries and different wire protocols, it can be
107
- # mapped differently. For example, it will likely be mapped to some exceptions
108
- # in Java, but more likely mapped to some error codes in C.
109
- # # Other uses
110
- # The error model and the `Status` message can be used in a variety of
111
- # environments, either with or without APIs, to provide a
112
- # consistent developer experience across different environments.
113
- # Example uses of this error model include:
114
- # - Partial errors. If a service needs to return partial errors to the client,
115
- # it may embed the `Status` in the normal response to indicate the partial
116
- # errors.
117
- # - Workflow errors. A typical workflow has multiple steps. Each step may
118
- # have a `Status` message for error reporting purpose.
119
- # - Batch operations. If a client uses batch request and batch response, the
120
- # `Status` message should be used directly inside batch response, one for
121
- # each error sub-response.
122
- # - Asynchronous operations. If an API call embeds asynchronous operation
123
- # results in its response, the status of those operations should be
124
- # represented directly using the `Status` message.
125
- # - Logging. If some API errors are stored in logs, the message `Status` could
126
- # be used directly after any stripping needed for security/privacy reasons.
127
- class Status
128
- include Google::Apis::Core::Hashable
129
-
130
- # A list of messages that carry the error details. There will be a
131
- # common set of message types for APIs to use.
132
- # Corresponds to the JSON property `details`
133
- # @return [Array<Hash<String,Object>>]
134
- attr_accessor :details
135
-
136
- # The status code, which should be an enum value of google.rpc.Code.
137
- # Corresponds to the JSON property `code`
138
- # @return [Fixnum]
139
- attr_accessor :code
140
-
141
- # A developer-facing error message, which should be in English. Any
142
- # user-facing error message should be localized and sent in the
143
- # google.rpc.Status.details field, or localized by the client.
144
- # Corresponds to the JSON property `message`
145
- # @return [String]
146
- attr_accessor :message
147
-
148
- def initialize(**args)
149
- update!(**args)
150
- end
151
-
152
- # Update properties of this object
153
- def update!(**args)
154
- @details = args[:details] if args.key?(:details)
155
- @code = args[:code] if args.key?(:code)
156
- @message = args[:message] if args.key?(:message)
157
- end
158
- end
159
-
160
- # Represents a mention for an entity in the text. Currently, proper noun
161
- # mentions are supported.
162
- class EntityMention
163
- include Google::Apis::Core::Hashable
164
-
165
- # Represents an output piece of text.
166
- # Corresponds to the JSON property `text`
167
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
168
- attr_accessor :text
169
-
170
- # The type of the entity mention.
171
- # Corresponds to the JSON property `type`
172
- # @return [String]
173
- attr_accessor :type
174
-
175
- def initialize(**args)
176
- update!(**args)
177
- end
178
-
179
- # Update properties of this object
180
- def update!(**args)
181
- @text = args[:text] if args.key?(:text)
182
- @type = args[:type] if args.key?(:type)
183
- end
184
- end
185
-
186
- # All available features for sentiment, syntax, and semantic analysis.
187
- # Setting each one to true will enable that specific analysis for the input.
188
- class Features
189
- include Google::Apis::Core::Hashable
190
-
191
- # Extract syntax information.
192
- # Corresponds to the JSON property `extractSyntax`
193
- # @return [Boolean]
194
- attr_accessor :extract_syntax
195
- alias_method :extract_syntax?, :extract_syntax
196
-
197
- # Extract document-level sentiment.
198
- # Corresponds to the JSON property `extractDocumentSentiment`
199
- # @return [Boolean]
200
- attr_accessor :extract_document_sentiment
201
- alias_method :extract_document_sentiment?, :extract_document_sentiment
202
-
203
- # Extract entities.
204
- # Corresponds to the JSON property `extractEntities`
205
- # @return [Boolean]
206
- attr_accessor :extract_entities
207
- alias_method :extract_entities?, :extract_entities
208
-
209
- def initialize(**args)
210
- update!(**args)
211
- end
212
-
213
- # Update properties of this object
214
- def update!(**args)
215
- @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
216
- @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
217
- @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
218
- end
219
- end
220
-
221
- # Represents a sentence in the input document.
222
- class Sentence
223
- include Google::Apis::Core::Hashable
224
-
225
- # Represents an output piece of text.
226
- # Corresponds to the JSON property `text`
227
- # @return [Google::Apis::LanguageV1beta1::TextSpan]
228
- attr_accessor :text
229
-
230
- # Represents the feeling associated with the entire text or entities in
231
- # the text.
232
- # Corresponds to the JSON property `sentiment`
233
- # @return [Google::Apis::LanguageV1beta1::Sentiment]
234
- attr_accessor :sentiment
235
-
236
- def initialize(**args)
237
- update!(**args)
238
- end
239
-
240
- # Update properties of this object
241
- def update!(**args)
242
- @text = args[:text] if args.key?(:text)
243
- @sentiment = args[:sentiment] if args.key?(:sentiment)
244
- end
245
- end
246
-
247
- # ################################################################ #
248
- # Represents the input to API methods.
249
- class Document
25
+ # The entity analysis request message.
26
+ class AnalyzeEntitiesRequest
250
27
  include Google::Apis::Core::Hashable
251
28
 
252
- # The language of the document (if not specified, the language is
253
- # automatically detected). Both ISO and BCP-47 language codes are
254
- # accepted.<br>
255
- # **Current Language Restrictions:**
256
- # * Only English, Spanish, and Japanese textual content are supported.
257
- # If the language (either specified by the caller or automatically detected)
258
- # is not supported by the called API method, an `INVALID_ARGUMENT` error
259
- # is returned.
260
- # Corresponds to the JSON property `language`
261
- # @return [String]
262
- attr_accessor :language
263
-
264
- # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
265
- # returns an `INVALID_ARGUMENT` error.
266
- # Corresponds to the JSON property `type`
267
- # @return [String]
268
- attr_accessor :type
269
-
270
- # The content of the input in string format.
271
- # Corresponds to the JSON property `content`
29
+ # The encoding type used by the API to calculate offsets.
30
+ # Corresponds to the JSON property `encodingType`
272
31
  # @return [String]
273
- attr_accessor :content
32
+ attr_accessor :encoding_type
274
33
 
275
- # The Google Cloud Storage URI where the file content is located.
276
- # This URI must be of the form: gs://bucket_name/object_name. For more
277
- # details, see https://cloud.google.com/storage/docs/reference-uris.
278
- # NOTE: Cloud Storage object versioning is not supported.
279
- # Corresponds to the JSON property `gcsContentUri`
280
- # @return [String]
281
- attr_accessor :gcs_content_uri
34
+ # ################################################################ #
35
+ # Represents the input to API methods.
36
+ # Corresponds to the JSON property `document`
37
+ # @return [Google::Apis::LanguageV1beta1::Document]
38
+ attr_accessor :document
282
39
 
283
40
  def initialize(**args)
284
41
  update!(**args)
@@ -286,10 +43,8 @@ module Google
286
43
 
287
44
  # Update properties of this object
288
45
  def update!(**args)
289
- @language = args[:language] if args.key?(:language)
290
- @type = args[:type] if args.key?(:type)
291
- @content = args[:content] if args.key?(:content)
292
- @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
46
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
47
+ @document = args[:document] if args.key?(:document)
293
48
  end
294
49
  end
295
50
 
@@ -330,32 +85,6 @@ module Google
330
85
  end
331
86
  end
332
87
 
333
- # The entity analysis request message.
334
- class AnalyzeEntitiesRequest
335
- include Google::Apis::Core::Hashable
336
-
337
- # ################################################################ #
338
- # Represents the input to API methods.
339
- # Corresponds to the JSON property `document`
340
- # @return [Google::Apis::LanguageV1beta1::Document]
341
- attr_accessor :document
342
-
343
- # The encoding type used by the API to calculate offsets.
344
- # Corresponds to the JSON property `encodingType`
345
- # @return [String]
346
- attr_accessor :encoding_type
347
-
348
- def initialize(**args)
349
- update!(**args)
350
- end
351
-
352
- # Update properties of this object
353
- def update!(**args)
354
- @document = args[:document] if args.key?(:document)
355
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
356
- end
357
- end
358
-
359
88
  # Represents part of speech information for a token.
360
89
  class PartOfSpeech
361
90
  include Google::Apis::Core::Hashable
@@ -442,13 +171,8 @@ module Google
442
171
  end
443
172
 
444
173
  # The syntax analysis request message.
445
- class AnalyzeSyntaxRequest
446
- include Google::Apis::Core::Hashable
447
-
448
- # The encoding type used by the API to calculate offsets.
449
- # Corresponds to the JSON property `encodingType`
450
- # @return [String]
451
- attr_accessor :encoding_type
174
+ class AnalyzeSyntaxRequest
175
+ include Google::Apis::Core::Hashable
452
176
 
453
177
  # ################################################################ #
454
178
  # Represents the input to API methods.
@@ -456,14 +180,19 @@ module Google
456
180
  # @return [Google::Apis::LanguageV1beta1::Document]
457
181
  attr_accessor :document
458
182
 
183
+ # The encoding type used by the API to calculate offsets.
184
+ # Corresponds to the JSON property `encodingType`
185
+ # @return [String]
186
+ attr_accessor :encoding_type
187
+
459
188
  def initialize(**args)
460
189
  update!(**args)
461
190
  end
462
191
 
463
192
  # Update properties of this object
464
193
  def update!(**args)
465
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
466
194
  @document = args[:document] if args.key?(:document)
195
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
467
196
  end
468
197
  end
469
198
 
@@ -471,12 +200,6 @@ module Google
471
200
  class AnalyzeSentimentResponse
472
201
  include Google::Apis::Core::Hashable
473
202
 
474
- # The language of the text, which will be the same as the language specified
475
- # in the request or, if not specified, the automatically-detected language.
476
- # Corresponds to the JSON property `language`
477
- # @return [String]
478
- attr_accessor :language
479
-
480
203
  # The sentiment for all the sentences in the document.
481
204
  # Corresponds to the JSON property `sentences`
482
205
  # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
@@ -488,15 +211,21 @@ module Google
488
211
  # @return [Google::Apis::LanguageV1beta1::Sentiment]
489
212
  attr_accessor :document_sentiment
490
213
 
214
+ # The language of the text, which will be the same as the language specified
215
+ # in the request or, if not specified, the automatically-detected language.
216
+ # Corresponds to the JSON property `language`
217
+ # @return [String]
218
+ attr_accessor :language
219
+
491
220
  def initialize(**args)
492
221
  update!(**args)
493
222
  end
494
223
 
495
224
  # Update properties of this object
496
225
  def update!(**args)
497
- @language = args[:language] if args.key?(:language)
498
226
  @sentences = args[:sentences] if args.key?(:sentences)
499
227
  @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
228
+ @language = args[:language] if args.key?(:language)
500
229
  end
501
230
  end
502
231
 
@@ -571,34 +300,310 @@ module Google
571
300
 
572
301
  # Update properties of this object
573
302
  def update!(**args)
574
- @mentions = args[:mentions] if args.key?(:mentions)
575
- @name = args[:name] if args.key?(:name)
576
- @type = args[:type] if args.key?(:type)
577
- @metadata = args[:metadata] if args.key?(:metadata)
578
- @salience = args[:salience] if args.key?(:salience)
303
+ @mentions = args[:mentions] if args.key?(:mentions)
304
+ @name = args[:name] if args.key?(:name)
305
+ @type = args[:type] if args.key?(:type)
306
+ @metadata = args[:metadata] if args.key?(:metadata)
307
+ @salience = args[:salience] if args.key?(:salience)
308
+ end
309
+ end
310
+
311
+ # The syntax analysis response message.
312
+ class AnalyzeSyntaxResponse
313
+ include Google::Apis::Core::Hashable
314
+
315
+ # The language of the text, which will be the same as the language specified
316
+ # in the request or, if not specified, the automatically-detected language.
317
+ # See Document.language field for more details.
318
+ # Corresponds to the JSON property `language`
319
+ # @return [String]
320
+ attr_accessor :language
321
+
322
+ # Sentences in the input document.
323
+ # Corresponds to the JSON property `sentences`
324
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
325
+ attr_accessor :sentences
326
+
327
+ # Tokens, along with their syntactic information, in the input document.
328
+ # Corresponds to the JSON property `tokens`
329
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
330
+ attr_accessor :tokens
331
+
332
+ def initialize(**args)
333
+ update!(**args)
334
+ end
335
+
336
+ # Update properties of this object
337
+ def update!(**args)
338
+ @language = args[:language] if args.key?(:language)
339
+ @sentences = args[:sentences] if args.key?(:sentences)
340
+ @tokens = args[:tokens] if args.key?(:tokens)
341
+ end
342
+ end
343
+
344
+ # The request message for the text annotation API, which can perform multiple
345
+ # analysis types (sentiment, entities, and syntax) in one call.
346
+ class AnnotateTextRequest
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # The encoding type used by the API to calculate offsets.
350
+ # Corresponds to the JSON property `encodingType`
351
+ # @return [String]
352
+ attr_accessor :encoding_type
353
+
354
+ # ################################################################ #
355
+ # Represents the input to API methods.
356
+ # Corresponds to the JSON property `document`
357
+ # @return [Google::Apis::LanguageV1beta1::Document]
358
+ attr_accessor :document
359
+
360
+ # All available features for sentiment, syntax, and semantic analysis.
361
+ # Setting each one to true will enable that specific analysis for the input.
362
+ # Corresponds to the JSON property `features`
363
+ # @return [Google::Apis::LanguageV1beta1::Features]
364
+ attr_accessor :features
365
+
366
+ def initialize(**args)
367
+ update!(**args)
368
+ end
369
+
370
+ # Update properties of this object
371
+ def update!(**args)
372
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
373
+ @document = args[:document] if args.key?(:document)
374
+ @features = args[:features] if args.key?(:features)
375
+ end
376
+ end
377
+
378
+ # The text annotations response message.
379
+ class AnnotateTextResponse
380
+ include Google::Apis::Core::Hashable
381
+
382
+ # Sentences in the input document. Populated if the user enables
383
+ # AnnotateTextRequest.Features.extract_syntax.
384
+ # Corresponds to the JSON property `sentences`
385
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
386
+ attr_accessor :sentences
387
+
388
+ # Tokens, along with their syntactic information, in the input document.
389
+ # Populated if the user enables
390
+ # AnnotateTextRequest.Features.extract_syntax.
391
+ # Corresponds to the JSON property `tokens`
392
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
393
+ attr_accessor :tokens
394
+
395
+ # Entities, along with their semantic information, in the input document.
396
+ # Populated if the user enables
397
+ # AnnotateTextRequest.Features.extract_entities.
398
+ # Corresponds to the JSON property `entities`
399
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
400
+ attr_accessor :entities
401
+
402
+ # Represents the feeling associated with the entire text or entities in
403
+ # the text.
404
+ # Corresponds to the JSON property `documentSentiment`
405
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
406
+ attr_accessor :document_sentiment
407
+
408
+ # The language of the text, which will be the same as the language specified
409
+ # in the request or, if not specified, the automatically-detected language.
410
+ # See Document.language field for more details.
411
+ # Corresponds to the JSON property `language`
412
+ # @return [String]
413
+ attr_accessor :language
414
+
415
+ def initialize(**args)
416
+ update!(**args)
417
+ end
418
+
419
+ # Update properties of this object
420
+ def update!(**args)
421
+ @sentences = args[:sentences] if args.key?(:sentences)
422
+ @tokens = args[:tokens] if args.key?(:tokens)
423
+ @entities = args[:entities] if args.key?(:entities)
424
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
425
+ @language = args[:language] if args.key?(:language)
426
+ end
427
+ end
428
+
429
+ # The sentiment analysis request message.
430
+ class AnalyzeSentimentRequest
431
+ include Google::Apis::Core::Hashable
432
+
433
+ # ################################################################ #
434
+ # Represents the input to API methods.
435
+ # Corresponds to the JSON property `document`
436
+ # @return [Google::Apis::LanguageV1beta1::Document]
437
+ attr_accessor :document
438
+
439
+ # The encoding type used by the API to calculate sentence offsets for the
440
+ # sentence sentiment.
441
+ # Corresponds to the JSON property `encodingType`
442
+ # @return [String]
443
+ attr_accessor :encoding_type
444
+
445
+ def initialize(**args)
446
+ update!(**args)
447
+ end
448
+
449
+ # Update properties of this object
450
+ def update!(**args)
451
+ @document = args[:document] if args.key?(:document)
452
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
453
+ end
454
+ end
455
+
456
+ # Represents dependency parse tree information for a token.
457
+ class DependencyEdge
458
+ include Google::Apis::Core::Hashable
459
+
460
+ # Represents the head of this token in the dependency tree.
461
+ # This is the index of the token which has an arc going to this token.
462
+ # The index is the position of the token in the array of tokens returned
463
+ # by the API method. If this token is a root token, then the
464
+ # `head_token_index` is its own index.
465
+ # Corresponds to the JSON property `headTokenIndex`
466
+ # @return [Fixnum]
467
+ attr_accessor :head_token_index
468
+
469
+ # The parse label for the token.
470
+ # Corresponds to the JSON property `label`
471
+ # @return [String]
472
+ attr_accessor :label
473
+
474
+ def initialize(**args)
475
+ update!(**args)
476
+ end
477
+
478
+ # Update properties of this object
479
+ def update!(**args)
480
+ @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
481
+ @label = args[:label] if args.key?(:label)
482
+ end
483
+ end
484
+
485
+ # Represents the smallest syntactic building block of the text.
486
+ class Token
487
+ include Google::Apis::Core::Hashable
488
+
489
+ # Represents an output piece of text.
490
+ # Corresponds to the JSON property `text`
491
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
492
+ attr_accessor :text
493
+
494
+ # Represents dependency parse tree information for a token.
495
+ # Corresponds to the JSON property `dependencyEdge`
496
+ # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
497
+ attr_accessor :dependency_edge
498
+
499
+ # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
500
+ # Corresponds to the JSON property `lemma`
501
+ # @return [String]
502
+ attr_accessor :lemma
503
+
504
+ # Represents part of speech information for a token.
505
+ # Corresponds to the JSON property `partOfSpeech`
506
+ # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
507
+ attr_accessor :part_of_speech
508
+
509
+ def initialize(**args)
510
+ update!(**args)
511
+ end
512
+
513
+ # Update properties of this object
514
+ def update!(**args)
515
+ @text = args[:text] if args.key?(:text)
516
+ @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
517
+ @lemma = args[:lemma] if args.key?(:lemma)
518
+ @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
519
+ end
520
+ end
521
+
522
+ # Represents an output piece of text.
523
+ class TextSpan
524
+ include Google::Apis::Core::Hashable
525
+
526
+ # The API calculates the beginning offset of the content in the original
527
+ # document according to the EncodingType specified in the API request.
528
+ # Corresponds to the JSON property `beginOffset`
529
+ # @return [Fixnum]
530
+ attr_accessor :begin_offset
531
+
532
+ # The content of the output text.
533
+ # Corresponds to the JSON property `content`
534
+ # @return [String]
535
+ attr_accessor :content
536
+
537
+ def initialize(**args)
538
+ update!(**args)
539
+ end
540
+
541
+ # Update properties of this object
542
+ def update!(**args)
543
+ @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
544
+ @content = args[:content] if args.key?(:content)
579
545
  end
580
546
  end
581
547
 
582
- # The syntax analysis response message.
583
- class AnalyzeSyntaxResponse
548
+ # The `Status` type defines a logical error model that is suitable for different
549
+ # programming environments, including REST APIs and RPC APIs. It is used by
550
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
551
+ # - Simple to use and understand for most users
552
+ # - Flexible enough to meet unexpected needs
553
+ # # Overview
554
+ # The `Status` message contains three pieces of data: error code, error message,
555
+ # and error details. The error code should be an enum value of
556
+ # google.rpc.Code, but it may accept additional error codes if needed. The
557
+ # error message should be a developer-facing English message that helps
558
+ # developers *understand* and *resolve* the error. If a localized user-facing
559
+ # error message is needed, put the localized message in the error details or
560
+ # localize it in the client. The optional error details may contain arbitrary
561
+ # information about the error. There is a predefined set of error detail types
562
+ # in the package `google.rpc` which can be used for common error conditions.
563
+ # # Language mapping
564
+ # The `Status` message is the logical representation of the error model, but it
565
+ # is not necessarily the actual wire format. When the `Status` message is
566
+ # exposed in different client libraries and different wire protocols, it can be
567
+ # mapped differently. For example, it will likely be mapped to some exceptions
568
+ # in Java, but more likely mapped to some error codes in C.
569
+ # # Other uses
570
+ # The error model and the `Status` message can be used in a variety of
571
+ # environments, either with or without APIs, to provide a
572
+ # consistent developer experience across different environments.
573
+ # Example uses of this error model include:
574
+ # - Partial errors. If a service needs to return partial errors to the client,
575
+ # it may embed the `Status` in the normal response to indicate the partial
576
+ # errors.
577
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
578
+ # have a `Status` message for error reporting purpose.
579
+ # - Batch operations. If a client uses batch request and batch response, the
580
+ # `Status` message should be used directly inside batch response, one for
581
+ # each error sub-response.
582
+ # - Asynchronous operations. If an API call embeds asynchronous operation
583
+ # results in its response, the status of those operations should be
584
+ # represented directly using the `Status` message.
585
+ # - Logging. If some API errors are stored in logs, the message `Status` could
586
+ # be used directly after any stripping needed for security/privacy reasons.
587
+ class Status
584
588
  include Google::Apis::Core::Hashable
585
589
 
586
- # Sentences in the input document.
587
- # Corresponds to the JSON property `sentences`
588
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
589
- attr_accessor :sentences
590
-
591
- # Tokens, along with their syntactic information, in the input document.
592
- # Corresponds to the JSON property `tokens`
593
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
594
- attr_accessor :tokens
590
+ # The status code, which should be an enum value of google.rpc.Code.
591
+ # Corresponds to the JSON property `code`
592
+ # @return [Fixnum]
593
+ attr_accessor :code
595
594
 
596
- # The language of the text, which will be the same as the language specified
597
- # in the request or, if not specified, the automatically-detected language.
598
- # See Document.language field for more details.
599
- # Corresponds to the JSON property `language`
595
+ # A developer-facing error message, which should be in English. Any
596
+ # user-facing error message should be localized and sent in the
597
+ # google.rpc.Status.details field, or localized by the client.
598
+ # Corresponds to the JSON property `message`
600
599
  # @return [String]
601
- attr_accessor :language
600
+ attr_accessor :message
601
+
602
+ # A list of messages that carry the error details. There will be a
603
+ # common set of message types for APIs to use.
604
+ # Corresponds to the JSON property `details`
605
+ # @return [Array<Hash<String,Object>>]
606
+ attr_accessor :details
602
607
 
603
608
  def initialize(**args)
604
609
  update!(**args)
@@ -606,33 +611,26 @@ module Google
606
611
 
607
612
  # Update properties of this object
608
613
  def update!(**args)
609
- @sentences = args[:sentences] if args.key?(:sentences)
610
- @tokens = args[:tokens] if args.key?(:tokens)
611
- @language = args[:language] if args.key?(:language)
614
+ @code = args[:code] if args.key?(:code)
615
+ @message = args[:message] if args.key?(:message)
616
+ @details = args[:details] if args.key?(:details)
612
617
  end
613
618
  end
614
619
 
615
- # The request message for the text annotation API, which can perform multiple
616
- # analysis types (sentiment, entities, and syntax) in one call.
617
- class AnnotateTextRequest
620
+ # Represents a mention for an entity in the text. Currently, proper noun
621
+ # mentions are supported.
622
+ class EntityMention
618
623
  include Google::Apis::Core::Hashable
619
624
 
620
- # The encoding type used by the API to calculate offsets.
621
- # Corresponds to the JSON property `encodingType`
622
- # @return [String]
623
- attr_accessor :encoding_type
624
-
625
- # ################################################################ #
626
- # Represents the input to API methods.
627
- # Corresponds to the JSON property `document`
628
- # @return [Google::Apis::LanguageV1beta1::Document]
629
- attr_accessor :document
625
+ # Represents an output piece of text.
626
+ # Corresponds to the JSON property `text`
627
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
628
+ attr_accessor :text
630
629
 
631
- # All available features for sentiment, syntax, and semantic analysis.
632
- # Setting each one to true will enable that specific analysis for the input.
633
- # Corresponds to the JSON property `features`
634
- # @return [Google::Apis::LanguageV1beta1::Features]
635
- attr_accessor :features
630
+ # The type of the entity mention.
631
+ # Corresponds to the JSON property `type`
632
+ # @return [String]
633
+ attr_accessor :type
636
634
 
637
635
  def initialize(**args)
638
636
  update!(**args)
@@ -640,27 +638,33 @@ module Google
640
638
 
641
639
  # Update properties of this object
642
640
  def update!(**args)
643
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
644
- @document = args[:document] if args.key?(:document)
645
- @features = args[:features] if args.key?(:features)
641
+ @text = args[:text] if args.key?(:text)
642
+ @type = args[:type] if args.key?(:type)
646
643
  end
647
644
  end
648
645
 
649
- # The sentiment analysis request message.
650
- class AnalyzeSentimentRequest
646
+ # All available features for sentiment, syntax, and semantic analysis.
647
+ # Setting each one to true will enable that specific analysis for the input.
648
+ class Features
651
649
  include Google::Apis::Core::Hashable
652
650
 
653
- # The encoding type used by the API to calculate sentence offsets for the
654
- # sentence sentiment.
655
- # Corresponds to the JSON property `encodingType`
656
- # @return [String]
657
- attr_accessor :encoding_type
651
+ # Extract entities.
652
+ # Corresponds to the JSON property `extractEntities`
653
+ # @return [Boolean]
654
+ attr_accessor :extract_entities
655
+ alias_method :extract_entities?, :extract_entities
658
656
 
659
- # ################################################################ #
660
- # Represents the input to API methods.
661
- # Corresponds to the JSON property `document`
662
- # @return [Google::Apis::LanguageV1beta1::Document]
663
- attr_accessor :document
657
+ # Extract syntax information.
658
+ # Corresponds to the JSON property `extractSyntax`
659
+ # @return [Boolean]
660
+ attr_accessor :extract_syntax
661
+ alias_method :extract_syntax?, :extract_syntax
662
+
663
+ # Extract document-level sentiment.
664
+ # Corresponds to the JSON property `extractDocumentSentiment`
665
+ # @return [Boolean]
666
+ attr_accessor :extract_document_sentiment
667
+ alias_method :extract_document_sentiment?, :extract_document_sentiment
664
668
 
665
669
  def initialize(**args)
666
670
  update!(**args)
@@ -668,47 +672,26 @@ module Google
668
672
 
669
673
  # Update properties of this object
670
674
  def update!(**args)
671
- @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
672
- @document = args[:document] if args.key?(:document)
675
+ @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
676
+ @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
677
+ @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
673
678
  end
674
679
  end
675
680
 
676
- # The text annotations response message.
677
- class AnnotateTextResponse
681
+ # Represents a sentence in the input document.
682
+ class Sentence
678
683
  include Google::Apis::Core::Hashable
679
684
 
680
- # The language of the text, which will be the same as the language specified
681
- # in the request or, if not specified, the automatically-detected language.
682
- # See Document.language field for more details.
683
- # Corresponds to the JSON property `language`
684
- # @return [String]
685
- attr_accessor :language
686
-
687
- # Sentences in the input document. Populated if the user enables
688
- # AnnotateTextRequest.Features.extract_syntax.
689
- # Corresponds to the JSON property `sentences`
690
- # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
691
- attr_accessor :sentences
692
-
693
- # Tokens, along with their syntactic information, in the input document.
694
- # Populated if the user enables
695
- # AnnotateTextRequest.Features.extract_syntax.
696
- # Corresponds to the JSON property `tokens`
697
- # @return [Array<Google::Apis::LanguageV1beta1::Token>]
698
- attr_accessor :tokens
699
-
700
- # Entities, along with their semantic information, in the input document.
701
- # Populated if the user enables
702
- # AnnotateTextRequest.Features.extract_entities.
703
- # Corresponds to the JSON property `entities`
704
- # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
705
- attr_accessor :entities
685
+ # Represents an output piece of text.
686
+ # Corresponds to the JSON property `text`
687
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
688
+ attr_accessor :text
706
689
 
707
690
  # Represents the feeling associated with the entire text or entities in
708
691
  # the text.
709
- # Corresponds to the JSON property `documentSentiment`
692
+ # Corresponds to the JSON property `sentiment`
710
693
  # @return [Google::Apis::LanguageV1beta1::Sentiment]
711
- attr_accessor :document_sentiment
694
+ attr_accessor :sentiment
712
695
 
713
696
  def initialize(**args)
714
697
  update!(**args)
@@ -716,31 +699,46 @@ module Google
716
699
 
717
700
  # Update properties of this object
718
701
  def update!(**args)
719
- @language = args[:language] if args.key?(:language)
720
- @sentences = args[:sentences] if args.key?(:sentences)
721
- @tokens = args[:tokens] if args.key?(:tokens)
722
- @entities = args[:entities] if args.key?(:entities)
723
- @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
702
+ @text = args[:text] if args.key?(:text)
703
+ @sentiment = args[:sentiment] if args.key?(:sentiment)
724
704
  end
725
705
  end
726
706
 
727
- # Represents dependency parse tree information for a token.
728
- class DependencyEdge
707
+ # ################################################################ #
708
+ # Represents the input to API methods.
709
+ class Document
729
710
  include Google::Apis::Core::Hashable
730
711
 
731
- # Represents the head of this token in the dependency tree.
732
- # This is the index of the token which has an arc going to this token.
733
- # The index is the position of the token in the array of tokens returned
734
- # by the API method. If this token is a root token, then the
735
- # `head_token_index` is its own index.
736
- # Corresponds to the JSON property `headTokenIndex`
737
- # @return [Fixnum]
738
- attr_accessor :head_token_index
712
+ # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
713
+ # returns an `INVALID_ARGUMENT` error.
714
+ # Corresponds to the JSON property `type`
715
+ # @return [String]
716
+ attr_accessor :type
739
717
 
740
- # The parse label for the token.
741
- # Corresponds to the JSON property `label`
718
+ # The content of the input in string format.
719
+ # Corresponds to the JSON property `content`
742
720
  # @return [String]
743
- attr_accessor :label
721
+ attr_accessor :content
722
+
723
+ # The Google Cloud Storage URI where the file content is located.
724
+ # This URI must be of the form: gs://bucket_name/object_name. For more
725
+ # details, see https://cloud.google.com/storage/docs/reference-uris.
726
+ # NOTE: Cloud Storage object versioning is not supported.
727
+ # Corresponds to the JSON property `gcsContentUri`
728
+ # @return [String]
729
+ attr_accessor :gcs_content_uri
730
+
731
+ # The language of the document (if not specified, the language is
732
+ # automatically detected). Both ISO and BCP-47 language codes are
733
+ # accepted.<br>
734
+ # **Current Language Restrictions:**
735
+ # * Only English, Spanish, and Japanese textual content are supported.
736
+ # If the language (either specified by the caller or automatically detected)
737
+ # is not supported by the called API method, an `INVALID_ARGUMENT` error
738
+ # is returned.
739
+ # Corresponds to the JSON property `language`
740
+ # @return [String]
741
+ attr_accessor :language
744
742
 
745
743
  def initialize(**args)
746
744
  update!(**args)
@@ -748,8 +746,10 @@ module Google
748
746
 
749
747
  # Update properties of this object
750
748
  def update!(**args)
751
- @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
752
- @label = args[:label] if args.key?(:label)
749
+ @type = args[:type] if args.key?(:type)
750
+ @content = args[:content] if args.key?(:content)
751
+ @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
752
+ @language = args[:language] if args.key?(:language)
753
753
  end
754
754
  end
755
755
  end