google-api-client 0.13.0 → 0.13.1

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