google-api-client 0.9.8 → 0.9.15
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/Gemfile +9 -1
- data/README.md +10 -2
- data/api_names.yaml +61 -110
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +160 -9
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +46 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +6 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2 -2
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +2 -2
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +371 -1
- data/generated/google/apis/analytics_v3/representations.rb +135 -0
- data/generated/google/apis/analytics_v3/service.rb +218 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +722 -48
- data/generated/google/apis/androidenterprise_v1/representations.rb +305 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1180 -146
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +9 -8
- data/generated/google/apis/appengine_v1beta5.rb +1 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +430 -288
- data/generated/google/apis/appengine_v1beta5/representations.rb +84 -10
- data/generated/google/apis/appengine_v1beta5/service.rb +285 -25
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +254 -6
- data/generated/google/apis/bigquery_v2/representations.rb +85 -0
- data/generated/google/apis/bigquery_v2/service.rb +8 -2
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +77 -0
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +16 -4
- data/generated/google/apis/civicinfo_v2/representations.rb +2 -0
- data/generated/google/apis/civicinfo_v2/service.rb +8 -2
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +176 -37
- data/generated/google/apis/classroom_v1/representations.rb +73 -9
- data/generated/google/apis/classroom_v1/service.rb +392 -37
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +320 -12
- data/generated/google/apis/cloudbuild_v1/representations.rb +136 -2
- data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
- data/generated/google/apis/clouddebugger_v2.rb +3 -6
- data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +157 -3
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +1620 -199
- data/generated/google/apis/compute_beta/representations.rb +563 -0
- data/generated/google/apis/compute_beta/service.rb +5123 -2690
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1717 -295
- data/generated/google/apis/compute_v1/representations.rb +536 -0
- data/generated/google/apis/compute_v1/service.rb +2038 -1041
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +709 -1
- data/generated/google/apis/content_v2/representations.rb +319 -0
- data/generated/google/apis/content_v2/service.rb +244 -0
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
- data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +162 -50
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11585 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9006 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +11 -3
- data/generated/google/apis/drive_v2/representations.rb +2 -0
- data/generated/google/apis/drive_v2/service.rb +8 -2
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +36 -16
- data/generated/google/apis/drive_v3/representations.rb +2 -0
- data/generated/google/apis/drive_v3/service.rb +4 -1
- data/generated/google/apis/fitness_v1.rb +8 -2
- data/generated/google/apis/fitness_v1/classes.rb +64 -6
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -4
- data/generated/google/apis/genomics_v1/classes.rb +111 -9
- data/generated/google/apis/genomics_v1/representations.rb +36 -0
- data/generated/google/apis/genomics_v1/service.rb +4 -7
- data/generated/google/apis/gmail_v1.rb +7 -1
- data/generated/google/apis/gmail_v1/classes.rb +540 -0
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +154 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +596 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +154 -0
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1328 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +711 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -0
- data/generated/google/apis/script_v1/representations.rb +1 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +35 -0
- data/generated/google/apis/sheets_v4/representations.rb +16 -0
- data/generated/google/apis/sheets_v4/service.rb +55 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +521 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +219 -0
- data/generated/google/apis/speech_v1beta1/service.rb +268 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +26 -8
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +19 -10
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +10 -9
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +163 -2
- data/generated/google/apis/youtube_v3/representations.rb +82 -0
- data/generated/google/apis/youtube_v3/service.rb +6 -2
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/base_service.rb +10 -4
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +2 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/sync.rb +71 -0
- metadata +43 -13
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright 2015 Google Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'google/apis/language_v1beta1/service.rb'
|
|
16
|
+
require 'google/apis/language_v1beta1/classes.rb'
|
|
17
|
+
require 'google/apis/language_v1beta1/representations.rb'
|
|
18
|
+
|
|
19
|
+
module Google
|
|
20
|
+
module Apis
|
|
21
|
+
# Google Cloud Natural Language API
|
|
22
|
+
#
|
|
23
|
+
# Google Cloud Natural Language API provides natural language understanding
|
|
24
|
+
# technologies to developers. Examples include sentiment analysis, entity
|
|
25
|
+
# recognition, and text annotations.
|
|
26
|
+
#
|
|
27
|
+
# @see https://cloud.google.com/natural-language/
|
|
28
|
+
module LanguageV1beta1
|
|
29
|
+
VERSION = 'V1beta1'
|
|
30
|
+
REVISION = '20160912'
|
|
31
|
+
|
|
32
|
+
# View and manage your data across Google Cloud Platform services
|
|
33
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
# Copyright 2015 Google Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'date'
|
|
16
|
+
require 'google/apis/core/base_service'
|
|
17
|
+
require 'google/apis/core/json_representation'
|
|
18
|
+
require 'google/apis/core/hashable'
|
|
19
|
+
require 'google/apis/errors'
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Apis
|
|
23
|
+
module LanguageV1beta1
|
|
24
|
+
|
|
25
|
+
# ################################################################ #
|
|
26
|
+
# Represents the input to API methods.
|
|
27
|
+
class Document
|
|
28
|
+
include Google::Apis::Core::Hashable
|
|
29
|
+
|
|
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
|
|
35
|
+
# are supported, with the following additional restriction:
|
|
36
|
+
# * `analyzeSentiment` only supports English text.
|
|
37
|
+
# If the language (either specified by the caller or automatically detected)
|
|
38
|
+
# is not supported by the called API method, an `INVALID_ARGUMENT` error
|
|
39
|
+
# is returned.
|
|
40
|
+
# Corresponds to the JSON property `language`
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :language
|
|
43
|
+
|
|
44
|
+
# The Google Cloud Storage URI where the file content is located.
|
|
45
|
+
# Corresponds to the JSON property `gcsContentUri`
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :gcs_content_uri
|
|
48
|
+
|
|
49
|
+
# Required. If the type is not set or is `TYPE_UNSPECIFIED`,
|
|
50
|
+
# returns an `INVALID_ARGUMENT` error.
|
|
51
|
+
# Corresponds to the JSON property `type`
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :type
|
|
54
|
+
|
|
55
|
+
# The content of the input in string format.
|
|
56
|
+
# Corresponds to the JSON property `content`
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :content
|
|
59
|
+
|
|
60
|
+
def initialize(**args)
|
|
61
|
+
update!(**args)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Update properties of this object
|
|
65
|
+
def update!(**args)
|
|
66
|
+
@language = args[:language] if args.key?(:language)
|
|
67
|
+
@gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
|
|
68
|
+
@type = args[:type] if args.key?(:type)
|
|
69
|
+
@content = args[:content] if args.key?(:content)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Represents an output piece of text.
|
|
74
|
+
class TextSpan
|
|
75
|
+
include Google::Apis::Core::Hashable
|
|
76
|
+
|
|
77
|
+
# The API calculates the beginning offset of the content in the original
|
|
78
|
+
# document according to the EncodingType specified in the API request.
|
|
79
|
+
# Corresponds to the JSON property `beginOffset`
|
|
80
|
+
# @return [Fixnum]
|
|
81
|
+
attr_accessor :begin_offset
|
|
82
|
+
|
|
83
|
+
# The content of the output text.
|
|
84
|
+
# Corresponds to the JSON property `content`
|
|
85
|
+
# @return [String]
|
|
86
|
+
attr_accessor :content
|
|
87
|
+
|
|
88
|
+
def initialize(**args)
|
|
89
|
+
update!(**args)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Update properties of this object
|
|
93
|
+
def update!(**args)
|
|
94
|
+
@begin_offset = args[:begin_offset] if args.key?(:begin_offset)
|
|
95
|
+
@content = args[:content] if args.key?(:content)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# The `Status` type defines a logical error model that is suitable for different
|
|
100
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
|
101
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
102
|
+
# - Simple to use and understand for most users
|
|
103
|
+
# - Flexible enough to meet unexpected needs
|
|
104
|
+
# # Overview
|
|
105
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
|
106
|
+
# and error details. The error code should be an enum value of
|
|
107
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
|
108
|
+
# error message should be a developer-facing English message that helps
|
|
109
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
|
110
|
+
# error message is needed, put the localized message in the error details or
|
|
111
|
+
# localize it in the client. The optional error details may contain arbitrary
|
|
112
|
+
# information about the error. There is a predefined set of error detail types
|
|
113
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
|
114
|
+
# # Language mapping
|
|
115
|
+
# The `Status` message is the logical representation of the error model, but it
|
|
116
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
|
117
|
+
# exposed in different client libraries and different wire protocols, it can be
|
|
118
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
|
119
|
+
# in Java, but more likely mapped to some error codes in C.
|
|
120
|
+
# # Other uses
|
|
121
|
+
# The error model and the `Status` message can be used in a variety of
|
|
122
|
+
# environments, either with or without APIs, to provide a
|
|
123
|
+
# consistent developer experience across different environments.
|
|
124
|
+
# Example uses of this error model include:
|
|
125
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
|
126
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
|
127
|
+
# errors.
|
|
128
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
|
129
|
+
# have a `Status` message for error reporting purpose.
|
|
130
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
|
131
|
+
# `Status` message should be used directly inside batch response, one for
|
|
132
|
+
# each error sub-response.
|
|
133
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
|
134
|
+
# results in its response, the status of those operations should be
|
|
135
|
+
# represented directly using the `Status` message.
|
|
136
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
|
137
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
|
138
|
+
class Status
|
|
139
|
+
include Google::Apis::Core::Hashable
|
|
140
|
+
|
|
141
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
|
142
|
+
# Corresponds to the JSON property `code`
|
|
143
|
+
# @return [Fixnum]
|
|
144
|
+
attr_accessor :code
|
|
145
|
+
|
|
146
|
+
# A list of messages that carry the error details. There will be a
|
|
147
|
+
# common set of message types for APIs to use.
|
|
148
|
+
# Corresponds to the JSON property `details`
|
|
149
|
+
# @return [Array<Hash<String,Object>>]
|
|
150
|
+
attr_accessor :details
|
|
151
|
+
|
|
152
|
+
# A developer-facing error message, which should be in English. Any
|
|
153
|
+
# user-facing error message should be localized and sent in the
|
|
154
|
+
# google.rpc.Status.details field, or localized by the client.
|
|
155
|
+
# Corresponds to the JSON property `message`
|
|
156
|
+
# @return [String]
|
|
157
|
+
attr_accessor :message
|
|
158
|
+
|
|
159
|
+
def initialize(**args)
|
|
160
|
+
update!(**args)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Update properties of this object
|
|
164
|
+
def update!(**args)
|
|
165
|
+
@code = args[:code] if args.key?(:code)
|
|
166
|
+
@details = args[:details] if args.key?(:details)
|
|
167
|
+
@message = args[:message] if args.key?(:message)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# The entity analysis request message.
|
|
172
|
+
class AnalyzeEntitiesRequest
|
|
173
|
+
include Google::Apis::Core::Hashable
|
|
174
|
+
|
|
175
|
+
# ################################################################ #
|
|
176
|
+
# Represents the input to API methods.
|
|
177
|
+
# Corresponds to the JSON property `document`
|
|
178
|
+
# @return [Google::Apis::LanguageV1beta1::Document]
|
|
179
|
+
attr_accessor :document
|
|
180
|
+
|
|
181
|
+
# The encoding type used by the API to calculate offsets.
|
|
182
|
+
# Corresponds to the JSON property `encodingType`
|
|
183
|
+
# @return [String]
|
|
184
|
+
attr_accessor :encoding_type
|
|
185
|
+
|
|
186
|
+
def initialize(**args)
|
|
187
|
+
update!(**args)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Update properties of this object
|
|
191
|
+
def update!(**args)
|
|
192
|
+
@document = args[:document] if args.key?(:document)
|
|
193
|
+
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Represents a mention for an entity in the text. Currently, proper noun
|
|
198
|
+
# mentions are supported.
|
|
199
|
+
class EntityMention
|
|
200
|
+
include Google::Apis::Core::Hashable
|
|
201
|
+
|
|
202
|
+
# Represents an output piece of text.
|
|
203
|
+
# Corresponds to the JSON property `text`
|
|
204
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
|
205
|
+
attr_accessor :text
|
|
206
|
+
|
|
207
|
+
def initialize(**args)
|
|
208
|
+
update!(**args)
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Update properties of this object
|
|
212
|
+
def update!(**args)
|
|
213
|
+
@text = args[:text] if args.key?(:text)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# The sentiment analysis request message.
|
|
218
|
+
class AnalyzeSentimentRequest
|
|
219
|
+
include Google::Apis::Core::Hashable
|
|
220
|
+
|
|
221
|
+
# ################################################################ #
|
|
222
|
+
# Represents the input to API methods.
|
|
223
|
+
# Corresponds to the JSON property `document`
|
|
224
|
+
# @return [Google::Apis::LanguageV1beta1::Document]
|
|
225
|
+
attr_accessor :document
|
|
226
|
+
|
|
227
|
+
def initialize(**args)
|
|
228
|
+
update!(**args)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Update properties of this object
|
|
232
|
+
def update!(**args)
|
|
233
|
+
@document = args[:document] if args.key?(:document)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# The sentiment analysis response message.
|
|
238
|
+
class AnalyzeSentimentResponse
|
|
239
|
+
include Google::Apis::Core::Hashable
|
|
240
|
+
|
|
241
|
+
# Represents the feeling associated with the entire text or entities in
|
|
242
|
+
# the text.
|
|
243
|
+
# Corresponds to the JSON property `documentSentiment`
|
|
244
|
+
# @return [Google::Apis::LanguageV1beta1::Sentiment]
|
|
245
|
+
attr_accessor :document_sentiment
|
|
246
|
+
|
|
247
|
+
# The language of the text, which will be the same as the language specified
|
|
248
|
+
# in the request or, if not specified, the automatically-detected language.
|
|
249
|
+
# Corresponds to the JSON property `language`
|
|
250
|
+
# @return [String]
|
|
251
|
+
attr_accessor :language
|
|
252
|
+
|
|
253
|
+
def initialize(**args)
|
|
254
|
+
update!(**args)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Update properties of this object
|
|
258
|
+
def update!(**args)
|
|
259
|
+
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
|
260
|
+
@language = args[:language] if args.key?(:language)
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Represents dependency parse tree information for a token.
|
|
265
|
+
class DependencyEdge
|
|
266
|
+
include Google::Apis::Core::Hashable
|
|
267
|
+
|
|
268
|
+
# Represents the head of this token in the dependency tree.
|
|
269
|
+
# This is the index of the token which has an arc going to this token.
|
|
270
|
+
# The index is the position of the token in the array of tokens returned
|
|
271
|
+
# by the API method. If this token is a root token, then the
|
|
272
|
+
# `head_token_index` is its own index.
|
|
273
|
+
# Corresponds to the JSON property `headTokenIndex`
|
|
274
|
+
# @return [Fixnum]
|
|
275
|
+
attr_accessor :head_token_index
|
|
276
|
+
|
|
277
|
+
# The parse label for the token.
|
|
278
|
+
# Corresponds to the JSON property `label`
|
|
279
|
+
# @return [String]
|
|
280
|
+
attr_accessor :label
|
|
281
|
+
|
|
282
|
+
def initialize(**args)
|
|
283
|
+
update!(**args)
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Update properties of this object
|
|
287
|
+
def update!(**args)
|
|
288
|
+
@head_token_index = args[:head_token_index] if args.key?(:head_token_index)
|
|
289
|
+
@label = args[:label] if args.key?(:label)
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# The request message for the advanced text annotation API, which performs all
|
|
294
|
+
# the above plus syntactic analysis.
|
|
295
|
+
class AnnotateTextRequest
|
|
296
|
+
include Google::Apis::Core::Hashable
|
|
297
|
+
|
|
298
|
+
# ################################################################ #
|
|
299
|
+
# Represents the input to API methods.
|
|
300
|
+
# Corresponds to the JSON property `document`
|
|
301
|
+
# @return [Google::Apis::LanguageV1beta1::Document]
|
|
302
|
+
attr_accessor :document
|
|
303
|
+
|
|
304
|
+
# The encoding type used by the API to calculate offsets.
|
|
305
|
+
# Corresponds to the JSON property `encodingType`
|
|
306
|
+
# @return [String]
|
|
307
|
+
attr_accessor :encoding_type
|
|
308
|
+
|
|
309
|
+
# All available features for sentiment, syntax, and semantic analysis.
|
|
310
|
+
# Setting each one to true will enable that specific analysis for the input.
|
|
311
|
+
# Corresponds to the JSON property `features`
|
|
312
|
+
# @return [Google::Apis::LanguageV1beta1::Features]
|
|
313
|
+
attr_accessor :features
|
|
314
|
+
|
|
315
|
+
def initialize(**args)
|
|
316
|
+
update!(**args)
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Update properties of this object
|
|
320
|
+
def update!(**args)
|
|
321
|
+
@document = args[:document] if args.key?(:document)
|
|
322
|
+
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
|
|
323
|
+
@features = args[:features] if args.key?(:features)
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Represents a sentence in the input document.
|
|
328
|
+
class Sentence
|
|
329
|
+
include Google::Apis::Core::Hashable
|
|
330
|
+
|
|
331
|
+
# Represents an output piece of text.
|
|
332
|
+
# Corresponds to the JSON property `text`
|
|
333
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
|
334
|
+
attr_accessor :text
|
|
335
|
+
|
|
336
|
+
def initialize(**args)
|
|
337
|
+
update!(**args)
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Update properties of this object
|
|
341
|
+
def update!(**args)
|
|
342
|
+
@text = args[:text] if args.key?(:text)
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# All available features for sentiment, syntax, and semantic analysis.
|
|
347
|
+
# Setting each one to true will enable that specific analysis for the input.
|
|
348
|
+
class Features
|
|
349
|
+
include Google::Apis::Core::Hashable
|
|
350
|
+
|
|
351
|
+
# Extract document-level sentiment.
|
|
352
|
+
# Corresponds to the JSON property `extractDocumentSentiment`
|
|
353
|
+
# @return [Boolean]
|
|
354
|
+
attr_accessor :extract_document_sentiment
|
|
355
|
+
alias_method :extract_document_sentiment?, :extract_document_sentiment
|
|
356
|
+
|
|
357
|
+
# Extract entities.
|
|
358
|
+
# Corresponds to the JSON property `extractEntities`
|
|
359
|
+
# @return [Boolean]
|
|
360
|
+
attr_accessor :extract_entities
|
|
361
|
+
alias_method :extract_entities?, :extract_entities
|
|
362
|
+
|
|
363
|
+
# Extract syntax information.
|
|
364
|
+
# Corresponds to the JSON property `extractSyntax`
|
|
365
|
+
# @return [Boolean]
|
|
366
|
+
attr_accessor :extract_syntax
|
|
367
|
+
alias_method :extract_syntax?, :extract_syntax
|
|
368
|
+
|
|
369
|
+
def initialize(**args)
|
|
370
|
+
update!(**args)
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Update properties of this object
|
|
374
|
+
def update!(**args)
|
|
375
|
+
@extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
|
|
376
|
+
@extract_entities = args[:extract_entities] if args.key?(:extract_entities)
|
|
377
|
+
@extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Represents part of speech information for a token.
|
|
382
|
+
class PartOfSpeech
|
|
383
|
+
include Google::Apis::Core::Hashable
|
|
384
|
+
|
|
385
|
+
# The part of speech tag.
|
|
386
|
+
# Corresponds to the JSON property `tag`
|
|
387
|
+
# @return [String]
|
|
388
|
+
attr_accessor :tag
|
|
389
|
+
|
|
390
|
+
def initialize(**args)
|
|
391
|
+
update!(**args)
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# Update properties of this object
|
|
395
|
+
def update!(**args)
|
|
396
|
+
@tag = args[:tag] if args.key?(:tag)
|
|
397
|
+
end
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# The text annotations response message.
|
|
401
|
+
class AnnotateTextResponse
|
|
402
|
+
include Google::Apis::Core::Hashable
|
|
403
|
+
|
|
404
|
+
# Entities, along with their semantic information, in the input document.
|
|
405
|
+
# Populated if the user enables
|
|
406
|
+
# AnnotateTextRequest.Features.extract_entities.
|
|
407
|
+
# Corresponds to the JSON property `entities`
|
|
408
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
|
|
409
|
+
attr_accessor :entities
|
|
410
|
+
|
|
411
|
+
# Represents the feeling associated with the entire text or entities in
|
|
412
|
+
# the text.
|
|
413
|
+
# Corresponds to the JSON property `documentSentiment`
|
|
414
|
+
# @return [Google::Apis::LanguageV1beta1::Sentiment]
|
|
415
|
+
attr_accessor :document_sentiment
|
|
416
|
+
|
|
417
|
+
# The language of the text, which will be the same as the language specified
|
|
418
|
+
# in the request or, if not specified, the automatically-detected language.
|
|
419
|
+
# Corresponds to the JSON property `language`
|
|
420
|
+
# @return [String]
|
|
421
|
+
attr_accessor :language
|
|
422
|
+
|
|
423
|
+
# Tokens, along with their syntactic information, in the input document.
|
|
424
|
+
# Populated if the user enables
|
|
425
|
+
# AnnotateTextRequest.Features.extract_syntax.
|
|
426
|
+
# Corresponds to the JSON property `tokens`
|
|
427
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Token>]
|
|
428
|
+
attr_accessor :tokens
|
|
429
|
+
|
|
430
|
+
# Sentences in the input document. Populated if the user enables
|
|
431
|
+
# AnnotateTextRequest.Features.extract_syntax.
|
|
432
|
+
# Corresponds to the JSON property `sentences`
|
|
433
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
|
|
434
|
+
attr_accessor :sentences
|
|
435
|
+
|
|
436
|
+
def initialize(**args)
|
|
437
|
+
update!(**args)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Update properties of this object
|
|
441
|
+
def update!(**args)
|
|
442
|
+
@entities = args[:entities] if args.key?(:entities)
|
|
443
|
+
@document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
|
|
444
|
+
@language = args[:language] if args.key?(:language)
|
|
445
|
+
@tokens = args[:tokens] if args.key?(:tokens)
|
|
446
|
+
@sentences = args[:sentences] if args.key?(:sentences)
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Represents a phrase in the text that is a known entity, such as
|
|
451
|
+
# a person, an organization, or location. The API associates information, such
|
|
452
|
+
# as salience and mentions, with entities.
|
|
453
|
+
class Entity
|
|
454
|
+
include Google::Apis::Core::Hashable
|
|
455
|
+
|
|
456
|
+
# Metadata associated with the entity.
|
|
457
|
+
# Currently, only Wikipedia URLs are provided, if available.
|
|
458
|
+
# The associated key is "wikipedia_url".
|
|
459
|
+
# Corresponds to the JSON property `metadata`
|
|
460
|
+
# @return [Hash<String,String>]
|
|
461
|
+
attr_accessor :metadata
|
|
462
|
+
|
|
463
|
+
# The salience score associated with the entity in the [0, 1.0] range.
|
|
464
|
+
# The salience score for an entity provides information about the
|
|
465
|
+
# importance or centrality of that entity to the entire document text.
|
|
466
|
+
# Scores closer to 0 are less salient, while scores closer to 1.0 are highly
|
|
467
|
+
# salient.
|
|
468
|
+
# Corresponds to the JSON property `salience`
|
|
469
|
+
# @return [Float]
|
|
470
|
+
attr_accessor :salience
|
|
471
|
+
|
|
472
|
+
# The entity type.
|
|
473
|
+
# Corresponds to the JSON property `type`
|
|
474
|
+
# @return [String]
|
|
475
|
+
attr_accessor :type
|
|
476
|
+
|
|
477
|
+
# The mentions of this entity in the input document. The API currently
|
|
478
|
+
# supports proper noun mentions.
|
|
479
|
+
# Corresponds to the JSON property `mentions`
|
|
480
|
+
# @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
|
|
481
|
+
attr_accessor :mentions
|
|
482
|
+
|
|
483
|
+
# The representative name for the entity.
|
|
484
|
+
# Corresponds to the JSON property `name`
|
|
485
|
+
# @return [String]
|
|
486
|
+
attr_accessor :name
|
|
487
|
+
|
|
488
|
+
def initialize(**args)
|
|
489
|
+
update!(**args)
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Update properties of this object
|
|
493
|
+
def update!(**args)
|
|
494
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
495
|
+
@salience = args[:salience] if args.key?(:salience)
|
|
496
|
+
@type = args[:type] if args.key?(:type)
|
|
497
|
+
@mentions = args[:mentions] if args.key?(:mentions)
|
|
498
|
+
@name = args[:name] if args.key?(:name)
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
# Represents the feeling associated with the entire text or entities in
|
|
503
|
+
# the text.
|
|
504
|
+
class Sentiment
|
|
505
|
+
include Google::Apis::Core::Hashable
|
|
506
|
+
|
|
507
|
+
# Polarity of the sentiment in the [-1.0, 1.0] range. Larger numbers
|
|
508
|
+
# represent more positive sentiments.
|
|
509
|
+
# Corresponds to the JSON property `polarity`
|
|
510
|
+
# @return [Float]
|
|
511
|
+
attr_accessor :polarity
|
|
512
|
+
|
|
513
|
+
# A non-negative number in the [0, +inf) range, which represents
|
|
514
|
+
# the absolute magnitude of sentiment regardless of polarity (positive or
|
|
515
|
+
# negative).
|
|
516
|
+
# Corresponds to the JSON property `magnitude`
|
|
517
|
+
# @return [Float]
|
|
518
|
+
attr_accessor :magnitude
|
|
519
|
+
|
|
520
|
+
def initialize(**args)
|
|
521
|
+
update!(**args)
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
# Update properties of this object
|
|
525
|
+
def update!(**args)
|
|
526
|
+
@polarity = args[:polarity] if args.key?(:polarity)
|
|
527
|
+
@magnitude = args[:magnitude] if args.key?(:magnitude)
|
|
528
|
+
end
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# Represents the smallest syntactic building block of the text.
|
|
532
|
+
class Token
|
|
533
|
+
include Google::Apis::Core::Hashable
|
|
534
|
+
|
|
535
|
+
# Represents an output piece of text.
|
|
536
|
+
# Corresponds to the JSON property `text`
|
|
537
|
+
# @return [Google::Apis::LanguageV1beta1::TextSpan]
|
|
538
|
+
attr_accessor :text
|
|
539
|
+
|
|
540
|
+
# Represents part of speech information for a token.
|
|
541
|
+
# Corresponds to the JSON property `partOfSpeech`
|
|
542
|
+
# @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
|
|
543
|
+
attr_accessor :part_of_speech
|
|
544
|
+
|
|
545
|
+
# Represents dependency parse tree information for a token.
|
|
546
|
+
# Corresponds to the JSON property `dependencyEdge`
|
|
547
|
+
# @return [Google::Apis::LanguageV1beta1::DependencyEdge]
|
|
548
|
+
attr_accessor :dependency_edge
|
|
549
|
+
|
|
550
|
+
# [Lemma](https://en.wikipedia.org/wiki/Lemma_(morphology))
|
|
551
|
+
# of the token.
|
|
552
|
+
# Corresponds to the JSON property `lemma`
|
|
553
|
+
# @return [String]
|
|
554
|
+
attr_accessor :lemma
|
|
555
|
+
|
|
556
|
+
def initialize(**args)
|
|
557
|
+
update!(**args)
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Update properties of this object
|
|
561
|
+
def update!(**args)
|
|
562
|
+
@text = args[:text] if args.key?(:text)
|
|
563
|
+
@part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
|
|
564
|
+
@dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
|
|
565
|
+
@lemma = args[:lemma] if args.key?(:lemma)
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
# The entity analysis response message.
|
|
570
|
+
class AnalyzeEntitiesResponse
|
|
571
|
+
include Google::Apis::Core::Hashable
|
|
572
|
+
|
|
573
|
+
# The recognized entities in the input document.
|
|
574
|
+
# Corresponds to the JSON property `entities`
|
|
575
|
+
# @return [Array<Google::Apis::LanguageV1beta1::Entity>]
|
|
576
|
+
attr_accessor :entities
|
|
577
|
+
|
|
578
|
+
# The language of the text, which will be the same as the language specified
|
|
579
|
+
# in the request or, if not specified, the automatically-detected language.
|
|
580
|
+
# Corresponds to the JSON property `language`
|
|
581
|
+
# @return [String]
|
|
582
|
+
attr_accessor :language
|
|
583
|
+
|
|
584
|
+
def initialize(**args)
|
|
585
|
+
update!(**args)
|
|
586
|
+
end
|
|
587
|
+
|
|
588
|
+
# Update properties of this object
|
|
589
|
+
def update!(**args)
|
|
590
|
+
@entities = args[:entities] if args.key?(:entities)
|
|
591
|
+
@language = args[:language] if args.key?(:language)
|
|
592
|
+
end
|
|
593
|
+
end
|
|
594
|
+
end
|
|
595
|
+
end
|
|
596
|
+
end
|