google-api-client 0.9.8 → 0.9.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile +9 -1
- data/README.md +10 -2
- data/api_names.yaml +63 -110
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
- data/generated/google/apis/admin_directory_v1/service.rb +41 -2
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +2 -2
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +379 -3
- data/generated/google/apis/analytics_v3/representations.rb +136 -0
- data/generated/google/apis/analytics_v3/service.rb +217 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
- data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
- data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
- data/generated/google/apis/appengine_v1beta5.rb +7 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
- data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
- data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
- 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 +277 -20
- data/generated/google/apis/bigquery_v2/representations.rb +86 -0
- data/generated/google/apis/bigquery_v2/service.rb +8 -2
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +79 -1
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
- data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
- data/generated/google/apis/civicinfo_v2/service.rb +27 -6
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +183 -37
- data/generated/google/apis/classroom_v1/representations.rb +74 -9
- data/generated/google/apis/classroom_v1/service.rb +403 -38
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
- data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
- data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
- data/generated/google/apis/clouddebugger_v2.rb +3 -6
- data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +2299 -434
- data/generated/google/apis/compute_beta/representations.rb +752 -33
- data/generated/google/apis/compute_beta/service.rb +6067 -3153
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1681 -207
- data/generated/google/apis/compute_v1/representations.rb +552 -0
- data/generated/google/apis/compute_v1/service.rb +2797 -1171
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +757 -1
- data/generated/google/apis/content_v2/representations.rb +337 -0
- data/generated/google/apis/content_v2/service.rb +244 -0
- data/generated/google/apis/dataflow_v1b3.rb +38 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +213 -68
- data/generated/google/apis/dataproc_v1/representations.rb +38 -0
- data/generated/google/apis/dataproc_v1/service.rb +78 -48
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
- data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +27 -3
- data/generated/google/apis/drive_v2/representations.rb +4 -0
- data/generated/google/apis/drive_v2/service.rb +16 -3
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +50 -16
- data/generated/google/apis/drive_v3/representations.rb +4 -0
- data/generated/google/apis/drive_v3/service.rb +12 -2
- data/generated/google/apis/fitness_v1.rb +8 -2
- data/generated/google/apis/fitness_v1/classes.rb +64 -6
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -4
- data/generated/google/apis/genomics_v1/classes.rb +143 -34
- data/generated/google/apis/genomics_v1/representations.rb +48 -11
- data/generated/google/apis/genomics_v1/service.rb +35 -37
- data/generated/google/apis/gmail_v1.rb +10 -1
- data/generated/google/apis/gmail_v1/classes.rb +542 -4
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +181 -206
- data/generated/google/apis/iam_v1/representations.rb +36 -45
- data/generated/google/apis/iam_v1/service.rb +101 -67
- data/generated/google/apis/identitytoolkit_v3.rb +4 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +599 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +152 -0
- data/generated/google/apis/logging_v2beta1.rb +6 -6
- data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
- data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
- data/generated/google/apis/logging_v2beta1/service.rb +290 -209
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +711 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +10 -9
- data/generated/google/apis/pubsub_v1/service.rb +128 -27
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -0
- data/generated/google/apis/script_v1/representations.rb +1 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +910 -89
- data/generated/google/apis/sheets_v4/representations.rb +194 -10
- data/generated/google/apis/sheets_v4/service.rb +216 -49
- data/generated/google/apis/slides_v1.rb +49 -0
- data/generated/google/apis/slides_v1/classes.rb +3926 -0
- data/generated/google/apis/slides_v1/representations.rb +1722 -0
- data/generated/google/apis/slides_v1/service.rb +202 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
- data/generated/google/apis/speech_v1beta1/service.rb +271 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +43 -18
- data/generated/google/apis/storage_v1/representations.rb +4 -1
- data/generated/google/apis/storage_v1/service.rb +5 -2
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +12 -11
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +183 -21
- data/generated/google/apis/youtube_v3/representations.rb +85 -4
- data/generated/google/apis/youtube_v3/service.rb +41 -5
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/base_service.rb +10 -4
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +2 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/sync.rb +71 -0
- metadata +55 -13
@@ -0,0 +1,289 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module LanguageV1beta1
|
24
|
+
|
25
|
+
class Document
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class TextSpan
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class Status
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class AnalyzeEntitiesRequest
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class EntityMention
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class AnalyzeSentimentRequest
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class AnalyzeSentimentResponse
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class DependencyEdge
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class AnnotateTextRequest
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class Sentence
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class Features
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class PartOfSpeech
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class AnnotateTextResponse
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class Entity
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class Sentiment
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class Token
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class AnalyzeEntitiesResponse
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class Document
|
128
|
+
# @private
|
129
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
130
|
+
property :language, as: 'language'
|
131
|
+
property :gcs_content_uri, as: 'gcsContentUri'
|
132
|
+
property :type, as: 'type'
|
133
|
+
property :content, as: 'content'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
class TextSpan
|
138
|
+
# @private
|
139
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
140
|
+
property :begin_offset, as: 'beginOffset'
|
141
|
+
property :content, as: 'content'
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
class Status
|
146
|
+
# @private
|
147
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
148
|
+
property :code, as: 'code'
|
149
|
+
collection :details, as: 'details'
|
150
|
+
property :message, as: 'message'
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class AnalyzeEntitiesRequest
|
155
|
+
# @private
|
156
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
157
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
158
|
+
|
159
|
+
property :encoding_type, as: 'encodingType'
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
class EntityMention
|
164
|
+
# @private
|
165
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
166
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
167
|
+
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
class AnalyzeSentimentRequest
|
172
|
+
# @private
|
173
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
174
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
175
|
+
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
class AnalyzeSentimentResponse
|
180
|
+
# @private
|
181
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
182
|
+
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
|
183
|
+
|
184
|
+
property :language, as: 'language'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class DependencyEdge
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
property :head_token_index, as: 'headTokenIndex'
|
192
|
+
property :label, as: 'label'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class AnnotateTextRequest
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation
|
200
|
+
|
201
|
+
property :encoding_type, as: 'encodingType'
|
202
|
+
property :features, as: 'features', class: Google::Apis::LanguageV1beta1::Features, decorator: Google::Apis::LanguageV1beta1::Features::Representation
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
class Sentence
|
208
|
+
# @private
|
209
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
210
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
211
|
+
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
class Features
|
216
|
+
# @private
|
217
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
218
|
+
property :extract_document_sentiment, as: 'extractDocumentSentiment'
|
219
|
+
property :extract_entities, as: 'extractEntities'
|
220
|
+
property :extract_syntax, as: 'extractSyntax'
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class PartOfSpeech
|
225
|
+
# @private
|
226
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
227
|
+
property :tag, as: 'tag'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
class AnnotateTextResponse
|
232
|
+
# @private
|
233
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
234
|
+
collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
|
235
|
+
|
236
|
+
property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation
|
237
|
+
|
238
|
+
property :language, as: 'language'
|
239
|
+
collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation
|
240
|
+
|
241
|
+
collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
class Entity
|
247
|
+
# @private
|
248
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
249
|
+
hash :metadata, as: 'metadata'
|
250
|
+
property :salience, as: 'salience'
|
251
|
+
property :type, as: 'type'
|
252
|
+
collection :mentions, as: 'mentions', class: Google::Apis::LanguageV1beta1::EntityMention, decorator: Google::Apis::LanguageV1beta1::EntityMention::Representation
|
253
|
+
|
254
|
+
property :name, as: 'name'
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
class Sentiment
|
259
|
+
# @private
|
260
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
261
|
+
property :polarity, as: 'polarity'
|
262
|
+
property :magnitude, as: 'magnitude'
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
class Token
|
267
|
+
# @private
|
268
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
269
|
+
property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation
|
270
|
+
|
271
|
+
property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation
|
272
|
+
|
273
|
+
property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation
|
274
|
+
|
275
|
+
property :lemma, as: 'lemma'
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
class AnalyzeEntitiesResponse
|
280
|
+
# @private
|
281
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
282
|
+
collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation
|
283
|
+
|
284
|
+
property :language, as: 'language'
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
@@ -0,0 +1,152 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module LanguageV1beta1
|
23
|
+
# Google Cloud Natural Language API
|
24
|
+
#
|
25
|
+
# Google Cloud Natural Language API provides natural language understanding
|
26
|
+
# technologies to developers. Examples include sentiment analysis, entity
|
27
|
+
# recognition, and text annotations.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# require 'google/apis/language_v1beta1'
|
31
|
+
#
|
32
|
+
# Language = Google::Apis::LanguageV1beta1 # Alias the module
|
33
|
+
# service = Language::CloudNaturalLanguageService.new
|
34
|
+
#
|
35
|
+
# @see https://cloud.google.com/natural-language/
|
36
|
+
class CloudNaturalLanguageService < Google::Apis::Core::BaseService
|
37
|
+
# @return [String]
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
40
|
+
attr_accessor :key
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
super('https://language.googleapis.com/', '')
|
49
|
+
end
|
50
|
+
|
51
|
+
# Analyzes the sentiment of the provided text.
|
52
|
+
# @param [Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest] analyze_sentiment_request_object
|
53
|
+
# @param [String] quota_user
|
54
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
55
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
56
|
+
# @param [String] fields
|
57
|
+
# Selector specifying which fields to include in a partial response.
|
58
|
+
# @param [Google::Apis::RequestOptions] options
|
59
|
+
# Request-specific options
|
60
|
+
#
|
61
|
+
# @yield [result, err] Result & error if block supplied
|
62
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse] parsed result object
|
63
|
+
# @yieldparam err [StandardError] error object if request failed
|
64
|
+
#
|
65
|
+
# @return [Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse]
|
66
|
+
#
|
67
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
68
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
69
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
70
|
+
def analyze_document_sentiment(analyze_sentiment_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
71
|
+
command = make_simple_command(:post, 'v1beta1/documents:analyzeSentiment', options)
|
72
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest::Representation
|
73
|
+
command.request_object = analyze_sentiment_request_object
|
74
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse::Representation
|
75
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse
|
76
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
77
|
+
command.query['fields'] = fields unless fields.nil?
|
78
|
+
execute_or_queue_command(command, &block)
|
79
|
+
end
|
80
|
+
|
81
|
+
# A convenience method that provides all the features that analyzeSentiment,
|
82
|
+
# analyzeEntities, and analyzeSyntax provide in one call.
|
83
|
+
# @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object
|
84
|
+
# @param [String] quota_user
|
85
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
86
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
87
|
+
# @param [String] fields
|
88
|
+
# Selector specifying which fields to include in a partial response.
|
89
|
+
# @param [Google::Apis::RequestOptions] options
|
90
|
+
# Request-specific options
|
91
|
+
#
|
92
|
+
# @yield [result, err] Result & error if block supplied
|
93
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnnotateTextResponse] parsed result object
|
94
|
+
# @yieldparam err [StandardError] error object if request failed
|
95
|
+
#
|
96
|
+
# @return [Google::Apis::LanguageV1beta1::AnnotateTextResponse]
|
97
|
+
#
|
98
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
99
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
100
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
101
|
+
def annotate_document_text(annotate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
102
|
+
command = make_simple_command(:post, 'v1beta1/documents:annotateText', options)
|
103
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation
|
104
|
+
command.request_object = annotate_text_request_object
|
105
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation
|
106
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse
|
107
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
108
|
+
command.query['fields'] = fields unless fields.nil?
|
109
|
+
execute_or_queue_command(command, &block)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Finds named entities (currently finds proper names) in the text,
|
113
|
+
# entity types, salience, mentions for each entity, and other properties.
|
114
|
+
# @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_request_object
|
115
|
+
# @param [String] quota_user
|
116
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
117
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
118
|
+
# @param [String] fields
|
119
|
+
# Selector specifying which fields to include in a partial response.
|
120
|
+
# @param [Google::Apis::RequestOptions] options
|
121
|
+
# Request-specific options
|
122
|
+
#
|
123
|
+
# @yield [result, err] Result & error if block supplied
|
124
|
+
# @yieldparam result [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse] parsed result object
|
125
|
+
# @yieldparam err [StandardError] error object if request failed
|
126
|
+
#
|
127
|
+
# @return [Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse]
|
128
|
+
#
|
129
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
130
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
131
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
132
|
+
def analyze_document_entities(analyze_entities_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
133
|
+
command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options)
|
134
|
+
command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation
|
135
|
+
command.request_object = analyze_entities_request_object
|
136
|
+
command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation
|
137
|
+
command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse
|
138
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
139
|
+
command.query['fields'] = fields unless fields.nil?
|
140
|
+
execute_or_queue_command(command, &block)
|
141
|
+
end
|
142
|
+
|
143
|
+
protected
|
144
|
+
|
145
|
+
def apply_command_defaults(command)
|
146
|
+
command.query['key'] = key unless key.nil?
|
147
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
@@ -18,14 +18,14 @@ require 'google/apis/logging_v2beta1/representations.rb'
|
|
18
18
|
|
19
19
|
module Google
|
20
20
|
module Apis
|
21
|
-
#
|
21
|
+
# Stackdriver Logging API
|
22
22
|
#
|
23
|
-
# Writes log entries and manages your
|
23
|
+
# Writes log entries and manages your Stackdriver Logging configuration.
|
24
24
|
#
|
25
25
|
# @see https://cloud.google.com/logging/docs/
|
26
26
|
module LoggingV2beta1
|
27
27
|
VERSION = 'V2beta1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20161107'
|
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'
|
@@ -33,14 +33,14 @@ module Google
|
|
33
33
|
# View your data across Google Cloud Platform services
|
34
34
|
AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
|
35
35
|
|
36
|
-
# Administrate log data for your projects
|
37
|
-
AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
|
38
|
-
|
39
36
|
# View log data for your projects
|
40
37
|
AUTH_LOGGING_READ = 'https://www.googleapis.com/auth/logging.read'
|
41
38
|
|
42
39
|
# Submit log data for your projects
|
43
40
|
AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
|
41
|
+
|
42
|
+
# Administrate log data for your projects
|
43
|
+
AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|