google-api-client 0.13.6 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +56 -0
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/androiddeviceprovisioning_v1.rb +3 -3
- data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +3 -3
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidmanagement_v1.rb +1 -1
- data/generated/google/apis/androidmanagement_v1/classes.rb +8 -0
- data/generated/google/apis/androidmanagement_v1/representations.rb +1 -0
- data/generated/google/apis/androidpublisher_v1.rb +1 -1
- data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +1 -0
- data/generated/google/apis/androidpublisher_v2/service.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 +1 -0
- data/generated/google/apis/bigquerydatatransfer_v1.rb +2 -2
- data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +19 -69
- data/generated/google/apis/bigquerydatatransfer_v1/representations.rb +3 -41
- data/generated/google/apis/bigquerydatatransfer_v1/service.rb +17 -149
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -0
- data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +30 -0
- data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +4 -0
- data/generated/google/apis/{toolresults_v1beta3firstparty.rb → cloudtasks_v2beta2.rb} +13 -9
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +1709 -0
- data/generated/google/apis/cloudtasks_v2beta2/representations.rb +585 -0
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +1016 -0
- data/generated/google/apis/cloudtrace_v2.rb +1 -4
- data/generated/google/apis/cloudtrace_v2/classes.rb +0 -78
- data/generated/google/apis/cloudtrace_v2/representations.rb +0 -43
- data/generated/google/apis/cloudtrace_v2/service.rb +0 -101
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_alpha/classes.rb +833 -120
- data/generated/google/apis/compute_alpha/representations.rb +263 -26
- data/generated/google/apis/compute_alpha/service.rb +795 -107
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +5329 -524
- data/generated/google/apis/compute_beta/representations.rb +2241 -36
- data/generated/google/apis/compute_beta/service.rb +5 -5
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +4 -5
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +12 -0
- data/generated/google/apis/container_v1/representations.rb +1 -0
- data/generated/google/apis/container_v1beta1.rb +1 -1
- data/generated/google/apis/container_v1beta1/classes.rb +54 -0
- data/generated/google/apis/container_v1beta1/representations.rb +18 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2sandbox.rb +1 -1
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +6 -39
- data/generated/google/apis/dataflow_v1b3/representations.rb +1 -16
- data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
- data/generated/google/apis/deploymentmanager_alpha/classes.rb +71 -3
- data/generated/google/apis/deploymentmanager_alpha/representations.rb +32 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/service.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2beta/classes.rb +39 -3
- data/generated/google/apis/deploymentmanager_v2beta/representations.rb +16 -0
- data/generated/google/apis/dlp_v2beta1.rb +1 -1
- data/generated/google/apis/dlp_v2beta1/classes.rb +1605 -49
- data/generated/google/apis/dlp_v2beta1/representations.rb +832 -30
- data/generated/google/apis/dlp_v2beta1/service.rb +62 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- 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/gmail_v1.rb +1 -1
- data/generated/google/apis/gmail_v1/classes.rb +0 -36
- data/generated/google/apis/gmail_v1/representations.rb +0 -16
- data/generated/google/apis/language_v1.rb +1 -1
- data/generated/google/apis/language_v1/classes.rb +74 -0
- data/generated/google/apis/language_v1/representations.rb +35 -0
- data/generated/google/apis/language_v1/service.rb +31 -0
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta2.rb +1 -1
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +3 -0
- data/generated/google/apis/people_v1.rb +1 -1
- data/generated/google/apis/people_v1/classes.rb +8 -0
- data/generated/google/apis/people_v1/representations.rb +1 -0
- data/generated/google/apis/plus_domains_v1/service.rb +1 -1
- data/generated/google/apis/plus_v1/service.rb +1 -1
- data/generated/google/apis/servicecontrol_v1.rb +1 -1
- data/generated/google/apis/servicecontrol_v1/classes.rb +35 -6
- data/generated/google/apis/servicecontrol_v1/representations.rb +16 -1
- data/generated/google/apis/servicemanagement_v1.rb +1 -1
- data/generated/google/apis/servicemanagement_v1/classes.rb +1 -1
- data/generated/google/apis/serviceuser_v1.rb +1 -1
- data/generated/google/apis/serviceuser_v1/classes.rb +1 -1
- data/generated/google/apis/sourcerepo_v1.rb +4 -1
- data/generated/google/apis/sourcerepo_v1/classes.rb +45 -204
- data/generated/google/apis/sourcerepo_v1/representations.rb +10 -90
- data/generated/google/apis/storage_v1beta1.rb +1 -1
- data/generated/google/apis/storage_v1beta1/service.rb +1 -1
- data/generated/google/apis/storage_v1beta2.rb +1 -1
- data/generated/google/apis/storage_v1beta2/service.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1.rb +1 -1
- data/generated/google/apis/streetviewpublish_v1/classes.rb +5 -3
- data/generated/google/apis/streetviewpublish_v1/service.rb +6 -4
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1beta1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +22 -85
- data/generated/google/apis/youtube_v3/representations.rb +3 -46
- data/generated/google/apis/youtube_v3/service.rb +11 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +6 -6
- data/generated/google/apis/toolresults_v1beta3firstparty/classes.rb +0 -2630
- data/generated/google/apis/toolresults_v1beta3firstparty/representations.rb +0 -886
- data/generated/google/apis/toolresults_v1beta3firstparty/service.rb +0 -1336
@@ -49,6 +49,37 @@ module Google
|
|
49
49
|
@batch_path = 'batch'
|
50
50
|
end
|
51
51
|
|
52
|
+
# De-identifies potentially sensitive info from a list of strings.
|
53
|
+
# This method has limits on input size and output size.
|
54
|
+
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentRequest] google_privacy_dlp_v2beta1_deidentify_content_request_object
|
55
|
+
# @param [String] fields
|
56
|
+
# Selector specifying which fields to include in a partial response.
|
57
|
+
# @param [String] quota_user
|
58
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
59
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
60
|
+
# @param [Google::Apis::RequestOptions] options
|
61
|
+
# Request-specific options
|
62
|
+
#
|
63
|
+
# @yield [result, err] Result & error if block supplied
|
64
|
+
# @yieldparam result [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse] parsed result object
|
65
|
+
# @yieldparam err [StandardError] error object if request failed
|
66
|
+
#
|
67
|
+
# @return [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse]
|
68
|
+
#
|
69
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
70
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
71
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
72
|
+
def deidentify_content(google_privacy_dlp_v2beta1_deidentify_content_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
73
|
+
command = make_simple_command(:post, 'v2beta1/content:deidentify', options)
|
74
|
+
command.request_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentRequest::Representation
|
75
|
+
command.request_object = google_privacy_dlp_v2beta1_deidentify_content_request_object
|
76
|
+
command.response_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse::Representation
|
77
|
+
command.response_class = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1DeidentifyContentResponse
|
78
|
+
command.query['fields'] = fields unless fields.nil?
|
79
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
80
|
+
execute_or_queue_command(command, &block)
|
81
|
+
end
|
82
|
+
|
52
83
|
# Finds potentially sensitive info in a list of strings.
|
53
84
|
# This method has limits on input size, processing time, and output size.
|
54
85
|
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1InspectContentRequest] google_privacy_dlp_v2beta1_inspect_content_request_object
|
@@ -111,6 +142,37 @@ module Google
|
|
111
142
|
execute_or_queue_command(command, &block)
|
112
143
|
end
|
113
144
|
|
145
|
+
# Schedules a job to compute risk analysis metrics over content in a Google
|
146
|
+
# Cloud Platform repository.
|
147
|
+
# @param [Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest] google_privacy_dlp_v2beta1_analyze_data_source_risk_request_object
|
148
|
+
# @param [String] fields
|
149
|
+
# Selector specifying which fields to include in a partial response.
|
150
|
+
# @param [String] quota_user
|
151
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
152
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
153
|
+
# @param [Google::Apis::RequestOptions] options
|
154
|
+
# Request-specific options
|
155
|
+
#
|
156
|
+
# @yield [result, err] Result & error if block supplied
|
157
|
+
# @yieldparam result [Google::Apis::DlpV2beta1::GoogleLongrunningOperation] parsed result object
|
158
|
+
# @yieldparam err [StandardError] error object if request failed
|
159
|
+
#
|
160
|
+
# @return [Google::Apis::DlpV2beta1::GoogleLongrunningOperation]
|
161
|
+
#
|
162
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
163
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
164
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
165
|
+
def analyze_data_source(google_privacy_dlp_v2beta1_analyze_data_source_risk_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
166
|
+
command = make_simple_command(:post, 'v2beta1/dataSource:analyze', options)
|
167
|
+
command.request_representation = Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1AnalyzeDataSourceRiskRequest::Representation
|
168
|
+
command.request_object = google_privacy_dlp_v2beta1_analyze_data_source_risk_request_object
|
169
|
+
command.response_representation = Google::Apis::DlpV2beta1::GoogleLongrunningOperation::Representation
|
170
|
+
command.response_class = Google::Apis::DlpV2beta1::GoogleLongrunningOperation
|
171
|
+
command.query['fields'] = fields unless fields.nil?
|
172
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
173
|
+
execute_or_queue_command(command, &block)
|
174
|
+
end
|
175
|
+
|
114
176
|
# Cancels an operation. Use the get method to check whether the cancellation
|
115
177
|
# succeeded or whether the operation completed despite cancellation.
|
116
178
|
# @param [String] name
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://developers.google.com/doubleclick-search/
|
27
27
|
module DoubleclicksearchV2
|
28
28
|
VERSION = 'V2'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20170905'
|
30
30
|
|
31
31
|
# View and manage your advertising data in DoubleClick Search
|
32
32
|
AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch'
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/games/services
|
26
26
|
module GamesConfigurationV1configuration
|
27
27
|
VERSION = 'V1configuration'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170912'
|
29
29
|
|
30
30
|
# View and manage your Google Play Developer account
|
31
31
|
AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/games/services
|
26
26
|
module GamesManagementV1management
|
27
27
|
VERSION = 'V1management'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170911'
|
29
29
|
|
30
30
|
# Share your Google+ profile information and view and manage your game activity
|
31
31
|
AUTH_GAMES = 'https://www.googleapis.com/auth/games'
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/games/services/
|
26
26
|
module GamesV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20170911'
|
29
29
|
|
30
30
|
# View and manage its own configuration data in your Google Drive
|
31
31
|
AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
|
@@ -485,13 +485,6 @@ module Google
|
|
485
485
|
class Label
|
486
486
|
include Google::Apis::Core::Hashable
|
487
487
|
|
488
|
-
# Color to assign to the label. This field is hidden behind an API server mendel
|
489
|
-
# experiment and only available for user-defined labels. Will be unset if the
|
490
|
-
# label doesn't have a color configured.
|
491
|
-
# Corresponds to the JSON property `color`
|
492
|
-
# @return [Google::Apis::GmailV1::LabelColor]
|
493
|
-
attr_accessor :color
|
494
|
-
|
495
488
|
# The immutable ID of the label.
|
496
489
|
# Corresponds to the JSON property `id`
|
497
490
|
# @return [String]
|
@@ -550,7 +543,6 @@ module Google
|
|
550
543
|
|
551
544
|
# Update properties of this object
|
552
545
|
def update!(**args)
|
553
|
-
@color = args[:color] if args.key?(:color)
|
554
546
|
@id = args[:id] if args.key?(:id)
|
555
547
|
@label_list_visibility = args[:label_list_visibility] if args.key?(:label_list_visibility)
|
556
548
|
@message_list_visibility = args[:message_list_visibility] if args.key?(:message_list_visibility)
|
@@ -563,34 +555,6 @@ module Google
|
|
563
555
|
end
|
564
556
|
end
|
565
557
|
|
566
|
-
#
|
567
|
-
class LabelColor
|
568
|
-
include Google::Apis::Core::Hashable
|
569
|
-
|
570
|
-
# Background color represented as hex string #RRGGBB (ex #000000). Only a
|
571
|
-
# restricted predefined set of color values are allowed. See (go/gmail-api-label-
|
572
|
-
# colors).
|
573
|
-
# Corresponds to the JSON property `backgroundColor`
|
574
|
-
# @return [String]
|
575
|
-
attr_accessor :background_color
|
576
|
-
|
577
|
-
# Text color represented as hex string #RRGGBB (ex #000000). Only a restricted
|
578
|
-
# predefined set of color values are allowed. See (go/gmail-api-label-colors).
|
579
|
-
# Corresponds to the JSON property `textColor`
|
580
|
-
# @return [String]
|
581
|
-
attr_accessor :text_color
|
582
|
-
|
583
|
-
def initialize(**args)
|
584
|
-
update!(**args)
|
585
|
-
end
|
586
|
-
|
587
|
-
# Update properties of this object
|
588
|
-
def update!(**args)
|
589
|
-
@background_color = args[:background_color] if args.key?(:background_color)
|
590
|
-
@text_color = args[:text_color] if args.key?(:text_color)
|
591
|
-
end
|
592
|
-
end
|
593
|
-
|
594
558
|
#
|
595
559
|
class ListDraftsResponse
|
596
560
|
include Google::Apis::Core::Hashable
|
@@ -112,12 +112,6 @@ module Google
|
|
112
112
|
include Google::Apis::Core::JsonObjectSupport
|
113
113
|
end
|
114
114
|
|
115
|
-
class LabelColor
|
116
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
-
|
118
|
-
include Google::Apis::Core::JsonObjectSupport
|
119
|
-
end
|
120
|
-
|
121
115
|
class ListDraftsResponse
|
122
116
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
117
|
|
@@ -403,8 +397,6 @@ module Google
|
|
403
397
|
class Label
|
404
398
|
# @private
|
405
399
|
class Representation < Google::Apis::Core::JsonRepresentation
|
406
|
-
property :color, as: 'color', class: Google::Apis::GmailV1::LabelColor, decorator: Google::Apis::GmailV1::LabelColor::Representation
|
407
|
-
|
408
400
|
property :id, as: 'id'
|
409
401
|
property :label_list_visibility, as: 'labelListVisibility'
|
410
402
|
property :message_list_visibility, as: 'messageListVisibility'
|
@@ -417,14 +409,6 @@ module Google
|
|
417
409
|
end
|
418
410
|
end
|
419
411
|
|
420
|
-
class LabelColor
|
421
|
-
# @private
|
422
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
423
|
-
property :background_color, as: 'backgroundColor'
|
424
|
-
property :text_color, as: 'textColor'
|
425
|
-
end
|
426
|
-
end
|
427
|
-
|
428
412
|
class ListDraftsResponse
|
429
413
|
# @private
|
430
414
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -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 = '20170911'
|
31
31
|
|
32
32
|
# Apply machine learning models to reveal the structure and meaning of text
|
33
33
|
AUTH_CLOUD_LANGUAGE = 'https://www.googleapis.com/auth/cloud-language'
|
@@ -75,6 +75,59 @@ module Google
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
# The entity-level sentiment analysis request message.
|
79
|
+
class AnalyzeEntitySentimentRequest
|
80
|
+
include Google::Apis::Core::Hashable
|
81
|
+
|
82
|
+
# ################################################################ #
|
83
|
+
# Represents the input to API methods.
|
84
|
+
# Corresponds to the JSON property `document`
|
85
|
+
# @return [Google::Apis::LanguageV1::Document]
|
86
|
+
attr_accessor :document
|
87
|
+
|
88
|
+
# The encoding type used by the API to calculate offsets.
|
89
|
+
# Corresponds to the JSON property `encodingType`
|
90
|
+
# @return [String]
|
91
|
+
attr_accessor :encoding_type
|
92
|
+
|
93
|
+
def initialize(**args)
|
94
|
+
update!(**args)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Update properties of this object
|
98
|
+
def update!(**args)
|
99
|
+
@document = args[:document] if args.key?(:document)
|
100
|
+
@encoding_type = args[:encoding_type] if args.key?(:encoding_type)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# The entity-level sentiment analysis response message.
|
105
|
+
class AnalyzeEntitySentimentResponse
|
106
|
+
include Google::Apis::Core::Hashable
|
107
|
+
|
108
|
+
# The recognized entities in the input document with associated sentiments.
|
109
|
+
# Corresponds to the JSON property `entities`
|
110
|
+
# @return [Array<Google::Apis::LanguageV1::Entity>]
|
111
|
+
attr_accessor :entities
|
112
|
+
|
113
|
+
# The language of the text, which will be the same as the language specified
|
114
|
+
# in the request or, if not specified, the automatically-detected language.
|
115
|
+
# See Document.language field for more details.
|
116
|
+
# Corresponds to the JSON property `language`
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :language
|
119
|
+
|
120
|
+
def initialize(**args)
|
121
|
+
update!(**args)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Update properties of this object
|
125
|
+
def update!(**args)
|
126
|
+
@entities = args[:entities] if args.key?(:entities)
|
127
|
+
@language = args[:language] if args.key?(:language)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
78
131
|
# The sentiment analysis request message.
|
79
132
|
class AnalyzeSentimentRequest
|
80
133
|
include Google::Apis::Core::Hashable
|
@@ -392,6 +445,12 @@ module Google
|
|
392
445
|
# @return [Float]
|
393
446
|
attr_accessor :salience
|
394
447
|
|
448
|
+
# Represents the feeling associated with the entire text or entities in
|
449
|
+
# the text.
|
450
|
+
# Corresponds to the JSON property `sentiment`
|
451
|
+
# @return [Google::Apis::LanguageV1::Sentiment]
|
452
|
+
attr_accessor :sentiment
|
453
|
+
|
395
454
|
# The entity type.
|
396
455
|
# Corresponds to the JSON property `type`
|
397
456
|
# @return [String]
|
@@ -407,6 +466,7 @@ module Google
|
|
407
466
|
@metadata = args[:metadata] if args.key?(:metadata)
|
408
467
|
@name = args[:name] if args.key?(:name)
|
409
468
|
@salience = args[:salience] if args.key?(:salience)
|
469
|
+
@sentiment = args[:sentiment] if args.key?(:sentiment)
|
410
470
|
@type = args[:type] if args.key?(:type)
|
411
471
|
end
|
412
472
|
end
|
@@ -416,6 +476,12 @@ module Google
|
|
416
476
|
class EntityMention
|
417
477
|
include Google::Apis::Core::Hashable
|
418
478
|
|
479
|
+
# Represents the feeling associated with the entire text or entities in
|
480
|
+
# the text.
|
481
|
+
# Corresponds to the JSON property `sentiment`
|
482
|
+
# @return [Google::Apis::LanguageV1::Sentiment]
|
483
|
+
attr_accessor :sentiment
|
484
|
+
|
419
485
|
# Represents an output piece of text.
|
420
486
|
# Corresponds to the JSON property `text`
|
421
487
|
# @return [Google::Apis::LanguageV1::TextSpan]
|
@@ -432,6 +498,7 @@ module Google
|
|
432
498
|
|
433
499
|
# Update properties of this object
|
434
500
|
def update!(**args)
|
501
|
+
@sentiment = args[:sentiment] if args.key?(:sentiment)
|
435
502
|
@text = args[:text] if args.key?(:text)
|
436
503
|
@type = args[:type] if args.key?(:type)
|
437
504
|
end
|
@@ -454,6 +521,12 @@ module Google
|
|
454
521
|
attr_accessor :extract_entities
|
455
522
|
alias_method :extract_entities?, :extract_entities
|
456
523
|
|
524
|
+
# Extract entities and their associated sentiment.
|
525
|
+
# Corresponds to the JSON property `extractEntitySentiment`
|
526
|
+
# @return [Boolean]
|
527
|
+
attr_accessor :extract_entity_sentiment
|
528
|
+
alias_method :extract_entity_sentiment?, :extract_entity_sentiment
|
529
|
+
|
457
530
|
# Extract syntax information.
|
458
531
|
# Corresponds to the JSON property `extractSyntax`
|
459
532
|
# @return [Boolean]
|
@@ -468,6 +541,7 @@ module Google
|
|
468
541
|
def update!(**args)
|
469
542
|
@extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
|
470
543
|
@extract_entities = args[:extract_entities] if args.key?(:extract_entities)
|
544
|
+
@extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment)
|
471
545
|
@extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
|
472
546
|
end
|
473
547
|
end
|
@@ -34,6 +34,18 @@ module Google
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
35
35
|
end
|
36
36
|
|
37
|
+
class AnalyzeEntitySentimentRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class AnalyzeEntitySentimentResponse
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
37
49
|
class AnalyzeSentimentRequest
|
38
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
51
|
|
@@ -154,6 +166,24 @@ module Google
|
|
154
166
|
end
|
155
167
|
end
|
156
168
|
|
169
|
+
class AnalyzeEntitySentimentRequest
|
170
|
+
# @private
|
171
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
172
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1::Document, decorator: Google::Apis::LanguageV1::Document::Representation
|
173
|
+
|
174
|
+
property :encoding_type, as: 'encodingType'
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
class AnalyzeEntitySentimentResponse
|
179
|
+
# @private
|
180
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
181
|
+
collection :entities, as: 'entities', class: Google::Apis::LanguageV1::Entity, decorator: Google::Apis::LanguageV1::Entity::Representation
|
182
|
+
|
183
|
+
property :language, as: 'language'
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
157
187
|
class AnalyzeSentimentRequest
|
158
188
|
# @private
|
159
189
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -246,6 +276,8 @@ module Google
|
|
246
276
|
hash :metadata, as: 'metadata'
|
247
277
|
property :name, as: 'name'
|
248
278
|
property :salience, as: 'salience'
|
279
|
+
property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1::Sentiment, decorator: Google::Apis::LanguageV1::Sentiment::Representation
|
280
|
+
|
249
281
|
property :type, as: 'type'
|
250
282
|
end
|
251
283
|
end
|
@@ -253,6 +285,8 @@ module Google
|
|
253
285
|
class EntityMention
|
254
286
|
# @private
|
255
287
|
class Representation < Google::Apis::Core::JsonRepresentation
|
288
|
+
property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1::Sentiment, decorator: Google::Apis::LanguageV1::Sentiment::Representation
|
289
|
+
|
256
290
|
property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation
|
257
291
|
|
258
292
|
property :type, as: 'type'
|
@@ -264,6 +298,7 @@ module Google
|
|
264
298
|
class Representation < Google::Apis::Core::JsonRepresentation
|
265
299
|
property :extract_document_sentiment, as: 'extractDocumentSentiment'
|
266
300
|
property :extract_entities, as: 'extractEntities'
|
301
|
+
property :extract_entity_sentiment, as: 'extractEntitySentiment'
|
267
302
|
property :extract_syntax, as: 'extractSyntax'
|
268
303
|
end
|
269
304
|
end
|
@@ -81,6 +81,37 @@ module Google
|
|
81
81
|
execute_or_queue_command(command, &block)
|
82
82
|
end
|
83
83
|
|
84
|
+
# Finds entities, similar to AnalyzeEntities in the text and analyzes
|
85
|
+
# sentiment associated with each entity and its mentions.
|
86
|
+
# @param [Google::Apis::LanguageV1::AnalyzeEntitySentimentRequest] analyze_entity_sentiment_request_object
|
87
|
+
# @param [String] fields
|
88
|
+
# Selector specifying which fields to include in a partial response.
|
89
|
+
# @param [String] quota_user
|
90
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
91
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
92
|
+
# @param [Google::Apis::RequestOptions] options
|
93
|
+
# Request-specific options
|
94
|
+
#
|
95
|
+
# @yield [result, err] Result & error if block supplied
|
96
|
+
# @yieldparam result [Google::Apis::LanguageV1::AnalyzeEntitySentimentResponse] parsed result object
|
97
|
+
# @yieldparam err [StandardError] error object if request failed
|
98
|
+
#
|
99
|
+
# @return [Google::Apis::LanguageV1::AnalyzeEntitySentimentResponse]
|
100
|
+
#
|
101
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
102
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
103
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
104
|
+
def analyze_document_entity_sentiment(analyze_entity_sentiment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
105
|
+
command = make_simple_command(:post, 'v1/documents:analyzeEntitySentiment', options)
|
106
|
+
command.request_representation = Google::Apis::LanguageV1::AnalyzeEntitySentimentRequest::Representation
|
107
|
+
command.request_object = analyze_entity_sentiment_request_object
|
108
|
+
command.response_representation = Google::Apis::LanguageV1::AnalyzeEntitySentimentResponse::Representation
|
109
|
+
command.response_class = Google::Apis::LanguageV1::AnalyzeEntitySentimentResponse
|
110
|
+
command.query['fields'] = fields unless fields.nil?
|
111
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
112
|
+
execute_or_queue_command(command, &block)
|
113
|
+
end
|
114
|
+
|
84
115
|
# Analyzes the sentiment of the provided text.
|
85
116
|
# @param [Google::Apis::LanguageV1::AnalyzeSentimentRequest] analyze_sentiment_request_object
|
86
117
|
# @param [String] fields
|