google-api-client 0.9.26 → 0.9.28

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