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