google-api-client 0.41.2 → 0.42.0
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 +36 -0
- data/generated/google/apis/accessapproval_v1.rb +1 -1
- data/generated/google/apis/accessapproval_v1/service.rb +3 -0
- data/generated/google/apis/accessapproval_v1beta1.rb +1 -1
- data/generated/google/apis/accessapproval_v1beta1/service.rb +3 -0
- data/generated/google/apis/admob_v1.rb +1 -1
- data/generated/google/apis/admob_v1/service.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/apigee_v1.rb +1 -1
- data/generated/google/apis/apigee_v1/classes.rb +1389 -105
- data/generated/google/apis/apigee_v1/representations.rb +543 -0
- data/generated/google/apis/apigee_v1/service.rb +1139 -93
- data/generated/google/apis/appsmarket_v2.rb +1 -1
- data/generated/google/apis/bigqueryreservation_v1.rb +1 -1
- data/generated/google/apis/bigqueryreservation_v1/classes.rb +34 -0
- data/generated/google/apis/bigqueryreservation_v1/representations.rb +16 -0
- data/generated/google/apis/bigqueryreservation_v1/service.rb +60 -0
- data/generated/google/apis/bigqueryreservation_v1beta1.rb +1 -1
- data/generated/google/apis/bigqueryreservation_v1beta1/classes.rb +8 -0
- data/generated/google/apis/bigqueryreservation_v1beta1/representations.rb +1 -0
- data/generated/google/apis/civicinfo_v2.rb +1 -1
- data/generated/google/apis/civicinfo_v2/classes.rb +9 -1
- data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
- data/generated/google/apis/civicinfo_v2/service.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/service.rb +4 -3
- data/generated/google/apis/cloudfunctions_v1.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1/classes.rb +14 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +2 -0
- data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +7 -0
- data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +1 -0
- data/generated/google/apis/{androidpublisher_v1.rb → customsearch_v1.rb} +8 -8
- data/generated/google/apis/customsearch_v1/classes.rb +1606 -0
- data/generated/google/apis/customsearch_v1/representations.rb +372 -0
- data/generated/google/apis/customsearch_v1/service.rb +608 -0
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +4 -2
- data/generated/google/apis/dialogflow_v2beta1/service.rb +8 -2
- data/generated/google/apis/displayvideo_v1.rb +1 -1
- data/generated/google/apis/displayvideo_v1/classes.rb +12 -5
- data/generated/google/apis/dns_v1.rb +4 -4
- data/generated/google/apis/dns_v1/classes.rb +313 -162
- data/generated/google/apis/dns_v1/service.rb +247 -180
- data/generated/google/apis/file_v1.rb +1 -1
- data/generated/google/apis/file_v1beta1.rb +1 -1
- data/generated/google/apis/{groupsmigration_v1.rb → firebasehosting_v1.rb} +10 -12
- data/generated/google/apis/firebasehosting_v1/classes.rb +186 -0
- data/generated/google/apis/{androidpublisher_v2 → firebasehosting_v1}/representations.rb +22 -32
- data/generated/google/apis/firebasehosting_v1/service.rb +183 -0
- data/generated/google/apis/firebasehosting_v1beta1.rb +1 -1
- data/generated/google/apis/firebasehosting_v1beta1/service.rb +2 -0
- data/generated/google/apis/games_v1.rb +5 -3
- data/generated/google/apis/games_v1/classes.rb +354 -2112
- data/generated/google/apis/games_v1/representations.rb +12 -647
- data/generated/google/apis/games_v1/service.rb +212 -1154
- data/generated/google/apis/gameservices_v1beta.rb +1 -1
- data/generated/google/apis/gameservices_v1beta/classes.rb +6 -6
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +1 -1
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +6 -6
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +10 -2
- data/generated/google/apis/monitoring_v3/representations.rb +1 -0
- data/generated/google/apis/monitoring_v3/service.rb +8 -5
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +24 -28
- data/generated/google/apis/pubsub_v1/service.rb +35 -44
- data/generated/google/apis/recommender_v1.rb +1 -1
- data/generated/google/apis/recommender_v1/classes.rb +211 -0
- data/generated/google/apis/recommender_v1/representations.rb +96 -0
- data/generated/google/apis/recommender_v1/service.rb +123 -0
- data/generated/google/apis/redis_v1.rb +1 -1
- data/generated/google/apis/redis_v1beta1.rb +1 -1
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/testing_v1/classes.rb +17 -6
- data/generated/google/apis/testing_v1/representations.rb +1 -0
- data/generated/google/apis/youtube_partner_v1.rb +4 -3
- data/generated/google/apis/youtube_partner_v1/classes.rb +1616 -1076
- data/generated/google/apis/youtube_partner_v1/representations.rb +357 -256
- data/generated/google/apis/youtube_partner_v1/service.rb +942 -1362
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +554 -0
- data/generated/google/apis/youtube_v3/representations.rb +281 -0
- data/generated/google/apis/youtube_v3/service.rb +259 -0
- data/lib/google/apis/version.rb +1 -1
- metadata +11 -19
- data/generated/google/apis/androidpublisher_v1/classes.rb +0 -26
- data/generated/google/apis/androidpublisher_v1/representations.rb +0 -26
- data/generated/google/apis/androidpublisher_v1/service.rb +0 -64
- data/generated/google/apis/androidpublisher_v1_1.rb +0 -34
- data/generated/google/apis/androidpublisher_v1_1/classes.rb +0 -94
- data/generated/google/apis/androidpublisher_v1_1/representations.rb +0 -45
- data/generated/google/apis/androidpublisher_v1_1/service.rb +0 -104
- data/generated/google/apis/androidpublisher_v2.rb +0 -34
- data/generated/google/apis/androidpublisher_v2/classes.rb +0 -223
- data/generated/google/apis/androidpublisher_v2/service.rb +0 -160
- data/generated/google/apis/groupsmigration_v1/classes.rb +0 -51
- data/generated/google/apis/groupsmigration_v1/representations.rb +0 -40
- data/generated/google/apis/groupsmigration_v1/service.rb +0 -100
|
@@ -26,7 +26,7 @@ module Google
|
|
|
26
26
|
# @see https://developers.google.com/apps-marketplace
|
|
27
27
|
module AppsmarketV2
|
|
28
28
|
VERSION = 'V2'
|
|
29
|
-
REVISION = '
|
|
29
|
+
REVISION = '20200706'
|
|
30
30
|
|
|
31
31
|
# View your installed application's licensing information
|
|
32
32
|
AUTH_APPSMARKETPLACE_LICENSE = 'https://www.googleapis.com/auth/appsmarketplace.license'
|
|
@@ -25,7 +25,7 @@ module Google
|
|
|
25
25
|
# @see https://cloud.google.com/bigquery/
|
|
26
26
|
module BigqueryreservationV1
|
|
27
27
|
VERSION = 'V1'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200702'
|
|
29
29
|
|
|
30
30
|
# View and manage your data in Google BigQuery
|
|
31
31
|
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
|
|
@@ -113,6 +113,13 @@ module Google
|
|
|
113
113
|
# @return [String]
|
|
114
114
|
attr_accessor :commitment_end_time
|
|
115
115
|
|
|
116
|
+
# Output only. The start of the current commitment period. It is applicable only
|
|
117
|
+
# for
|
|
118
|
+
# ACTIVE capacity commitments.
|
|
119
|
+
# Corresponds to the JSON property `commitmentStartTime`
|
|
120
|
+
# @return [String]
|
|
121
|
+
attr_accessor :commitment_start_time
|
|
122
|
+
|
|
116
123
|
# The `Status` type defines a logical error model that is suitable for
|
|
117
124
|
# different programming environments, including REST APIs and RPC APIs. It is
|
|
118
125
|
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
@@ -158,6 +165,7 @@ module Google
|
|
|
158
165
|
# Update properties of this object
|
|
159
166
|
def update!(**args)
|
|
160
167
|
@commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time)
|
|
168
|
+
@commitment_start_time = args[:commitment_start_time] if args.key?(:commitment_start_time)
|
|
161
169
|
@failure_status = args[:failure_status] if args.key?(:failure_status)
|
|
162
170
|
@name = args[:name] if args.key?(:name)
|
|
163
171
|
@plan = args[:plan] if args.key?(:plan)
|
|
@@ -465,6 +473,32 @@ module Google
|
|
|
465
473
|
end
|
|
466
474
|
end
|
|
467
475
|
|
|
476
|
+
# The response for ReservationService.SearchAllAssignments.
|
|
477
|
+
class SearchAllAssignmentsResponse
|
|
478
|
+
include Google::Apis::Core::Hashable
|
|
479
|
+
|
|
480
|
+
# List of assignments visible to the user.
|
|
481
|
+
# Corresponds to the JSON property `assignments`
|
|
482
|
+
# @return [Array<Google::Apis::BigqueryreservationV1::Assignment>]
|
|
483
|
+
attr_accessor :assignments
|
|
484
|
+
|
|
485
|
+
# Token to retrieve the next page of results, or empty if there are no
|
|
486
|
+
# more results in the list.
|
|
487
|
+
# Corresponds to the JSON property `nextPageToken`
|
|
488
|
+
# @return [String]
|
|
489
|
+
attr_accessor :next_page_token
|
|
490
|
+
|
|
491
|
+
def initialize(**args)
|
|
492
|
+
update!(**args)
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
# Update properties of this object
|
|
496
|
+
def update!(**args)
|
|
497
|
+
@assignments = args[:assignments] if args.key?(:assignments)
|
|
498
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
|
499
|
+
end
|
|
500
|
+
end
|
|
501
|
+
|
|
468
502
|
# The response for ReservationService.SearchAssignments.
|
|
469
503
|
class SearchAssignmentsResponse
|
|
470
504
|
include Google::Apis::Core::Hashable
|
|
@@ -100,6 +100,12 @@ module Google
|
|
|
100
100
|
include Google::Apis::Core::JsonObjectSupport
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
+
class SearchAllAssignmentsResponse
|
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
105
|
+
|
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
107
|
+
end
|
|
108
|
+
|
|
103
109
|
class SearchAssignmentsResponse
|
|
104
110
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
105
111
|
|
|
@@ -147,6 +153,7 @@ module Google
|
|
|
147
153
|
# @private
|
|
148
154
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
149
155
|
property :commitment_end_time, as: 'commitmentEndTime'
|
|
156
|
+
property :commitment_start_time, as: 'commitmentStartTime'
|
|
150
157
|
property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1::Status, decorator: Google::Apis::BigqueryreservationV1::Status::Representation
|
|
151
158
|
|
|
152
159
|
property :name, as: 'name'
|
|
@@ -241,6 +248,15 @@ module Google
|
|
|
241
248
|
end
|
|
242
249
|
end
|
|
243
250
|
|
|
251
|
+
class SearchAllAssignmentsResponse
|
|
252
|
+
# @private
|
|
253
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
254
|
+
collection :assignments, as: 'assignments', class: Google::Apis::BigqueryreservationV1::Assignment, decorator: Google::Apis::BigqueryreservationV1::Assignment::Representation
|
|
255
|
+
|
|
256
|
+
property :next_page_token, as: 'nextPageToken'
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
|
|
244
260
|
class SearchAssignmentsResponse
|
|
245
261
|
# @private
|
|
246
262
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -158,6 +158,66 @@ module Google
|
|
|
158
158
|
execute_or_queue_command(command, &block)
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
+
# Looks up assignments for a specified resource for a particular region.
|
|
162
|
+
# If the request is about a project:
|
|
163
|
+
# 1. Assignments created on the project will be returned if they exist.
|
|
164
|
+
# 2. Otherwise assignments created on the closest ancestor will be
|
|
165
|
+
# returned.
|
|
166
|
+
# 3. Assignments for different JobTypes will all be returned.
|
|
167
|
+
# The same logic applies if the request is about a folder.
|
|
168
|
+
# If the request is about an organization, then assignments created on the
|
|
169
|
+
# organization will be returned (organization doesn't have ancestors).
|
|
170
|
+
# Comparing to ListAssignments, there are some behavior
|
|
171
|
+
# differences:
|
|
172
|
+
# 1. permission on the assignee will be verified in this API.
|
|
173
|
+
# 2. Hierarchy lookup (project->folder->organization) happens in this API.
|
|
174
|
+
# 3. Parent here is `projects/*/locations/*`, instead of
|
|
175
|
+
# `projects/*/locations/*reservations/*`.
|
|
176
|
+
# @param [String] parent
|
|
177
|
+
# Required. The resource name with location (project name could be the wildcard '
|
|
178
|
+
# -'),
|
|
179
|
+
# e.g.:
|
|
180
|
+
# `projects/-/locations/US`.
|
|
181
|
+
# @param [Fixnum] page_size
|
|
182
|
+
# The maximum number of items to return per page.
|
|
183
|
+
# @param [String] page_token
|
|
184
|
+
# The next_page_token value returned from a previous List request, if any.
|
|
185
|
+
# @param [String] query
|
|
186
|
+
# Please specify resource name as assignee in the query.
|
|
187
|
+
# Examples:
|
|
188
|
+
# * `assignee=projects/myproject`
|
|
189
|
+
# * `assignee=folders/123`
|
|
190
|
+
# * `assignee=organizations/456`
|
|
191
|
+
# @param [String] fields
|
|
192
|
+
# Selector specifying which fields to include in a partial response.
|
|
193
|
+
# @param [String] quota_user
|
|
194
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
195
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
196
|
+
# @param [Google::Apis::RequestOptions] options
|
|
197
|
+
# Request-specific options
|
|
198
|
+
#
|
|
199
|
+
# @yield [result, err] Result & error if block supplied
|
|
200
|
+
# @yieldparam result [Google::Apis::BigqueryreservationV1::SearchAllAssignmentsResponse] parsed result object
|
|
201
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
202
|
+
#
|
|
203
|
+
# @return [Google::Apis::BigqueryreservationV1::SearchAllAssignmentsResponse]
|
|
204
|
+
#
|
|
205
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
206
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
207
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
208
|
+
def search_project_location_all_assignments(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
209
|
+
command = make_simple_command(:get, 'v1/{+parent}:searchAllAssignments', options)
|
|
210
|
+
command.response_representation = Google::Apis::BigqueryreservationV1::SearchAllAssignmentsResponse::Representation
|
|
211
|
+
command.response_class = Google::Apis::BigqueryreservationV1::SearchAllAssignmentsResponse
|
|
212
|
+
command.params['parent'] = parent unless parent.nil?
|
|
213
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
214
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
215
|
+
command.query['query'] = query unless query.nil?
|
|
216
|
+
command.query['fields'] = fields unless fields.nil?
|
|
217
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
218
|
+
execute_or_queue_command(command, &block)
|
|
219
|
+
end
|
|
220
|
+
|
|
161
221
|
# Looks up assignments for a specified resource for a particular region.
|
|
162
222
|
# If the request is about a project:
|
|
163
223
|
# 1. Assignments created on the project will be returned if they exist.
|
|
@@ -25,7 +25,7 @@ module Google
|
|
|
25
25
|
# @see https://cloud.google.com/bigquery/
|
|
26
26
|
module BigqueryreservationV1beta1
|
|
27
27
|
VERSION = 'V1beta1'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200702'
|
|
29
29
|
|
|
30
30
|
# View and manage your data in Google BigQuery
|
|
31
31
|
AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
|
|
@@ -113,6 +113,13 @@ module Google
|
|
|
113
113
|
# @return [String]
|
|
114
114
|
attr_accessor :commitment_end_time
|
|
115
115
|
|
|
116
|
+
# Output only. The start of the current commitment period. It is applicable only
|
|
117
|
+
# for
|
|
118
|
+
# ACTIVE capacity commitments.
|
|
119
|
+
# Corresponds to the JSON property `commitmentStartTime`
|
|
120
|
+
# @return [String]
|
|
121
|
+
attr_accessor :commitment_start_time
|
|
122
|
+
|
|
116
123
|
# The `Status` type defines a logical error model that is suitable for
|
|
117
124
|
# different programming environments, including REST APIs and RPC APIs. It is
|
|
118
125
|
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
@@ -158,6 +165,7 @@ module Google
|
|
|
158
165
|
# Update properties of this object
|
|
159
166
|
def update!(**args)
|
|
160
167
|
@commitment_end_time = args[:commitment_end_time] if args.key?(:commitment_end_time)
|
|
168
|
+
@commitment_start_time = args[:commitment_start_time] if args.key?(:commitment_start_time)
|
|
161
169
|
@failure_status = args[:failure_status] if args.key?(:failure_status)
|
|
162
170
|
@name = args[:name] if args.key?(:name)
|
|
163
171
|
@plan = args[:plan] if args.key?(:plan)
|
|
@@ -135,6 +135,7 @@ module Google
|
|
|
135
135
|
# @private
|
|
136
136
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
137
137
|
property :commitment_end_time, as: 'commitmentEndTime'
|
|
138
|
+
property :commitment_start_time, as: 'commitmentStartTime'
|
|
138
139
|
property :failure_status, as: 'failureStatus', class: Google::Apis::BigqueryreservationV1beta1::Status, decorator: Google::Apis::BigqueryreservationV1beta1::Status::Representation
|
|
139
140
|
|
|
140
141
|
property :name, as: 'name'
|
|
@@ -317,7 +317,14 @@ module Google
|
|
|
317
317
|
# @return [String]
|
|
318
318
|
attr_accessor :office
|
|
319
319
|
|
|
320
|
-
# If this is a partisan election, the name of the party it is for.
|
|
320
|
+
# If this is a partisan election, the name of the party/parties it is for.
|
|
321
|
+
# Corresponds to the JSON property `primaryParties`
|
|
322
|
+
# @return [Array<String>]
|
|
323
|
+
attr_accessor :primary_parties
|
|
324
|
+
|
|
325
|
+
# [DEPRECATED] If this is a partisan election, the name of the party it is for.
|
|
326
|
+
# This field as deprecated in favor of the array "primaryParties", as contests
|
|
327
|
+
# may contain more than one party.
|
|
321
328
|
# Corresponds to the JSON property `primaryParty`
|
|
322
329
|
# @return [String]
|
|
323
330
|
attr_accessor :primary_party
|
|
@@ -425,6 +432,7 @@ module Google
|
|
|
425
432
|
@number_elected = args[:number_elected] if args.key?(:number_elected)
|
|
426
433
|
@number_voting_for = args[:number_voting_for] if args.key?(:number_voting_for)
|
|
427
434
|
@office = args[:office] if args.key?(:office)
|
|
435
|
+
@primary_parties = args[:primary_parties] if args.key?(:primary_parties)
|
|
428
436
|
@primary_party = args[:primary_party] if args.key?(:primary_party)
|
|
429
437
|
@referendum_ballot_responses = args[:referendum_ballot_responses] if args.key?(:referendum_ballot_responses)
|
|
430
438
|
@referendum_brief = args[:referendum_brief] if args.key?(:referendum_brief)
|
|
@@ -216,6 +216,7 @@ module Google
|
|
|
216
216
|
property :number_elected, :numeric_string => true, as: 'numberElected'
|
|
217
217
|
property :number_voting_for, :numeric_string => true, as: 'numberVotingFor'
|
|
218
218
|
property :office, as: 'office'
|
|
219
|
+
collection :primary_parties, as: 'primaryParties'
|
|
219
220
|
property :primary_party, as: 'primaryParty'
|
|
220
221
|
collection :referendum_ballot_responses, as: 'referendumBallotResponses'
|
|
221
222
|
property :referendum_brief, as: 'referendumBrief'
|
|
@@ -121,7 +121,7 @@ module Google
|
|
|
121
121
|
# @param [Boolean] official_only
|
|
122
122
|
# If set to true, only data from official state sources will be returned.
|
|
123
123
|
# @param [Boolean] return_all_available_data
|
|
124
|
-
# If set to true, the query will return the success
|
|
124
|
+
# If set to true, the query will return the success code and include any partial
|
|
125
125
|
# information when it is unable to determine a matching address or unable to
|
|
126
126
|
# determine the election for electionId=0 queries.
|
|
127
127
|
# @param [String] fields
|
|
@@ -25,7 +25,7 @@ module Google
|
|
|
25
25
|
# @see https://developers.google.com/classroom/
|
|
26
26
|
module ClassroomV1
|
|
27
27
|
VERSION = 'V1'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200706'
|
|
29
29
|
|
|
30
30
|
# View and manage announcements in Google Classroom
|
|
31
31
|
AUTH_CLASSROOM_ANNOUNCEMENTS = 'https://www.googleapis.com/auth/classroom.announcements'
|
|
@@ -1626,7 +1626,7 @@ module Google
|
|
|
1626
1626
|
# This identifier can be either the Classroom-assigned identifier or an
|
|
1627
1627
|
# alias.
|
|
1628
1628
|
# @param [Fixnum] page_size
|
|
1629
|
-
# Maximum number of items to return.
|
|
1629
|
+
# Maximum number of items to return. The default is 30 if unspecified or `0`.
|
|
1630
1630
|
# The server may return fewer than the specified number of results.
|
|
1631
1631
|
# @param [String] page_token
|
|
1632
1632
|
# nextPageToken
|
|
@@ -1811,7 +1811,7 @@ module Google
|
|
|
1811
1811
|
# This identifier can be either the Classroom-assigned identifier or an
|
|
1812
1812
|
# alias.
|
|
1813
1813
|
# @param [Fixnum] page_size
|
|
1814
|
-
# Maximum number of items to return.
|
|
1814
|
+
# Maximum number of items to return. The default is 30 if unspecified or `0`.
|
|
1815
1815
|
# The server may return fewer than the specified number of results.
|
|
1816
1816
|
# @param [String] page_token
|
|
1817
1817
|
# nextPageToken
|
|
@@ -2231,7 +2231,8 @@ module Google
|
|
|
2231
2231
|
# Restricts returned invitations to those for a course with the specified
|
|
2232
2232
|
# identifier.
|
|
2233
2233
|
# @param [Fixnum] page_size
|
|
2234
|
-
# Maximum number of items to return.
|
|
2234
|
+
# Maximum number of items to return. The default is 500 if unspecified or
|
|
2235
|
+
# `0`.
|
|
2235
2236
|
# The server may return fewer than the specified number of results.
|
|
2236
2237
|
# @param [String] page_token
|
|
2237
2238
|
# nextPageToken
|
|
@@ -25,7 +25,7 @@ module Google
|
|
|
25
25
|
# @see https://cloud.google.com/functions
|
|
26
26
|
module CloudfunctionsV1
|
|
27
27
|
VERSION = 'V1'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200629'
|
|
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'
|
|
@@ -284,6 +284,12 @@ module Google
|
|
|
284
284
|
# @return [Fixnum]
|
|
285
285
|
attr_accessor :available_memory_mb
|
|
286
286
|
|
|
287
|
+
# Output only. The Cloud Build ID of the latest successful deployment of the
|
|
288
|
+
# function.
|
|
289
|
+
# Corresponds to the JSON property `buildId`
|
|
290
|
+
# @return [String]
|
|
291
|
+
attr_accessor :build_id
|
|
292
|
+
|
|
287
293
|
# User-provided description of a function.
|
|
288
294
|
# Corresponds to the JSON property `description`
|
|
289
295
|
# @return [String]
|
|
@@ -436,6 +442,7 @@ module Google
|
|
|
436
442
|
# Update properties of this object
|
|
437
443
|
def update!(**args)
|
|
438
444
|
@available_memory_mb = args[:available_memory_mb] if args.key?(:available_memory_mb)
|
|
445
|
+
@build_id = args[:build_id] if args.key?(:build_id)
|
|
439
446
|
@description = args[:description] if args.key?(:description)
|
|
440
447
|
@entry_point = args[:entry_point] if args.key?(:entry_point)
|
|
441
448
|
@environment_variables = args[:environment_variables] if args.key?(:environment_variables)
|
|
@@ -907,6 +914,12 @@ module Google
|
|
|
907
914
|
class OperationMetadataV1
|
|
908
915
|
include Google::Apis::Core::Hashable
|
|
909
916
|
|
|
917
|
+
# The Cloud Build ID of the function created or updated by an API call.
|
|
918
|
+
# This field is only populated for Create and Update operations.
|
|
919
|
+
# Corresponds to the JSON property `buildId`
|
|
920
|
+
# @return [String]
|
|
921
|
+
attr_accessor :build_id
|
|
922
|
+
|
|
910
923
|
# The original request that started the operation.
|
|
911
924
|
# Corresponds to the JSON property `request`
|
|
912
925
|
# @return [Hash<String,Object>]
|
|
@@ -940,6 +953,7 @@ module Google
|
|
|
940
953
|
|
|
941
954
|
# Update properties of this object
|
|
942
955
|
def update!(**args)
|
|
956
|
+
@build_id = args[:build_id] if args.key?(:build_id)
|
|
943
957
|
@request = args[:request] if args.key?(:request)
|
|
944
958
|
@target = args[:target] if args.key?(:target)
|
|
945
959
|
@type = args[:type] if args.key?(:type)
|
|
@@ -237,6 +237,7 @@ module Google
|
|
|
237
237
|
# @private
|
|
238
238
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
239
239
|
property :available_memory_mb, as: 'availableMemoryMb'
|
|
240
|
+
property :build_id, as: 'buildId'
|
|
240
241
|
property :description, as: 'description'
|
|
241
242
|
property :entry_point, as: 'entryPoint'
|
|
242
243
|
hash :environment_variables, as: 'environmentVariables'
|
|
@@ -381,6 +382,7 @@ module Google
|
|
|
381
382
|
class OperationMetadataV1
|
|
382
383
|
# @private
|
|
383
384
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
385
|
+
property :build_id, as: 'buildId'
|
|
384
386
|
hash :request, as: 'request'
|
|
385
387
|
property :target, as: 'target'
|
|
386
388
|
property :type, as: 'type'
|
|
@@ -25,7 +25,7 @@ module Google
|
|
|
25
25
|
# @see https://cloud.google.com/functions
|
|
26
26
|
module CloudfunctionsV1beta2
|
|
27
27
|
VERSION = 'V1beta2'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200629'
|
|
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'
|
|
@@ -635,6 +635,12 @@ module Google
|
|
|
635
635
|
class OperationMetadataV1
|
|
636
636
|
include Google::Apis::Core::Hashable
|
|
637
637
|
|
|
638
|
+
# The Cloud Build ID of the function created or updated by an API call.
|
|
639
|
+
# This field is only populated for Create and Update operations.
|
|
640
|
+
# Corresponds to the JSON property `buildId`
|
|
641
|
+
# @return [String]
|
|
642
|
+
attr_accessor :build_id
|
|
643
|
+
|
|
638
644
|
# The original request that started the operation.
|
|
639
645
|
# Corresponds to the JSON property `request`
|
|
640
646
|
# @return [Hash<String,Object>]
|
|
@@ -668,6 +674,7 @@ module Google
|
|
|
668
674
|
|
|
669
675
|
# Update properties of this object
|
|
670
676
|
def update!(**args)
|
|
677
|
+
@build_id = args[:build_id] if args.key?(:build_id)
|
|
671
678
|
@request = args[:request] if args.key?(:request)
|
|
672
679
|
@target = args[:target] if args.key?(:target)
|
|
673
680
|
@type = args[:type] if args.key?(:type)
|
|
@@ -295,6 +295,7 @@ module Google
|
|
|
295
295
|
class OperationMetadataV1
|
|
296
296
|
# @private
|
|
297
297
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
298
|
+
property :build_id, as: 'buildId'
|
|
298
299
|
hash :request, as: 'request'
|
|
299
300
|
property :target, as: 'target'
|
|
300
301
|
property :type, as: 'type'
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
require 'google/apis/
|
|
16
|
-
require 'google/apis/
|
|
17
|
-
require 'google/apis/
|
|
15
|
+
require 'google/apis/customsearch_v1/service.rb'
|
|
16
|
+
require 'google/apis/customsearch_v1/classes.rb'
|
|
17
|
+
require 'google/apis/customsearch_v1/representations.rb'
|
|
18
18
|
|
|
19
19
|
module Google
|
|
20
20
|
module Apis
|
|
21
|
-
#
|
|
21
|
+
# Custom Search API
|
|
22
22
|
#
|
|
23
|
-
#
|
|
23
|
+
# Searches over a website or collection of websites
|
|
24
24
|
#
|
|
25
|
-
# @see https://developers.google.com/
|
|
26
|
-
module
|
|
25
|
+
# @see https://developers.google.com/custom-search/v1/introduction
|
|
26
|
+
module CustomsearchV1
|
|
27
27
|
VERSION = 'V1'
|
|
28
|
-
REVISION = '
|
|
28
|
+
REVISION = '20200707'
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -0,0 +1,1606 @@
|
|
|
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 CustomsearchV1
|
|
24
|
+
|
|
25
|
+
# Promotion result.
|
|
26
|
+
class Promotion
|
|
27
|
+
include Google::Apis::Core::Hashable
|
|
28
|
+
|
|
29
|
+
# An array of block objects for this promotion. See [Google WebSearch
|
|
30
|
+
# Protocol
|
|
31
|
+
# reference](https://developers.google.com/custom-search/docs/xml_results)
|
|
32
|
+
# for more information.
|
|
33
|
+
# Corresponds to the JSON property `bodyLines`
|
|
34
|
+
# @return [Array<Google::Apis::CustomsearchV1::Promotion::BodyLine>]
|
|
35
|
+
attr_accessor :body_lines
|
|
36
|
+
|
|
37
|
+
# An abridged version of this search's result URL, e.g. www.example.com.
|
|
38
|
+
# Corresponds to the JSON property `displayLink`
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :display_link
|
|
41
|
+
|
|
42
|
+
# The title of the promotion, in HTML.
|
|
43
|
+
# Corresponds to the JSON property `htmlTitle`
|
|
44
|
+
# @return [String]
|
|
45
|
+
attr_accessor :html_title
|
|
46
|
+
|
|
47
|
+
# Image belonging to a promotion.
|
|
48
|
+
# Corresponds to the JSON property `image`
|
|
49
|
+
# @return [Google::Apis::CustomsearchV1::Promotion::Image]
|
|
50
|
+
attr_accessor :image
|
|
51
|
+
|
|
52
|
+
# The URL of the promotion.
|
|
53
|
+
# Corresponds to the JSON property `link`
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :link
|
|
56
|
+
|
|
57
|
+
# The title of the promotion.
|
|
58
|
+
# Corresponds to the JSON property `title`
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :title
|
|
61
|
+
|
|
62
|
+
def initialize(**args)
|
|
63
|
+
update!(**args)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Update properties of this object
|
|
67
|
+
def update!(**args)
|
|
68
|
+
@body_lines = args[:body_lines] if args.key?(:body_lines)
|
|
69
|
+
@display_link = args[:display_link] if args.key?(:display_link)
|
|
70
|
+
@html_title = args[:html_title] if args.key?(:html_title)
|
|
71
|
+
@image = args[:image] if args.key?(:image)
|
|
72
|
+
@link = args[:link] if args.key?(:link)
|
|
73
|
+
@title = args[:title] if args.key?(:title)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Block object belonging to a promotion.
|
|
77
|
+
class BodyLine
|
|
78
|
+
include Google::Apis::Core::Hashable
|
|
79
|
+
|
|
80
|
+
# The block object's text in HTML, if it has text.
|
|
81
|
+
# Corresponds to the JSON property `htmlTitle`
|
|
82
|
+
# @return [String]
|
|
83
|
+
attr_accessor :html_title
|
|
84
|
+
|
|
85
|
+
# The anchor text of the block object's link, if it has a link.
|
|
86
|
+
# Corresponds to the JSON property `link`
|
|
87
|
+
# @return [String]
|
|
88
|
+
attr_accessor :link
|
|
89
|
+
|
|
90
|
+
# The block object's text, if it has text.
|
|
91
|
+
# Corresponds to the JSON property `title`
|
|
92
|
+
# @return [String]
|
|
93
|
+
attr_accessor :title
|
|
94
|
+
|
|
95
|
+
# The URL of the block object's link, if it has one.
|
|
96
|
+
# Corresponds to the JSON property `url`
|
|
97
|
+
# @return [String]
|
|
98
|
+
attr_accessor :url
|
|
99
|
+
|
|
100
|
+
def initialize(**args)
|
|
101
|
+
update!(**args)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Update properties of this object
|
|
105
|
+
def update!(**args)
|
|
106
|
+
@html_title = args[:html_title] if args.key?(:html_title)
|
|
107
|
+
@link = args[:link] if args.key?(:link)
|
|
108
|
+
@title = args[:title] if args.key?(:title)
|
|
109
|
+
@url = args[:url] if args.key?(:url)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Image belonging to a promotion.
|
|
114
|
+
class Image
|
|
115
|
+
include Google::Apis::Core::Hashable
|
|
116
|
+
|
|
117
|
+
# Image height in pixels.
|
|
118
|
+
# Corresponds to the JSON property `height`
|
|
119
|
+
# @return [Fixnum]
|
|
120
|
+
attr_accessor :height
|
|
121
|
+
|
|
122
|
+
# URL of the image for this promotion link.
|
|
123
|
+
# Corresponds to the JSON property `source`
|
|
124
|
+
# @return [String]
|
|
125
|
+
attr_accessor :source
|
|
126
|
+
|
|
127
|
+
# Image width in pixels.
|
|
128
|
+
# Corresponds to the JSON property `width`
|
|
129
|
+
# @return [Fixnum]
|
|
130
|
+
attr_accessor :width
|
|
131
|
+
|
|
132
|
+
def initialize(**args)
|
|
133
|
+
update!(**args)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Update properties of this object
|
|
137
|
+
def update!(**args)
|
|
138
|
+
@height = args[:height] if args.key?(:height)
|
|
139
|
+
@source = args[:source] if args.key?(:source)
|
|
140
|
+
@width = args[:width] if args.key?(:width)
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# A custom search result.
|
|
146
|
+
class Result
|
|
147
|
+
include Google::Apis::Core::Hashable
|
|
148
|
+
|
|
149
|
+
# Indicates the ID of Google's cached version of the search result.
|
|
150
|
+
# Corresponds to the JSON property `cacheId`
|
|
151
|
+
# @return [String]
|
|
152
|
+
attr_accessor :cache_id
|
|
153
|
+
|
|
154
|
+
# An abridged version of this search result’s URL, e.g. www.example.com.
|
|
155
|
+
# Corresponds to the JSON property `displayLink`
|
|
156
|
+
# @return [String]
|
|
157
|
+
attr_accessor :display_link
|
|
158
|
+
|
|
159
|
+
# The file format of the search result.
|
|
160
|
+
# Corresponds to the JSON property `fileFormat`
|
|
161
|
+
# @return [String]
|
|
162
|
+
attr_accessor :file_format
|
|
163
|
+
|
|
164
|
+
# The URL displayed after the snippet for each search result.
|
|
165
|
+
# Corresponds to the JSON property `formattedUrl`
|
|
166
|
+
# @return [String]
|
|
167
|
+
attr_accessor :formatted_url
|
|
168
|
+
|
|
169
|
+
# The HTML-formatted URL displayed after the snippet for each search result.
|
|
170
|
+
# Corresponds to the JSON property `htmlFormattedUrl`
|
|
171
|
+
# @return [String]
|
|
172
|
+
attr_accessor :html_formatted_url
|
|
173
|
+
|
|
174
|
+
# The snippet of the search result, in HTML.
|
|
175
|
+
# Corresponds to the JSON property `htmlSnippet`
|
|
176
|
+
# @return [String]
|
|
177
|
+
attr_accessor :html_snippet
|
|
178
|
+
|
|
179
|
+
# The title of the search result, in HTML.
|
|
180
|
+
# Corresponds to the JSON property `htmlTitle`
|
|
181
|
+
# @return [String]
|
|
182
|
+
attr_accessor :html_title
|
|
183
|
+
|
|
184
|
+
# Image belonging to a custom search result.
|
|
185
|
+
# Corresponds to the JSON property `image`
|
|
186
|
+
# @return [Google::Apis::CustomsearchV1::Result::Image]
|
|
187
|
+
attr_accessor :image
|
|
188
|
+
|
|
189
|
+
# A unique identifier for the type of current object. For this API, it is
|
|
190
|
+
# `customsearch#result.`
|
|
191
|
+
# Corresponds to the JSON property `kind`
|
|
192
|
+
# @return [String]
|
|
193
|
+
attr_accessor :kind
|
|
194
|
+
|
|
195
|
+
# Encapsulates all information about [refinement
|
|
196
|
+
# labels](https://developers.google.com/custom-search/docs/xml_results).
|
|
197
|
+
# Corresponds to the JSON property `labels`
|
|
198
|
+
# @return [Array<Google::Apis::CustomsearchV1::Result::Label>]
|
|
199
|
+
attr_accessor :labels
|
|
200
|
+
|
|
201
|
+
# The full URL to which the search result is pointing, e.g.
|
|
202
|
+
# http://www.example.com/foo/bar.
|
|
203
|
+
# Corresponds to the JSON property `link`
|
|
204
|
+
# @return [String]
|
|
205
|
+
attr_accessor :link
|
|
206
|
+
|
|
207
|
+
# The MIME type of the search result.
|
|
208
|
+
# Corresponds to the JSON property `mime`
|
|
209
|
+
# @return [String]
|
|
210
|
+
attr_accessor :mime
|
|
211
|
+
|
|
212
|
+
# Contains
|
|
213
|
+
# [PageMap](https://developers.google.com/custom-search/docs/structured_data#
|
|
214
|
+
# pagemaps)
|
|
215
|
+
# information for this search result.
|
|
216
|
+
# Corresponds to the JSON property `pagemap`
|
|
217
|
+
# @return [Hash<String,Object>]
|
|
218
|
+
attr_accessor :pagemap
|
|
219
|
+
|
|
220
|
+
# The snippet of the search result, in plain text.
|
|
221
|
+
# Corresponds to the JSON property `snippet`
|
|
222
|
+
# @return [String]
|
|
223
|
+
attr_accessor :snippet
|
|
224
|
+
|
|
225
|
+
# The title of the search result, in plain text.
|
|
226
|
+
# Corresponds to the JSON property `title`
|
|
227
|
+
# @return [String]
|
|
228
|
+
attr_accessor :title
|
|
229
|
+
|
|
230
|
+
def initialize(**args)
|
|
231
|
+
update!(**args)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Update properties of this object
|
|
235
|
+
def update!(**args)
|
|
236
|
+
@cache_id = args[:cache_id] if args.key?(:cache_id)
|
|
237
|
+
@display_link = args[:display_link] if args.key?(:display_link)
|
|
238
|
+
@file_format = args[:file_format] if args.key?(:file_format)
|
|
239
|
+
@formatted_url = args[:formatted_url] if args.key?(:formatted_url)
|
|
240
|
+
@html_formatted_url = args[:html_formatted_url] if args.key?(:html_formatted_url)
|
|
241
|
+
@html_snippet = args[:html_snippet] if args.key?(:html_snippet)
|
|
242
|
+
@html_title = args[:html_title] if args.key?(:html_title)
|
|
243
|
+
@image = args[:image] if args.key?(:image)
|
|
244
|
+
@kind = args[:kind] if args.key?(:kind)
|
|
245
|
+
@labels = args[:labels] if args.key?(:labels)
|
|
246
|
+
@link = args[:link] if args.key?(:link)
|
|
247
|
+
@mime = args[:mime] if args.key?(:mime)
|
|
248
|
+
@pagemap = args[:pagemap] if args.key?(:pagemap)
|
|
249
|
+
@snippet = args[:snippet] if args.key?(:snippet)
|
|
250
|
+
@title = args[:title] if args.key?(:title)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Image belonging to a custom search result.
|
|
254
|
+
class Image
|
|
255
|
+
include Google::Apis::Core::Hashable
|
|
256
|
+
|
|
257
|
+
# The size of the image, in pixels.
|
|
258
|
+
# Corresponds to the JSON property `byteSize`
|
|
259
|
+
# @return [Fixnum]
|
|
260
|
+
attr_accessor :byte_size
|
|
261
|
+
|
|
262
|
+
# A URL pointing to the webpage hosting the image.
|
|
263
|
+
# Corresponds to the JSON property `contextLink`
|
|
264
|
+
# @return [String]
|
|
265
|
+
attr_accessor :context_link
|
|
266
|
+
|
|
267
|
+
# The height of the image, in pixels.
|
|
268
|
+
# Corresponds to the JSON property `height`
|
|
269
|
+
# @return [Fixnum]
|
|
270
|
+
attr_accessor :height
|
|
271
|
+
|
|
272
|
+
# The height of the thumbnail image, in pixels.
|
|
273
|
+
# Corresponds to the JSON property `thumbnailHeight`
|
|
274
|
+
# @return [Fixnum]
|
|
275
|
+
attr_accessor :thumbnail_height
|
|
276
|
+
|
|
277
|
+
# A URL to the thumbnail image.
|
|
278
|
+
# Corresponds to the JSON property `thumbnailLink`
|
|
279
|
+
# @return [String]
|
|
280
|
+
attr_accessor :thumbnail_link
|
|
281
|
+
|
|
282
|
+
# The width of the thumbnail image, in pixels.
|
|
283
|
+
# Corresponds to the JSON property `thumbnailWidth`
|
|
284
|
+
# @return [Fixnum]
|
|
285
|
+
attr_accessor :thumbnail_width
|
|
286
|
+
|
|
287
|
+
# The width of the image, in pixels.
|
|
288
|
+
# Corresponds to the JSON property `width`
|
|
289
|
+
# @return [Fixnum]
|
|
290
|
+
attr_accessor :width
|
|
291
|
+
|
|
292
|
+
def initialize(**args)
|
|
293
|
+
update!(**args)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Update properties of this object
|
|
297
|
+
def update!(**args)
|
|
298
|
+
@byte_size = args[:byte_size] if args.key?(:byte_size)
|
|
299
|
+
@context_link = args[:context_link] if args.key?(:context_link)
|
|
300
|
+
@height = args[:height] if args.key?(:height)
|
|
301
|
+
@thumbnail_height = args[:thumbnail_height] if args.key?(:thumbnail_height)
|
|
302
|
+
@thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
|
|
303
|
+
@thumbnail_width = args[:thumbnail_width] if args.key?(:thumbnail_width)
|
|
304
|
+
@width = args[:width] if args.key?(:width)
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Refinement label associated with a custom search result.
|
|
309
|
+
class Label
|
|
310
|
+
include Google::Apis::Core::Hashable
|
|
311
|
+
|
|
312
|
+
# The display name of a refinement label. This is the name you should
|
|
313
|
+
# display in your user interface.
|
|
314
|
+
# Corresponds to the JSON property `displayName`
|
|
315
|
+
# @return [String]
|
|
316
|
+
attr_accessor :display_name
|
|
317
|
+
|
|
318
|
+
# Refinement label and the associated refinement operation.
|
|
319
|
+
# Corresponds to the JSON property `label_with_op`
|
|
320
|
+
# @return [String]
|
|
321
|
+
attr_accessor :label_with_op
|
|
322
|
+
|
|
323
|
+
# The name of a refinement label, which you can use to refine searches.
|
|
324
|
+
# Don't display this in your user interface; instead, use displayName.
|
|
325
|
+
# Corresponds to the JSON property `name`
|
|
326
|
+
# @return [String]
|
|
327
|
+
attr_accessor :name
|
|
328
|
+
|
|
329
|
+
def initialize(**args)
|
|
330
|
+
update!(**args)
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Update properties of this object
|
|
334
|
+
def update!(**args)
|
|
335
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
|
336
|
+
@label_with_op = args[:label_with_op] if args.key?(:label_with_op)
|
|
337
|
+
@name = args[:name] if args.key?(:name)
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Response to a custom search request.
|
|
343
|
+
class Search
|
|
344
|
+
include Google::Apis::Core::Hashable
|
|
345
|
+
|
|
346
|
+
# Metadata and refinements associated with the given search engine,
|
|
347
|
+
# including:
|
|
348
|
+
# * The name of the search engine that was used for the query.
|
|
349
|
+
# * A set of [facet
|
|
350
|
+
# objects](https://developers.google.com/custom-search/docs/refinements#create)
|
|
351
|
+
# (refinements) you can use for refining a search.
|
|
352
|
+
# Corresponds to the JSON property `context`
|
|
353
|
+
# @return [Hash<String,Object>]
|
|
354
|
+
attr_accessor :context
|
|
355
|
+
|
|
356
|
+
# The current set of custom search results.
|
|
357
|
+
# Corresponds to the JSON property `items`
|
|
358
|
+
# @return [Array<Google::Apis::CustomsearchV1::Result>]
|
|
359
|
+
attr_accessor :items
|
|
360
|
+
|
|
361
|
+
# Unique identifier for the type of current object. For this API, it is
|
|
362
|
+
# customsearch#search.
|
|
363
|
+
# Corresponds to the JSON property `kind`
|
|
364
|
+
# @return [String]
|
|
365
|
+
attr_accessor :kind
|
|
366
|
+
|
|
367
|
+
# The set of
|
|
368
|
+
# [promotions](https://developers.google.com/custom-search/docs/promotions).
|
|
369
|
+
# Present only if the custom search engine's configuration files define any
|
|
370
|
+
# promotions for the given query.
|
|
371
|
+
# Corresponds to the JSON property `promotions`
|
|
372
|
+
# @return [Array<Google::Apis::CustomsearchV1::Promotion>]
|
|
373
|
+
attr_accessor :promotions
|
|
374
|
+
|
|
375
|
+
# Query metadata for the previous, current, and next pages of results.
|
|
376
|
+
# Corresponds to the JSON property `queries`
|
|
377
|
+
# @return [Google::Apis::CustomsearchV1::Search::Queries]
|
|
378
|
+
attr_accessor :queries
|
|
379
|
+
|
|
380
|
+
# Metadata about a search operation.
|
|
381
|
+
# Corresponds to the JSON property `searchInformation`
|
|
382
|
+
# @return [Google::Apis::CustomsearchV1::Search::SearchInformation]
|
|
383
|
+
attr_accessor :search_information
|
|
384
|
+
|
|
385
|
+
# Spell correction information for a query.
|
|
386
|
+
# Corresponds to the JSON property `spelling`
|
|
387
|
+
# @return [Google::Apis::CustomsearchV1::Search::Spelling]
|
|
388
|
+
attr_accessor :spelling
|
|
389
|
+
|
|
390
|
+
# OpenSearch template and URL.
|
|
391
|
+
# Corresponds to the JSON property `url`
|
|
392
|
+
# @return [Google::Apis::CustomsearchV1::Search::Url]
|
|
393
|
+
attr_accessor :url
|
|
394
|
+
|
|
395
|
+
def initialize(**args)
|
|
396
|
+
update!(**args)
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Update properties of this object
|
|
400
|
+
def update!(**args)
|
|
401
|
+
@context = args[:context] if args.key?(:context)
|
|
402
|
+
@items = args[:items] if args.key?(:items)
|
|
403
|
+
@kind = args[:kind] if args.key?(:kind)
|
|
404
|
+
@promotions = args[:promotions] if args.key?(:promotions)
|
|
405
|
+
@queries = args[:queries] if args.key?(:queries)
|
|
406
|
+
@search_information = args[:search_information] if args.key?(:search_information)
|
|
407
|
+
@spelling = args[:spelling] if args.key?(:spelling)
|
|
408
|
+
@url = args[:url] if args.key?(:url)
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Query metadata for the previous, current, and next pages of results.
|
|
412
|
+
class Queries
|
|
413
|
+
include Google::Apis::Core::Hashable
|
|
414
|
+
|
|
415
|
+
# Metadata representing the next page of results, if applicable.
|
|
416
|
+
# Corresponds to the JSON property `nextPage`
|
|
417
|
+
# @return [Array<Google::Apis::CustomsearchV1::Search::Queries::NextPage>]
|
|
418
|
+
attr_accessor :next_page
|
|
419
|
+
|
|
420
|
+
# Metadata representing the previous page of results, if applicable.
|
|
421
|
+
# Corresponds to the JSON property `previousPage`
|
|
422
|
+
# @return [Array<Google::Apis::CustomsearchV1::Search::Queries::PreviousPage>]
|
|
423
|
+
attr_accessor :previous_page
|
|
424
|
+
|
|
425
|
+
# Metadata representing the current request.
|
|
426
|
+
# Corresponds to the JSON property `request`
|
|
427
|
+
# @return [Array<Google::Apis::CustomsearchV1::Search::Queries::Request>]
|
|
428
|
+
attr_accessor :request
|
|
429
|
+
|
|
430
|
+
def initialize(**args)
|
|
431
|
+
update!(**args)
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Update properties of this object
|
|
435
|
+
def update!(**args)
|
|
436
|
+
@next_page = args[:next_page] if args.key?(:next_page)
|
|
437
|
+
@previous_page = args[:previous_page] if args.key?(:previous_page)
|
|
438
|
+
@request = args[:request] if args.key?(:request)
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# Custom search request metadata.
|
|
442
|
+
class NextPage
|
|
443
|
+
include Google::Apis::Core::Hashable
|
|
444
|
+
|
|
445
|
+
# Number of search results returned in this set.
|
|
446
|
+
# Corresponds to the JSON property `count`
|
|
447
|
+
# @return [Fixnum]
|
|
448
|
+
attr_accessor :count
|
|
449
|
+
|
|
450
|
+
# Restricts search results to documents originating in a particular
|
|
451
|
+
# country. You may use [Boolean
|
|
452
|
+
# operators](https://developers.google.com/custom-search/docs/xml_results#
|
|
453
|
+
# booleanOperators)
|
|
454
|
+
# in the `cr` parameter's value.
|
|
455
|
+
# Google WebSearch determines the country of a document by analyzing the
|
|
456
|
+
# following:
|
|
457
|
+
# * The top-level domain (TLD) of the document's URL.
|
|
458
|
+
# * The geographic location of the web server's IP address.
|
|
459
|
+
# See [Country (cr) Parameter
|
|
460
|
+
# Values](https://developers.google.com/custom-search/docs/xml_results#
|
|
461
|
+
# countryCollections)
|
|
462
|
+
# for a list of valid values for this parameter.
|
|
463
|
+
# Corresponds to the JSON property `cr`
|
|
464
|
+
# @return [String]
|
|
465
|
+
attr_accessor :cr
|
|
466
|
+
|
|
467
|
+
# The identifier of a custom search engine created using the Custom Search
|
|
468
|
+
# [Control Panel](https://cse.google.com/). This is a custom property not
|
|
469
|
+
# defined in the OpenSearch spec. This parameter is **required**.
|
|
470
|
+
# Corresponds to the JSON property `cx`
|
|
471
|
+
# @return [String]
|
|
472
|
+
attr_accessor :cx
|
|
473
|
+
|
|
474
|
+
# Restricts results to URLs based on date. Supported values include:
|
|
475
|
+
# * `d[number]`: requests results from the specified number of past days.
|
|
476
|
+
# * `w[number]`: requests results from the specified number of past weeks.
|
|
477
|
+
# * `m[number]`: requests results from the specified number of past months.
|
|
478
|
+
# * `y[number]`: requests results from the specified number of past years.
|
|
479
|
+
# Corresponds to the JSON property `dateRestrict`
|
|
480
|
+
# @return [String]
|
|
481
|
+
attr_accessor :date_restrict
|
|
482
|
+
|
|
483
|
+
# Enables or disables the [Simplified and Traditional Chinese
|
|
484
|
+
# Search](https://developers.google.com/custom-search/docs/xml_results#
|
|
485
|
+
# chineseSearch)
|
|
486
|
+
# feature.
|
|
487
|
+
# Supported values are:
|
|
488
|
+
# * `0`: enabled (default)
|
|
489
|
+
# * `1`: disabled
|
|
490
|
+
# Corresponds to the JSON property `disableCnTwTranslation`
|
|
491
|
+
# @return [String]
|
|
492
|
+
attr_accessor :disable_cn_tw_translation
|
|
493
|
+
|
|
494
|
+
# Identifies a phrase that all documents in the search results must
|
|
495
|
+
# contain.
|
|
496
|
+
# Corresponds to the JSON property `exactTerms`
|
|
497
|
+
# @return [String]
|
|
498
|
+
attr_accessor :exact_terms
|
|
499
|
+
|
|
500
|
+
# Identifies a word or phrase that should not appear in any documents in
|
|
501
|
+
# the search results.
|
|
502
|
+
# Corresponds to the JSON property `excludeTerms`
|
|
503
|
+
# @return [String]
|
|
504
|
+
attr_accessor :exclude_terms
|
|
505
|
+
|
|
506
|
+
# Restricts results to files of a specified extension. Filetypes supported
|
|
507
|
+
# by Google include:
|
|
508
|
+
# * Adobe Portable Document Format (`pdf`)
|
|
509
|
+
# * Adobe PostScript (`ps`)
|
|
510
|
+
# * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`)
|
|
511
|
+
# * Lotus WordPro (`lwp`)
|
|
512
|
+
# * Macwrite (`mw`)
|
|
513
|
+
# * Microsoft Excel (`xls`)
|
|
514
|
+
# * Microsoft PowerPoint (`ppt`)
|
|
515
|
+
# * Microsoft Word (`doc`)
|
|
516
|
+
# * Microsoft Works (`wks`, `wps`, `wdb`)
|
|
517
|
+
# * Microsoft Write (`wri`)
|
|
518
|
+
# * Rich Text Format (`rtf`)
|
|
519
|
+
# * Shockwave Flash (`swf`)
|
|
520
|
+
# * Text (`ans`, `txt`).
|
|
521
|
+
# Additional filetypes may be added in the future. An up-to-date list can
|
|
522
|
+
# always be found in Google's [file type
|
|
523
|
+
# FAQ](https://support.google.com/webmasters/answer/35287).
|
|
524
|
+
# Corresponds to the JSON property `fileType`
|
|
525
|
+
# @return [String]
|
|
526
|
+
attr_accessor :file_type
|
|
527
|
+
|
|
528
|
+
# Activates or deactivates the automatic filtering of Google search
|
|
529
|
+
# results. See [Automatic
|
|
530
|
+
# Filtering](https://developers.google.com/custom-search/docs/xml_results#
|
|
531
|
+
# automaticFiltering)
|
|
532
|
+
# for more information about Google's search results filters. Valid values
|
|
533
|
+
# for this parameter are:
|
|
534
|
+
# * `0`: Disabled
|
|
535
|
+
# * `1`: Enabled (default)
|
|
536
|
+
# **Note**: By default, Google applies filtering to all search results to
|
|
537
|
+
# improve the quality of those results.
|
|
538
|
+
# Corresponds to the JSON property `filter`
|
|
539
|
+
# @return [String]
|
|
540
|
+
attr_accessor :filter
|
|
541
|
+
|
|
542
|
+
# Boosts search results whose country of origin matches the parameter
|
|
543
|
+
# value. See [Country
|
|
544
|
+
# Codes](https://developers.google.com/custom-search/docs/xml_results#
|
|
545
|
+
# countryCodes)
|
|
546
|
+
# for a list of valid values.
|
|
547
|
+
# Specifying a `gl` parameter value in WebSearch requests should improve
|
|
548
|
+
# the relevance of results. This is particularly true for international
|
|
549
|
+
# customers and, even more specifically, for customers in English-speaking
|
|
550
|
+
# countries other than the United States.
|
|
551
|
+
# Corresponds to the JSON property `gl`
|
|
552
|
+
# @return [String]
|
|
553
|
+
attr_accessor :gl
|
|
554
|
+
|
|
555
|
+
# Specifies the Google domain (for example, google.com, google.de, or
|
|
556
|
+
# google.fr) to which the search should be limited.
|
|
557
|
+
# Corresponds to the JSON property `googleHost`
|
|
558
|
+
# @return [String]
|
|
559
|
+
attr_accessor :google_host
|
|
560
|
+
|
|
561
|
+
# Specifies the ending value for a search range. Use `cse:lowRange` and
|
|
562
|
+
# `cse:highrange` to append an inclusive search range of
|
|
563
|
+
# `lowRange...highRange` to the query.
|
|
564
|
+
# Corresponds to the JSON property `highRange`
|
|
565
|
+
# @return [String]
|
|
566
|
+
attr_accessor :high_range
|
|
567
|
+
|
|
568
|
+
# Specifies the interface language (host language) of your user interface.
|
|
569
|
+
# Explicitly setting this parameter improves the performance and the
|
|
570
|
+
# quality of your search results.
|
|
571
|
+
# See the [Interface
|
|
572
|
+
# Languages](https://developers.google.com/custom-search/docs/xml_results#
|
|
573
|
+
# wsInterfaceLanguages)
|
|
574
|
+
# section of [Internationalizing Queries and Results
|
|
575
|
+
# Presentation](https://developers.google.com/custom-search/docs/xml_results#
|
|
576
|
+
# wsInternationalizing)
|
|
577
|
+
# for more information, and [Supported Interface
|
|
578
|
+
# Languages](https://developers.google.com/custom-search/docs/
|
|
579
|
+
# xml_results_appendices#interfaceLanguages)
|
|
580
|
+
# for a list of supported languages.
|
|
581
|
+
# Corresponds to the JSON property `hl`
|
|
582
|
+
# @return [String]
|
|
583
|
+
attr_accessor :hl
|
|
584
|
+
|
|
585
|
+
# Appends the specified query terms to the query, as if they were combined
|
|
586
|
+
# with a logical `AND` operator.
|
|
587
|
+
# Corresponds to the JSON property `hq`
|
|
588
|
+
# @return [String]
|
|
589
|
+
attr_accessor :hq
|
|
590
|
+
|
|
591
|
+
# Restricts results to images of a specified color type. Supported values
|
|
592
|
+
# are:
|
|
593
|
+
# * `mono` (black and white)
|
|
594
|
+
# * `gray` (grayscale)
|
|
595
|
+
# * `color` (color)
|
|
596
|
+
# Corresponds to the JSON property `imgColorType`
|
|
597
|
+
# @return [String]
|
|
598
|
+
attr_accessor :img_color_type
|
|
599
|
+
|
|
600
|
+
# Restricts results to images with a specific dominant color. Supported
|
|
601
|
+
# values are:
|
|
602
|
+
# * `red`
|
|
603
|
+
# * `orange`
|
|
604
|
+
# * `yellow`
|
|
605
|
+
# * `green`
|
|
606
|
+
# * `teal`
|
|
607
|
+
# * `blue`
|
|
608
|
+
# * `purple`
|
|
609
|
+
# * `pink`
|
|
610
|
+
# * `white`
|
|
611
|
+
# * `gray`
|
|
612
|
+
# * `black`
|
|
613
|
+
# * `brown`
|
|
614
|
+
# Corresponds to the JSON property `imgDominantColor`
|
|
615
|
+
# @return [String]
|
|
616
|
+
attr_accessor :img_dominant_color
|
|
617
|
+
|
|
618
|
+
# Restricts results to images of a specified size. Supported values are:
|
|
619
|
+
# * `icon` (small)
|
|
620
|
+
# * `small | medium | large | xlarge` (medium)
|
|
621
|
+
# * `xxlarge` (large)
|
|
622
|
+
# * `huge` (extra-large)
|
|
623
|
+
# Corresponds to the JSON property `imgSize`
|
|
624
|
+
# @return [String]
|
|
625
|
+
attr_accessor :img_size
|
|
626
|
+
|
|
627
|
+
# Restricts results to images of a specified type. Supported values are:
|
|
628
|
+
# * `clipart` (Clip art)
|
|
629
|
+
# * `face` (Face)
|
|
630
|
+
# * `lineart` (Line drawing)
|
|
631
|
+
# * `photo` (Photo)
|
|
632
|
+
# * `animated` (Animated)
|
|
633
|
+
# * `stock` (Stock)
|
|
634
|
+
# Corresponds to the JSON property `imgType`
|
|
635
|
+
# @return [String]
|
|
636
|
+
attr_accessor :img_type
|
|
637
|
+
|
|
638
|
+
# The character encoding supported for search requests.
|
|
639
|
+
# Corresponds to the JSON property `inputEncoding`
|
|
640
|
+
# @return [String]
|
|
641
|
+
attr_accessor :input_encoding
|
|
642
|
+
|
|
643
|
+
# The language of the search results.
|
|
644
|
+
# Corresponds to the JSON property `language`
|
|
645
|
+
# @return [String]
|
|
646
|
+
attr_accessor :language
|
|
647
|
+
|
|
648
|
+
# Specifies that all results should contain a link to a specific URL.
|
|
649
|
+
# Corresponds to the JSON property `linkSite`
|
|
650
|
+
# @return [String]
|
|
651
|
+
attr_accessor :link_site
|
|
652
|
+
|
|
653
|
+
# Specifies the starting value for a search range. Use `cse:lowRange` and
|
|
654
|
+
# `cse:highrange` to append an inclusive search range of
|
|
655
|
+
# `lowRange...highRange` to the query.
|
|
656
|
+
# Corresponds to the JSON property `lowRange`
|
|
657
|
+
# @return [String]
|
|
658
|
+
attr_accessor :low_range
|
|
659
|
+
|
|
660
|
+
# Provides additional search terms to check for in a document, where each
|
|
661
|
+
# document in the search results must contain at least one of the
|
|
662
|
+
# additional search terms. You can also use the [Boolean
|
|
663
|
+
# OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt)
|
|
664
|
+
# query term for this type of query.
|
|
665
|
+
# Corresponds to the JSON property `orTerms`
|
|
666
|
+
# @return [String]
|
|
667
|
+
attr_accessor :or_terms
|
|
668
|
+
|
|
669
|
+
# The character encoding supported for search results.
|
|
670
|
+
# Corresponds to the JSON property `outputEncoding`
|
|
671
|
+
# @return [String]
|
|
672
|
+
attr_accessor :output_encoding
|
|
673
|
+
|
|
674
|
+
# Specifies that all search results should be pages that are related to the
|
|
675
|
+
# specified URL. The parameter value should be a URL.
|
|
676
|
+
# Corresponds to the JSON property `relatedSite`
|
|
677
|
+
# @return [String]
|
|
678
|
+
attr_accessor :related_site
|
|
679
|
+
|
|
680
|
+
# Filters based on licensing. Supported values include:
|
|
681
|
+
# * `cc_publicdomain`
|
|
682
|
+
# * `cc_attribute`
|
|
683
|
+
# * `cc_sharealike`
|
|
684
|
+
# * `cc_noncommercial`
|
|
685
|
+
# * `cc_nonderived`
|
|
686
|
+
# Corresponds to the JSON property `rights`
|
|
687
|
+
# @return [String]
|
|
688
|
+
attr_accessor :rights
|
|
689
|
+
|
|
690
|
+
# Specifies the [SafeSearch
|
|
691
|
+
# level](https://developers.google.com/custom-search/docs/xml_results#
|
|
692
|
+
# safeSearchLevels)
|
|
693
|
+
# used for filtering out adult results. This is a custom property not
|
|
694
|
+
# defined in the OpenSearch spec. Valid parameter values are:
|
|
695
|
+
# * `"off"`: Disable SafeSearch
|
|
696
|
+
# * `"active"`: Enable SafeSearch
|
|
697
|
+
# Corresponds to the JSON property `safe`
|
|
698
|
+
# @return [String]
|
|
699
|
+
attr_accessor :safe
|
|
700
|
+
|
|
701
|
+
# The search terms entered by the user.
|
|
702
|
+
# Corresponds to the JSON property `searchTerms`
|
|
703
|
+
# @return [String]
|
|
704
|
+
attr_accessor :search_terms
|
|
705
|
+
|
|
706
|
+
# Allowed values are `web` or `image`. If unspecified, results are limited
|
|
707
|
+
# to webpages.
|
|
708
|
+
# Corresponds to the JSON property `searchType`
|
|
709
|
+
# @return [String]
|
|
710
|
+
attr_accessor :search_type
|
|
711
|
+
|
|
712
|
+
# Restricts results to URLs from a specified site.
|
|
713
|
+
# Corresponds to the JSON property `siteSearch`
|
|
714
|
+
# @return [String]
|
|
715
|
+
attr_accessor :site_search
|
|
716
|
+
|
|
717
|
+
# Specifies whether to include or exclude results from the site named in
|
|
718
|
+
# the `sitesearch` parameter. Supported values are:
|
|
719
|
+
# * `i`: include content from site
|
|
720
|
+
# * `e`: exclude content from site
|
|
721
|
+
# Corresponds to the JSON property `siteSearchFilter`
|
|
722
|
+
# @return [String]
|
|
723
|
+
attr_accessor :site_search_filter
|
|
724
|
+
|
|
725
|
+
# Specifies that results should be sorted according to the specified
|
|
726
|
+
# expression. For example, sort by date.
|
|
727
|
+
# Corresponds to the JSON property `sort`
|
|
728
|
+
# @return [String]
|
|
729
|
+
attr_accessor :sort
|
|
730
|
+
|
|
731
|
+
# The index of the current set of search results into the total set of
|
|
732
|
+
# results, where the index of the first result is 1.
|
|
733
|
+
# Corresponds to the JSON property `startIndex`
|
|
734
|
+
# @return [Fixnum]
|
|
735
|
+
attr_accessor :start_index
|
|
736
|
+
|
|
737
|
+
# The page number of this set of results, where the page length is set by
|
|
738
|
+
# the `count` property.
|
|
739
|
+
# Corresponds to the JSON property `startPage`
|
|
740
|
+
# @return [Fixnum]
|
|
741
|
+
attr_accessor :start_page
|
|
742
|
+
|
|
743
|
+
# A description of the query.
|
|
744
|
+
# Corresponds to the JSON property `title`
|
|
745
|
+
# @return [String]
|
|
746
|
+
attr_accessor :title
|
|
747
|
+
|
|
748
|
+
# Estimated number of total search results. May not be accurate.
|
|
749
|
+
# Corresponds to the JSON property `totalResults`
|
|
750
|
+
# @return [Fixnum]
|
|
751
|
+
attr_accessor :total_results
|
|
752
|
+
|
|
753
|
+
def initialize(**args)
|
|
754
|
+
update!(**args)
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# Update properties of this object
|
|
758
|
+
def update!(**args)
|
|
759
|
+
@count = args[:count] if args.key?(:count)
|
|
760
|
+
@cr = args[:cr] if args.key?(:cr)
|
|
761
|
+
@cx = args[:cx] if args.key?(:cx)
|
|
762
|
+
@date_restrict = args[:date_restrict] if args.key?(:date_restrict)
|
|
763
|
+
@disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation)
|
|
764
|
+
@exact_terms = args[:exact_terms] if args.key?(:exact_terms)
|
|
765
|
+
@exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms)
|
|
766
|
+
@file_type = args[:file_type] if args.key?(:file_type)
|
|
767
|
+
@filter = args[:filter] if args.key?(:filter)
|
|
768
|
+
@gl = args[:gl] if args.key?(:gl)
|
|
769
|
+
@google_host = args[:google_host] if args.key?(:google_host)
|
|
770
|
+
@high_range = args[:high_range] if args.key?(:high_range)
|
|
771
|
+
@hl = args[:hl] if args.key?(:hl)
|
|
772
|
+
@hq = args[:hq] if args.key?(:hq)
|
|
773
|
+
@img_color_type = args[:img_color_type] if args.key?(:img_color_type)
|
|
774
|
+
@img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color)
|
|
775
|
+
@img_size = args[:img_size] if args.key?(:img_size)
|
|
776
|
+
@img_type = args[:img_type] if args.key?(:img_type)
|
|
777
|
+
@input_encoding = args[:input_encoding] if args.key?(:input_encoding)
|
|
778
|
+
@language = args[:language] if args.key?(:language)
|
|
779
|
+
@link_site = args[:link_site] if args.key?(:link_site)
|
|
780
|
+
@low_range = args[:low_range] if args.key?(:low_range)
|
|
781
|
+
@or_terms = args[:or_terms] if args.key?(:or_terms)
|
|
782
|
+
@output_encoding = args[:output_encoding] if args.key?(:output_encoding)
|
|
783
|
+
@related_site = args[:related_site] if args.key?(:related_site)
|
|
784
|
+
@rights = args[:rights] if args.key?(:rights)
|
|
785
|
+
@safe = args[:safe] if args.key?(:safe)
|
|
786
|
+
@search_terms = args[:search_terms] if args.key?(:search_terms)
|
|
787
|
+
@search_type = args[:search_type] if args.key?(:search_type)
|
|
788
|
+
@site_search = args[:site_search] if args.key?(:site_search)
|
|
789
|
+
@site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter)
|
|
790
|
+
@sort = args[:sort] if args.key?(:sort)
|
|
791
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
|
792
|
+
@start_page = args[:start_page] if args.key?(:start_page)
|
|
793
|
+
@title = args[:title] if args.key?(:title)
|
|
794
|
+
@total_results = args[:total_results] if args.key?(:total_results)
|
|
795
|
+
end
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
# Custom search request metadata.
|
|
799
|
+
class PreviousPage
|
|
800
|
+
include Google::Apis::Core::Hashable
|
|
801
|
+
|
|
802
|
+
# Number of search results returned in this set.
|
|
803
|
+
# Corresponds to the JSON property `count`
|
|
804
|
+
# @return [Fixnum]
|
|
805
|
+
attr_accessor :count
|
|
806
|
+
|
|
807
|
+
# Restricts search results to documents originating in a particular
|
|
808
|
+
# country. You may use [Boolean
|
|
809
|
+
# operators](https://developers.google.com/custom-search/docs/xml_results#
|
|
810
|
+
# booleanOperators)
|
|
811
|
+
# in the `cr` parameter's value.
|
|
812
|
+
# Google WebSearch determines the country of a document by analyzing the
|
|
813
|
+
# following:
|
|
814
|
+
# * The top-level domain (TLD) of the document's URL.
|
|
815
|
+
# * The geographic location of the web server's IP address.
|
|
816
|
+
# See [Country (cr) Parameter
|
|
817
|
+
# Values](https://developers.google.com/custom-search/docs/xml_results#
|
|
818
|
+
# countryCollections)
|
|
819
|
+
# for a list of valid values for this parameter.
|
|
820
|
+
# Corresponds to the JSON property `cr`
|
|
821
|
+
# @return [String]
|
|
822
|
+
attr_accessor :cr
|
|
823
|
+
|
|
824
|
+
# The identifier of a custom search engine created using the Custom Search
|
|
825
|
+
# [Control Panel](https://cse.google.com/). This is a custom property not
|
|
826
|
+
# defined in the OpenSearch spec. This parameter is **required**.
|
|
827
|
+
# Corresponds to the JSON property `cx`
|
|
828
|
+
# @return [String]
|
|
829
|
+
attr_accessor :cx
|
|
830
|
+
|
|
831
|
+
# Restricts results to URLs based on date. Supported values include:
|
|
832
|
+
# * `d[number]`: requests results from the specified number of past days.
|
|
833
|
+
# * `w[number]`: requests results from the specified number of past weeks.
|
|
834
|
+
# * `m[number]`: requests results from the specified number of past months.
|
|
835
|
+
# * `y[number]`: requests results from the specified number of past years.
|
|
836
|
+
# Corresponds to the JSON property `dateRestrict`
|
|
837
|
+
# @return [String]
|
|
838
|
+
attr_accessor :date_restrict
|
|
839
|
+
|
|
840
|
+
# Enables or disables the [Simplified and Traditional Chinese
|
|
841
|
+
# Search](https://developers.google.com/custom-search/docs/xml_results#
|
|
842
|
+
# chineseSearch)
|
|
843
|
+
# feature.
|
|
844
|
+
# Supported values are:
|
|
845
|
+
# * `0`: enabled (default)
|
|
846
|
+
# * `1`: disabled
|
|
847
|
+
# Corresponds to the JSON property `disableCnTwTranslation`
|
|
848
|
+
# @return [String]
|
|
849
|
+
attr_accessor :disable_cn_tw_translation
|
|
850
|
+
|
|
851
|
+
# Identifies a phrase that all documents in the search results must
|
|
852
|
+
# contain.
|
|
853
|
+
# Corresponds to the JSON property `exactTerms`
|
|
854
|
+
# @return [String]
|
|
855
|
+
attr_accessor :exact_terms
|
|
856
|
+
|
|
857
|
+
# Identifies a word or phrase that should not appear in any documents in
|
|
858
|
+
# the search results.
|
|
859
|
+
# Corresponds to the JSON property `excludeTerms`
|
|
860
|
+
# @return [String]
|
|
861
|
+
attr_accessor :exclude_terms
|
|
862
|
+
|
|
863
|
+
# Restricts results to files of a specified extension. Filetypes supported
|
|
864
|
+
# by Google include:
|
|
865
|
+
# * Adobe Portable Document Format (`pdf`)
|
|
866
|
+
# * Adobe PostScript (`ps`)
|
|
867
|
+
# * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`)
|
|
868
|
+
# * Lotus WordPro (`lwp`)
|
|
869
|
+
# * Macwrite (`mw`)
|
|
870
|
+
# * Microsoft Excel (`xls`)
|
|
871
|
+
# * Microsoft PowerPoint (`ppt`)
|
|
872
|
+
# * Microsoft Word (`doc`)
|
|
873
|
+
# * Microsoft Works (`wks`, `wps`, `wdb`)
|
|
874
|
+
# * Microsoft Write (`wri`)
|
|
875
|
+
# * Rich Text Format (`rtf`)
|
|
876
|
+
# * Shockwave Flash (`swf`)
|
|
877
|
+
# * Text (`ans`, `txt`).
|
|
878
|
+
# Additional filetypes may be added in the future. An up-to-date list can
|
|
879
|
+
# always be found in Google's [file type
|
|
880
|
+
# FAQ](https://support.google.com/webmasters/answer/35287).
|
|
881
|
+
# Corresponds to the JSON property `fileType`
|
|
882
|
+
# @return [String]
|
|
883
|
+
attr_accessor :file_type
|
|
884
|
+
|
|
885
|
+
# Activates or deactivates the automatic filtering of Google search
|
|
886
|
+
# results. See [Automatic
|
|
887
|
+
# Filtering](https://developers.google.com/custom-search/docs/xml_results#
|
|
888
|
+
# automaticFiltering)
|
|
889
|
+
# for more information about Google's search results filters. Valid values
|
|
890
|
+
# for this parameter are:
|
|
891
|
+
# * `0`: Disabled
|
|
892
|
+
# * `1`: Enabled (default)
|
|
893
|
+
# **Note**: By default, Google applies filtering to all search results to
|
|
894
|
+
# improve the quality of those results.
|
|
895
|
+
# Corresponds to the JSON property `filter`
|
|
896
|
+
# @return [String]
|
|
897
|
+
attr_accessor :filter
|
|
898
|
+
|
|
899
|
+
# Boosts search results whose country of origin matches the parameter
|
|
900
|
+
# value. See [Country
|
|
901
|
+
# Codes](https://developers.google.com/custom-search/docs/xml_results#
|
|
902
|
+
# countryCodes)
|
|
903
|
+
# for a list of valid values.
|
|
904
|
+
# Specifying a `gl` parameter value in WebSearch requests should improve
|
|
905
|
+
# the relevance of results. This is particularly true for international
|
|
906
|
+
# customers and, even more specifically, for customers in English-speaking
|
|
907
|
+
# countries other than the United States.
|
|
908
|
+
# Corresponds to the JSON property `gl`
|
|
909
|
+
# @return [String]
|
|
910
|
+
attr_accessor :gl
|
|
911
|
+
|
|
912
|
+
# Specifies the Google domain (for example, google.com, google.de, or
|
|
913
|
+
# google.fr) to which the search should be limited.
|
|
914
|
+
# Corresponds to the JSON property `googleHost`
|
|
915
|
+
# @return [String]
|
|
916
|
+
attr_accessor :google_host
|
|
917
|
+
|
|
918
|
+
# Specifies the ending value for a search range. Use `cse:lowRange` and
|
|
919
|
+
# `cse:highrange` to append an inclusive search range of
|
|
920
|
+
# `lowRange...highRange` to the query.
|
|
921
|
+
# Corresponds to the JSON property `highRange`
|
|
922
|
+
# @return [String]
|
|
923
|
+
attr_accessor :high_range
|
|
924
|
+
|
|
925
|
+
# Specifies the interface language (host language) of your user interface.
|
|
926
|
+
# Explicitly setting this parameter improves the performance and the
|
|
927
|
+
# quality of your search results.
|
|
928
|
+
# See the [Interface
|
|
929
|
+
# Languages](https://developers.google.com/custom-search/docs/xml_results#
|
|
930
|
+
# wsInterfaceLanguages)
|
|
931
|
+
# section of [Internationalizing Queries and Results
|
|
932
|
+
# Presentation](https://developers.google.com/custom-search/docs/xml_results#
|
|
933
|
+
# wsInternationalizing)
|
|
934
|
+
# for more information, and [Supported Interface
|
|
935
|
+
# Languages](https://developers.google.com/custom-search/docs/
|
|
936
|
+
# xml_results_appendices#interfaceLanguages)
|
|
937
|
+
# for a list of supported languages.
|
|
938
|
+
# Corresponds to the JSON property `hl`
|
|
939
|
+
# @return [String]
|
|
940
|
+
attr_accessor :hl
|
|
941
|
+
|
|
942
|
+
# Appends the specified query terms to the query, as if they were combined
|
|
943
|
+
# with a logical `AND` operator.
|
|
944
|
+
# Corresponds to the JSON property `hq`
|
|
945
|
+
# @return [String]
|
|
946
|
+
attr_accessor :hq
|
|
947
|
+
|
|
948
|
+
# Restricts results to images of a specified color type. Supported values
|
|
949
|
+
# are:
|
|
950
|
+
# * `mono` (black and white)
|
|
951
|
+
# * `gray` (grayscale)
|
|
952
|
+
# * `color` (color)
|
|
953
|
+
# Corresponds to the JSON property `imgColorType`
|
|
954
|
+
# @return [String]
|
|
955
|
+
attr_accessor :img_color_type
|
|
956
|
+
|
|
957
|
+
# Restricts results to images with a specific dominant color. Supported
|
|
958
|
+
# values are:
|
|
959
|
+
# * `red`
|
|
960
|
+
# * `orange`
|
|
961
|
+
# * `yellow`
|
|
962
|
+
# * `green`
|
|
963
|
+
# * `teal`
|
|
964
|
+
# * `blue`
|
|
965
|
+
# * `purple`
|
|
966
|
+
# * `pink`
|
|
967
|
+
# * `white`
|
|
968
|
+
# * `gray`
|
|
969
|
+
# * `black`
|
|
970
|
+
# * `brown`
|
|
971
|
+
# Corresponds to the JSON property `imgDominantColor`
|
|
972
|
+
# @return [String]
|
|
973
|
+
attr_accessor :img_dominant_color
|
|
974
|
+
|
|
975
|
+
# Restricts results to images of a specified size. Supported values are:
|
|
976
|
+
# * `icon` (small)
|
|
977
|
+
# * `small | medium | large | xlarge` (medium)
|
|
978
|
+
# * `xxlarge` (large)
|
|
979
|
+
# * `huge` (extra-large)
|
|
980
|
+
# Corresponds to the JSON property `imgSize`
|
|
981
|
+
# @return [String]
|
|
982
|
+
attr_accessor :img_size
|
|
983
|
+
|
|
984
|
+
# Restricts results to images of a specified type. Supported values are:
|
|
985
|
+
# * `clipart` (Clip art)
|
|
986
|
+
# * `face` (Face)
|
|
987
|
+
# * `lineart` (Line drawing)
|
|
988
|
+
# * `photo` (Photo)
|
|
989
|
+
# * `animated` (Animated)
|
|
990
|
+
# * `stock` (Stock)
|
|
991
|
+
# Corresponds to the JSON property `imgType`
|
|
992
|
+
# @return [String]
|
|
993
|
+
attr_accessor :img_type
|
|
994
|
+
|
|
995
|
+
# The character encoding supported for search requests.
|
|
996
|
+
# Corresponds to the JSON property `inputEncoding`
|
|
997
|
+
# @return [String]
|
|
998
|
+
attr_accessor :input_encoding
|
|
999
|
+
|
|
1000
|
+
# The language of the search results.
|
|
1001
|
+
# Corresponds to the JSON property `language`
|
|
1002
|
+
# @return [String]
|
|
1003
|
+
attr_accessor :language
|
|
1004
|
+
|
|
1005
|
+
# Specifies that all results should contain a link to a specific URL.
|
|
1006
|
+
# Corresponds to the JSON property `linkSite`
|
|
1007
|
+
# @return [String]
|
|
1008
|
+
attr_accessor :link_site
|
|
1009
|
+
|
|
1010
|
+
# Specifies the starting value for a search range. Use `cse:lowRange` and
|
|
1011
|
+
# `cse:highrange` to append an inclusive search range of
|
|
1012
|
+
# `lowRange...highRange` to the query.
|
|
1013
|
+
# Corresponds to the JSON property `lowRange`
|
|
1014
|
+
# @return [String]
|
|
1015
|
+
attr_accessor :low_range
|
|
1016
|
+
|
|
1017
|
+
# Provides additional search terms to check for in a document, where each
|
|
1018
|
+
# document in the search results must contain at least one of the
|
|
1019
|
+
# additional search terms. You can also use the [Boolean
|
|
1020
|
+
# OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt)
|
|
1021
|
+
# query term for this type of query.
|
|
1022
|
+
# Corresponds to the JSON property `orTerms`
|
|
1023
|
+
# @return [String]
|
|
1024
|
+
attr_accessor :or_terms
|
|
1025
|
+
|
|
1026
|
+
# The character encoding supported for search results.
|
|
1027
|
+
# Corresponds to the JSON property `outputEncoding`
|
|
1028
|
+
# @return [String]
|
|
1029
|
+
attr_accessor :output_encoding
|
|
1030
|
+
|
|
1031
|
+
# Specifies that all search results should be pages that are related to the
|
|
1032
|
+
# specified URL. The parameter value should be a URL.
|
|
1033
|
+
# Corresponds to the JSON property `relatedSite`
|
|
1034
|
+
# @return [String]
|
|
1035
|
+
attr_accessor :related_site
|
|
1036
|
+
|
|
1037
|
+
# Filters based on licensing. Supported values include:
|
|
1038
|
+
# * `cc_publicdomain`
|
|
1039
|
+
# * `cc_attribute`
|
|
1040
|
+
# * `cc_sharealike`
|
|
1041
|
+
# * `cc_noncommercial`
|
|
1042
|
+
# * `cc_nonderived`
|
|
1043
|
+
# Corresponds to the JSON property `rights`
|
|
1044
|
+
# @return [String]
|
|
1045
|
+
attr_accessor :rights
|
|
1046
|
+
|
|
1047
|
+
# Specifies the [SafeSearch
|
|
1048
|
+
# level](https://developers.google.com/custom-search/docs/xml_results#
|
|
1049
|
+
# safeSearchLevels)
|
|
1050
|
+
# used for filtering out adult results. This is a custom property not
|
|
1051
|
+
# defined in the OpenSearch spec. Valid parameter values are:
|
|
1052
|
+
# * `"off"`: Disable SafeSearch
|
|
1053
|
+
# * `"active"`: Enable SafeSearch
|
|
1054
|
+
# Corresponds to the JSON property `safe`
|
|
1055
|
+
# @return [String]
|
|
1056
|
+
attr_accessor :safe
|
|
1057
|
+
|
|
1058
|
+
# The search terms entered by the user.
|
|
1059
|
+
# Corresponds to the JSON property `searchTerms`
|
|
1060
|
+
# @return [String]
|
|
1061
|
+
attr_accessor :search_terms
|
|
1062
|
+
|
|
1063
|
+
# Allowed values are `web` or `image`. If unspecified, results are limited
|
|
1064
|
+
# to webpages.
|
|
1065
|
+
# Corresponds to the JSON property `searchType`
|
|
1066
|
+
# @return [String]
|
|
1067
|
+
attr_accessor :search_type
|
|
1068
|
+
|
|
1069
|
+
# Restricts results to URLs from a specified site.
|
|
1070
|
+
# Corresponds to the JSON property `siteSearch`
|
|
1071
|
+
# @return [String]
|
|
1072
|
+
attr_accessor :site_search
|
|
1073
|
+
|
|
1074
|
+
# Specifies whether to include or exclude results from the site named in
|
|
1075
|
+
# the `sitesearch` parameter. Supported values are:
|
|
1076
|
+
# * `i`: include content from site
|
|
1077
|
+
# * `e`: exclude content from site
|
|
1078
|
+
# Corresponds to the JSON property `siteSearchFilter`
|
|
1079
|
+
# @return [String]
|
|
1080
|
+
attr_accessor :site_search_filter
|
|
1081
|
+
|
|
1082
|
+
# Specifies that results should be sorted according to the specified
|
|
1083
|
+
# expression. For example, sort by date.
|
|
1084
|
+
# Corresponds to the JSON property `sort`
|
|
1085
|
+
# @return [String]
|
|
1086
|
+
attr_accessor :sort
|
|
1087
|
+
|
|
1088
|
+
# The index of the current set of search results into the total set of
|
|
1089
|
+
# results, where the index of the first result is 1.
|
|
1090
|
+
# Corresponds to the JSON property `startIndex`
|
|
1091
|
+
# @return [Fixnum]
|
|
1092
|
+
attr_accessor :start_index
|
|
1093
|
+
|
|
1094
|
+
# The page number of this set of results, where the page length is set by
|
|
1095
|
+
# the `count` property.
|
|
1096
|
+
# Corresponds to the JSON property `startPage`
|
|
1097
|
+
# @return [Fixnum]
|
|
1098
|
+
attr_accessor :start_page
|
|
1099
|
+
|
|
1100
|
+
# A description of the query.
|
|
1101
|
+
# Corresponds to the JSON property `title`
|
|
1102
|
+
# @return [String]
|
|
1103
|
+
attr_accessor :title
|
|
1104
|
+
|
|
1105
|
+
# Estimated number of total search results. May not be accurate.
|
|
1106
|
+
# Corresponds to the JSON property `totalResults`
|
|
1107
|
+
# @return [Fixnum]
|
|
1108
|
+
attr_accessor :total_results
|
|
1109
|
+
|
|
1110
|
+
def initialize(**args)
|
|
1111
|
+
update!(**args)
|
|
1112
|
+
end
|
|
1113
|
+
|
|
1114
|
+
# Update properties of this object
|
|
1115
|
+
def update!(**args)
|
|
1116
|
+
@count = args[:count] if args.key?(:count)
|
|
1117
|
+
@cr = args[:cr] if args.key?(:cr)
|
|
1118
|
+
@cx = args[:cx] if args.key?(:cx)
|
|
1119
|
+
@date_restrict = args[:date_restrict] if args.key?(:date_restrict)
|
|
1120
|
+
@disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation)
|
|
1121
|
+
@exact_terms = args[:exact_terms] if args.key?(:exact_terms)
|
|
1122
|
+
@exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms)
|
|
1123
|
+
@file_type = args[:file_type] if args.key?(:file_type)
|
|
1124
|
+
@filter = args[:filter] if args.key?(:filter)
|
|
1125
|
+
@gl = args[:gl] if args.key?(:gl)
|
|
1126
|
+
@google_host = args[:google_host] if args.key?(:google_host)
|
|
1127
|
+
@high_range = args[:high_range] if args.key?(:high_range)
|
|
1128
|
+
@hl = args[:hl] if args.key?(:hl)
|
|
1129
|
+
@hq = args[:hq] if args.key?(:hq)
|
|
1130
|
+
@img_color_type = args[:img_color_type] if args.key?(:img_color_type)
|
|
1131
|
+
@img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color)
|
|
1132
|
+
@img_size = args[:img_size] if args.key?(:img_size)
|
|
1133
|
+
@img_type = args[:img_type] if args.key?(:img_type)
|
|
1134
|
+
@input_encoding = args[:input_encoding] if args.key?(:input_encoding)
|
|
1135
|
+
@language = args[:language] if args.key?(:language)
|
|
1136
|
+
@link_site = args[:link_site] if args.key?(:link_site)
|
|
1137
|
+
@low_range = args[:low_range] if args.key?(:low_range)
|
|
1138
|
+
@or_terms = args[:or_terms] if args.key?(:or_terms)
|
|
1139
|
+
@output_encoding = args[:output_encoding] if args.key?(:output_encoding)
|
|
1140
|
+
@related_site = args[:related_site] if args.key?(:related_site)
|
|
1141
|
+
@rights = args[:rights] if args.key?(:rights)
|
|
1142
|
+
@safe = args[:safe] if args.key?(:safe)
|
|
1143
|
+
@search_terms = args[:search_terms] if args.key?(:search_terms)
|
|
1144
|
+
@search_type = args[:search_type] if args.key?(:search_type)
|
|
1145
|
+
@site_search = args[:site_search] if args.key?(:site_search)
|
|
1146
|
+
@site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter)
|
|
1147
|
+
@sort = args[:sort] if args.key?(:sort)
|
|
1148
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
|
1149
|
+
@start_page = args[:start_page] if args.key?(:start_page)
|
|
1150
|
+
@title = args[:title] if args.key?(:title)
|
|
1151
|
+
@total_results = args[:total_results] if args.key?(:total_results)
|
|
1152
|
+
end
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
# Custom search request metadata.
|
|
1156
|
+
class Request
|
|
1157
|
+
include Google::Apis::Core::Hashable
|
|
1158
|
+
|
|
1159
|
+
# Number of search results returned in this set.
|
|
1160
|
+
# Corresponds to the JSON property `count`
|
|
1161
|
+
# @return [Fixnum]
|
|
1162
|
+
attr_accessor :count
|
|
1163
|
+
|
|
1164
|
+
# Restricts search results to documents originating in a particular
|
|
1165
|
+
# country. You may use [Boolean
|
|
1166
|
+
# operators](https://developers.google.com/custom-search/docs/xml_results#
|
|
1167
|
+
# booleanOperators)
|
|
1168
|
+
# in the `cr` parameter's value.
|
|
1169
|
+
# Google WebSearch determines the country of a document by analyzing the
|
|
1170
|
+
# following:
|
|
1171
|
+
# * The top-level domain (TLD) of the document's URL.
|
|
1172
|
+
# * The geographic location of the web server's IP address.
|
|
1173
|
+
# See [Country (cr) Parameter
|
|
1174
|
+
# Values](https://developers.google.com/custom-search/docs/xml_results#
|
|
1175
|
+
# countryCollections)
|
|
1176
|
+
# for a list of valid values for this parameter.
|
|
1177
|
+
# Corresponds to the JSON property `cr`
|
|
1178
|
+
# @return [String]
|
|
1179
|
+
attr_accessor :cr
|
|
1180
|
+
|
|
1181
|
+
# The identifier of a custom search engine created using the Custom Search
|
|
1182
|
+
# [Control Panel](https://cse.google.com/). This is a custom property not
|
|
1183
|
+
# defined in the OpenSearch spec. This parameter is **required**.
|
|
1184
|
+
# Corresponds to the JSON property `cx`
|
|
1185
|
+
# @return [String]
|
|
1186
|
+
attr_accessor :cx
|
|
1187
|
+
|
|
1188
|
+
# Restricts results to URLs based on date. Supported values include:
|
|
1189
|
+
# * `d[number]`: requests results from the specified number of past days.
|
|
1190
|
+
# * `w[number]`: requests results from the specified number of past weeks.
|
|
1191
|
+
# * `m[number]`: requests results from the specified number of past months.
|
|
1192
|
+
# * `y[number]`: requests results from the specified number of past years.
|
|
1193
|
+
# Corresponds to the JSON property `dateRestrict`
|
|
1194
|
+
# @return [String]
|
|
1195
|
+
attr_accessor :date_restrict
|
|
1196
|
+
|
|
1197
|
+
# Enables or disables the [Simplified and Traditional Chinese
|
|
1198
|
+
# Search](https://developers.google.com/custom-search/docs/xml_results#
|
|
1199
|
+
# chineseSearch)
|
|
1200
|
+
# feature.
|
|
1201
|
+
# Supported values are:
|
|
1202
|
+
# * `0`: enabled (default)
|
|
1203
|
+
# * `1`: disabled
|
|
1204
|
+
# Corresponds to the JSON property `disableCnTwTranslation`
|
|
1205
|
+
# @return [String]
|
|
1206
|
+
attr_accessor :disable_cn_tw_translation
|
|
1207
|
+
|
|
1208
|
+
# Identifies a phrase that all documents in the search results must
|
|
1209
|
+
# contain.
|
|
1210
|
+
# Corresponds to the JSON property `exactTerms`
|
|
1211
|
+
# @return [String]
|
|
1212
|
+
attr_accessor :exact_terms
|
|
1213
|
+
|
|
1214
|
+
# Identifies a word or phrase that should not appear in any documents in
|
|
1215
|
+
# the search results.
|
|
1216
|
+
# Corresponds to the JSON property `excludeTerms`
|
|
1217
|
+
# @return [String]
|
|
1218
|
+
attr_accessor :exclude_terms
|
|
1219
|
+
|
|
1220
|
+
# Restricts results to files of a specified extension. Filetypes supported
|
|
1221
|
+
# by Google include:
|
|
1222
|
+
# * Adobe Portable Document Format (`pdf`)
|
|
1223
|
+
# * Adobe PostScript (`ps`)
|
|
1224
|
+
# * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`, `wku`)
|
|
1225
|
+
# * Lotus WordPro (`lwp`)
|
|
1226
|
+
# * Macwrite (`mw`)
|
|
1227
|
+
# * Microsoft Excel (`xls`)
|
|
1228
|
+
# * Microsoft PowerPoint (`ppt`)
|
|
1229
|
+
# * Microsoft Word (`doc`)
|
|
1230
|
+
# * Microsoft Works (`wks`, `wps`, `wdb`)
|
|
1231
|
+
# * Microsoft Write (`wri`)
|
|
1232
|
+
# * Rich Text Format (`rtf`)
|
|
1233
|
+
# * Shockwave Flash (`swf`)
|
|
1234
|
+
# * Text (`ans`, `txt`).
|
|
1235
|
+
# Additional filetypes may be added in the future. An up-to-date list can
|
|
1236
|
+
# always be found in Google's [file type
|
|
1237
|
+
# FAQ](https://support.google.com/webmasters/answer/35287).
|
|
1238
|
+
# Corresponds to the JSON property `fileType`
|
|
1239
|
+
# @return [String]
|
|
1240
|
+
attr_accessor :file_type
|
|
1241
|
+
|
|
1242
|
+
# Activates or deactivates the automatic filtering of Google search
|
|
1243
|
+
# results. See [Automatic
|
|
1244
|
+
# Filtering](https://developers.google.com/custom-search/docs/xml_results#
|
|
1245
|
+
# automaticFiltering)
|
|
1246
|
+
# for more information about Google's search results filters. Valid values
|
|
1247
|
+
# for this parameter are:
|
|
1248
|
+
# * `0`: Disabled
|
|
1249
|
+
# * `1`: Enabled (default)
|
|
1250
|
+
# **Note**: By default, Google applies filtering to all search results to
|
|
1251
|
+
# improve the quality of those results.
|
|
1252
|
+
# Corresponds to the JSON property `filter`
|
|
1253
|
+
# @return [String]
|
|
1254
|
+
attr_accessor :filter
|
|
1255
|
+
|
|
1256
|
+
# Boosts search results whose country of origin matches the parameter
|
|
1257
|
+
# value. See [Country
|
|
1258
|
+
# Codes](https://developers.google.com/custom-search/docs/xml_results#
|
|
1259
|
+
# countryCodes)
|
|
1260
|
+
# for a list of valid values.
|
|
1261
|
+
# Specifying a `gl` parameter value in WebSearch requests should improve
|
|
1262
|
+
# the relevance of results. This is particularly true for international
|
|
1263
|
+
# customers and, even more specifically, for customers in English-speaking
|
|
1264
|
+
# countries other than the United States.
|
|
1265
|
+
# Corresponds to the JSON property `gl`
|
|
1266
|
+
# @return [String]
|
|
1267
|
+
attr_accessor :gl
|
|
1268
|
+
|
|
1269
|
+
# Specifies the Google domain (for example, google.com, google.de, or
|
|
1270
|
+
# google.fr) to which the search should be limited.
|
|
1271
|
+
# Corresponds to the JSON property `googleHost`
|
|
1272
|
+
# @return [String]
|
|
1273
|
+
attr_accessor :google_host
|
|
1274
|
+
|
|
1275
|
+
# Specifies the ending value for a search range. Use `cse:lowRange` and
|
|
1276
|
+
# `cse:highrange` to append an inclusive search range of
|
|
1277
|
+
# `lowRange...highRange` to the query.
|
|
1278
|
+
# Corresponds to the JSON property `highRange`
|
|
1279
|
+
# @return [String]
|
|
1280
|
+
attr_accessor :high_range
|
|
1281
|
+
|
|
1282
|
+
# Specifies the interface language (host language) of your user interface.
|
|
1283
|
+
# Explicitly setting this parameter improves the performance and the
|
|
1284
|
+
# quality of your search results.
|
|
1285
|
+
# See the [Interface
|
|
1286
|
+
# Languages](https://developers.google.com/custom-search/docs/xml_results#
|
|
1287
|
+
# wsInterfaceLanguages)
|
|
1288
|
+
# section of [Internationalizing Queries and Results
|
|
1289
|
+
# Presentation](https://developers.google.com/custom-search/docs/xml_results#
|
|
1290
|
+
# wsInternationalizing)
|
|
1291
|
+
# for more information, and [Supported Interface
|
|
1292
|
+
# Languages](https://developers.google.com/custom-search/docs/
|
|
1293
|
+
# xml_results_appendices#interfaceLanguages)
|
|
1294
|
+
# for a list of supported languages.
|
|
1295
|
+
# Corresponds to the JSON property `hl`
|
|
1296
|
+
# @return [String]
|
|
1297
|
+
attr_accessor :hl
|
|
1298
|
+
|
|
1299
|
+
# Appends the specified query terms to the query, as if they were combined
|
|
1300
|
+
# with a logical `AND` operator.
|
|
1301
|
+
# Corresponds to the JSON property `hq`
|
|
1302
|
+
# @return [String]
|
|
1303
|
+
attr_accessor :hq
|
|
1304
|
+
|
|
1305
|
+
# Restricts results to images of a specified color type. Supported values
|
|
1306
|
+
# are:
|
|
1307
|
+
# * `mono` (black and white)
|
|
1308
|
+
# * `gray` (grayscale)
|
|
1309
|
+
# * `color` (color)
|
|
1310
|
+
# Corresponds to the JSON property `imgColorType`
|
|
1311
|
+
# @return [String]
|
|
1312
|
+
attr_accessor :img_color_type
|
|
1313
|
+
|
|
1314
|
+
# Restricts results to images with a specific dominant color. Supported
|
|
1315
|
+
# values are:
|
|
1316
|
+
# * `red`
|
|
1317
|
+
# * `orange`
|
|
1318
|
+
# * `yellow`
|
|
1319
|
+
# * `green`
|
|
1320
|
+
# * `teal`
|
|
1321
|
+
# * `blue`
|
|
1322
|
+
# * `purple`
|
|
1323
|
+
# * `pink`
|
|
1324
|
+
# * `white`
|
|
1325
|
+
# * `gray`
|
|
1326
|
+
# * `black`
|
|
1327
|
+
# * `brown`
|
|
1328
|
+
# Corresponds to the JSON property `imgDominantColor`
|
|
1329
|
+
# @return [String]
|
|
1330
|
+
attr_accessor :img_dominant_color
|
|
1331
|
+
|
|
1332
|
+
# Restricts results to images of a specified size. Supported values are:
|
|
1333
|
+
# * `icon` (small)
|
|
1334
|
+
# * `small | medium | large | xlarge` (medium)
|
|
1335
|
+
# * `xxlarge` (large)
|
|
1336
|
+
# * `huge` (extra-large)
|
|
1337
|
+
# Corresponds to the JSON property `imgSize`
|
|
1338
|
+
# @return [String]
|
|
1339
|
+
attr_accessor :img_size
|
|
1340
|
+
|
|
1341
|
+
# Restricts results to images of a specified type. Supported values are:
|
|
1342
|
+
# * `clipart` (Clip art)
|
|
1343
|
+
# * `face` (Face)
|
|
1344
|
+
# * `lineart` (Line drawing)
|
|
1345
|
+
# * `photo` (Photo)
|
|
1346
|
+
# * `animated` (Animated)
|
|
1347
|
+
# * `stock` (Stock)
|
|
1348
|
+
# Corresponds to the JSON property `imgType`
|
|
1349
|
+
# @return [String]
|
|
1350
|
+
attr_accessor :img_type
|
|
1351
|
+
|
|
1352
|
+
# The character encoding supported for search requests.
|
|
1353
|
+
# Corresponds to the JSON property `inputEncoding`
|
|
1354
|
+
# @return [String]
|
|
1355
|
+
attr_accessor :input_encoding
|
|
1356
|
+
|
|
1357
|
+
# The language of the search results.
|
|
1358
|
+
# Corresponds to the JSON property `language`
|
|
1359
|
+
# @return [String]
|
|
1360
|
+
attr_accessor :language
|
|
1361
|
+
|
|
1362
|
+
# Specifies that all results should contain a link to a specific URL.
|
|
1363
|
+
# Corresponds to the JSON property `linkSite`
|
|
1364
|
+
# @return [String]
|
|
1365
|
+
attr_accessor :link_site
|
|
1366
|
+
|
|
1367
|
+
# Specifies the starting value for a search range. Use `cse:lowRange` and
|
|
1368
|
+
# `cse:highrange` to append an inclusive search range of
|
|
1369
|
+
# `lowRange...highRange` to the query.
|
|
1370
|
+
# Corresponds to the JSON property `lowRange`
|
|
1371
|
+
# @return [String]
|
|
1372
|
+
attr_accessor :low_range
|
|
1373
|
+
|
|
1374
|
+
# Provides additional search terms to check for in a document, where each
|
|
1375
|
+
# document in the search results must contain at least one of the
|
|
1376
|
+
# additional search terms. You can also use the [Boolean
|
|
1377
|
+
# OR](https://developers.google.com/custom-search/docs/xml_results#BooleanOrqt)
|
|
1378
|
+
# query term for this type of query.
|
|
1379
|
+
# Corresponds to the JSON property `orTerms`
|
|
1380
|
+
# @return [String]
|
|
1381
|
+
attr_accessor :or_terms
|
|
1382
|
+
|
|
1383
|
+
# The character encoding supported for search results.
|
|
1384
|
+
# Corresponds to the JSON property `outputEncoding`
|
|
1385
|
+
# @return [String]
|
|
1386
|
+
attr_accessor :output_encoding
|
|
1387
|
+
|
|
1388
|
+
# Specifies that all search results should be pages that are related to the
|
|
1389
|
+
# specified URL. The parameter value should be a URL.
|
|
1390
|
+
# Corresponds to the JSON property `relatedSite`
|
|
1391
|
+
# @return [String]
|
|
1392
|
+
attr_accessor :related_site
|
|
1393
|
+
|
|
1394
|
+
# Filters based on licensing. Supported values include:
|
|
1395
|
+
# * `cc_publicdomain`
|
|
1396
|
+
# * `cc_attribute`
|
|
1397
|
+
# * `cc_sharealike`
|
|
1398
|
+
# * `cc_noncommercial`
|
|
1399
|
+
# * `cc_nonderived`
|
|
1400
|
+
# Corresponds to the JSON property `rights`
|
|
1401
|
+
# @return [String]
|
|
1402
|
+
attr_accessor :rights
|
|
1403
|
+
|
|
1404
|
+
# Specifies the [SafeSearch
|
|
1405
|
+
# level](https://developers.google.com/custom-search/docs/xml_results#
|
|
1406
|
+
# safeSearchLevels)
|
|
1407
|
+
# used for filtering out adult results. This is a custom property not
|
|
1408
|
+
# defined in the OpenSearch spec. Valid parameter values are:
|
|
1409
|
+
# * `"off"`: Disable SafeSearch
|
|
1410
|
+
# * `"active"`: Enable SafeSearch
|
|
1411
|
+
# Corresponds to the JSON property `safe`
|
|
1412
|
+
# @return [String]
|
|
1413
|
+
attr_accessor :safe
|
|
1414
|
+
|
|
1415
|
+
# The search terms entered by the user.
|
|
1416
|
+
# Corresponds to the JSON property `searchTerms`
|
|
1417
|
+
# @return [String]
|
|
1418
|
+
attr_accessor :search_terms
|
|
1419
|
+
|
|
1420
|
+
# Allowed values are `web` or `image`. If unspecified, results are limited
|
|
1421
|
+
# to webpages.
|
|
1422
|
+
# Corresponds to the JSON property `searchType`
|
|
1423
|
+
# @return [String]
|
|
1424
|
+
attr_accessor :search_type
|
|
1425
|
+
|
|
1426
|
+
# Restricts results to URLs from a specified site.
|
|
1427
|
+
# Corresponds to the JSON property `siteSearch`
|
|
1428
|
+
# @return [String]
|
|
1429
|
+
attr_accessor :site_search
|
|
1430
|
+
|
|
1431
|
+
# Specifies whether to include or exclude results from the site named in
|
|
1432
|
+
# the `sitesearch` parameter. Supported values are:
|
|
1433
|
+
# * `i`: include content from site
|
|
1434
|
+
# * `e`: exclude content from site
|
|
1435
|
+
# Corresponds to the JSON property `siteSearchFilter`
|
|
1436
|
+
# @return [String]
|
|
1437
|
+
attr_accessor :site_search_filter
|
|
1438
|
+
|
|
1439
|
+
# Specifies that results should be sorted according to the specified
|
|
1440
|
+
# expression. For example, sort by date.
|
|
1441
|
+
# Corresponds to the JSON property `sort`
|
|
1442
|
+
# @return [String]
|
|
1443
|
+
attr_accessor :sort
|
|
1444
|
+
|
|
1445
|
+
# The index of the current set of search results into the total set of
|
|
1446
|
+
# results, where the index of the first result is 1.
|
|
1447
|
+
# Corresponds to the JSON property `startIndex`
|
|
1448
|
+
# @return [Fixnum]
|
|
1449
|
+
attr_accessor :start_index
|
|
1450
|
+
|
|
1451
|
+
# The page number of this set of results, where the page length is set by
|
|
1452
|
+
# the `count` property.
|
|
1453
|
+
# Corresponds to the JSON property `startPage`
|
|
1454
|
+
# @return [Fixnum]
|
|
1455
|
+
attr_accessor :start_page
|
|
1456
|
+
|
|
1457
|
+
# A description of the query.
|
|
1458
|
+
# Corresponds to the JSON property `title`
|
|
1459
|
+
# @return [String]
|
|
1460
|
+
attr_accessor :title
|
|
1461
|
+
|
|
1462
|
+
# Estimated number of total search results. May not be accurate.
|
|
1463
|
+
# Corresponds to the JSON property `totalResults`
|
|
1464
|
+
# @return [Fixnum]
|
|
1465
|
+
attr_accessor :total_results
|
|
1466
|
+
|
|
1467
|
+
def initialize(**args)
|
|
1468
|
+
update!(**args)
|
|
1469
|
+
end
|
|
1470
|
+
|
|
1471
|
+
# Update properties of this object
|
|
1472
|
+
def update!(**args)
|
|
1473
|
+
@count = args[:count] if args.key?(:count)
|
|
1474
|
+
@cr = args[:cr] if args.key?(:cr)
|
|
1475
|
+
@cx = args[:cx] if args.key?(:cx)
|
|
1476
|
+
@date_restrict = args[:date_restrict] if args.key?(:date_restrict)
|
|
1477
|
+
@disable_cn_tw_translation = args[:disable_cn_tw_translation] if args.key?(:disable_cn_tw_translation)
|
|
1478
|
+
@exact_terms = args[:exact_terms] if args.key?(:exact_terms)
|
|
1479
|
+
@exclude_terms = args[:exclude_terms] if args.key?(:exclude_terms)
|
|
1480
|
+
@file_type = args[:file_type] if args.key?(:file_type)
|
|
1481
|
+
@filter = args[:filter] if args.key?(:filter)
|
|
1482
|
+
@gl = args[:gl] if args.key?(:gl)
|
|
1483
|
+
@google_host = args[:google_host] if args.key?(:google_host)
|
|
1484
|
+
@high_range = args[:high_range] if args.key?(:high_range)
|
|
1485
|
+
@hl = args[:hl] if args.key?(:hl)
|
|
1486
|
+
@hq = args[:hq] if args.key?(:hq)
|
|
1487
|
+
@img_color_type = args[:img_color_type] if args.key?(:img_color_type)
|
|
1488
|
+
@img_dominant_color = args[:img_dominant_color] if args.key?(:img_dominant_color)
|
|
1489
|
+
@img_size = args[:img_size] if args.key?(:img_size)
|
|
1490
|
+
@img_type = args[:img_type] if args.key?(:img_type)
|
|
1491
|
+
@input_encoding = args[:input_encoding] if args.key?(:input_encoding)
|
|
1492
|
+
@language = args[:language] if args.key?(:language)
|
|
1493
|
+
@link_site = args[:link_site] if args.key?(:link_site)
|
|
1494
|
+
@low_range = args[:low_range] if args.key?(:low_range)
|
|
1495
|
+
@or_terms = args[:or_terms] if args.key?(:or_terms)
|
|
1496
|
+
@output_encoding = args[:output_encoding] if args.key?(:output_encoding)
|
|
1497
|
+
@related_site = args[:related_site] if args.key?(:related_site)
|
|
1498
|
+
@rights = args[:rights] if args.key?(:rights)
|
|
1499
|
+
@safe = args[:safe] if args.key?(:safe)
|
|
1500
|
+
@search_terms = args[:search_terms] if args.key?(:search_terms)
|
|
1501
|
+
@search_type = args[:search_type] if args.key?(:search_type)
|
|
1502
|
+
@site_search = args[:site_search] if args.key?(:site_search)
|
|
1503
|
+
@site_search_filter = args[:site_search_filter] if args.key?(:site_search_filter)
|
|
1504
|
+
@sort = args[:sort] if args.key?(:sort)
|
|
1505
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
|
1506
|
+
@start_page = args[:start_page] if args.key?(:start_page)
|
|
1507
|
+
@title = args[:title] if args.key?(:title)
|
|
1508
|
+
@total_results = args[:total_results] if args.key?(:total_results)
|
|
1509
|
+
end
|
|
1510
|
+
end
|
|
1511
|
+
end
|
|
1512
|
+
|
|
1513
|
+
# Metadata about a search operation.
|
|
1514
|
+
class SearchInformation
|
|
1515
|
+
include Google::Apis::Core::Hashable
|
|
1516
|
+
|
|
1517
|
+
# The time taken for the server to return search results, formatted
|
|
1518
|
+
# according to locale style.
|
|
1519
|
+
# Corresponds to the JSON property `formattedSearchTime`
|
|
1520
|
+
# @return [String]
|
|
1521
|
+
attr_accessor :formatted_search_time
|
|
1522
|
+
|
|
1523
|
+
# The total number of search results, formatted according to locale style.
|
|
1524
|
+
# Corresponds to the JSON property `formattedTotalResults`
|
|
1525
|
+
# @return [String]
|
|
1526
|
+
attr_accessor :formatted_total_results
|
|
1527
|
+
|
|
1528
|
+
# The time taken for the server to return search results.
|
|
1529
|
+
# Corresponds to the JSON property `searchTime`
|
|
1530
|
+
# @return [Float]
|
|
1531
|
+
attr_accessor :search_time
|
|
1532
|
+
|
|
1533
|
+
# The total number of search results returned by the query.
|
|
1534
|
+
# Corresponds to the JSON property `totalResults`
|
|
1535
|
+
# @return [String]
|
|
1536
|
+
attr_accessor :total_results
|
|
1537
|
+
|
|
1538
|
+
def initialize(**args)
|
|
1539
|
+
update!(**args)
|
|
1540
|
+
end
|
|
1541
|
+
|
|
1542
|
+
# Update properties of this object
|
|
1543
|
+
def update!(**args)
|
|
1544
|
+
@formatted_search_time = args[:formatted_search_time] if args.key?(:formatted_search_time)
|
|
1545
|
+
@formatted_total_results = args[:formatted_total_results] if args.key?(:formatted_total_results)
|
|
1546
|
+
@search_time = args[:search_time] if args.key?(:search_time)
|
|
1547
|
+
@total_results = args[:total_results] if args.key?(:total_results)
|
|
1548
|
+
end
|
|
1549
|
+
end
|
|
1550
|
+
|
|
1551
|
+
# Spell correction information for a query.
|
|
1552
|
+
class Spelling
|
|
1553
|
+
include Google::Apis::Core::Hashable
|
|
1554
|
+
|
|
1555
|
+
# The corrected query.
|
|
1556
|
+
# Corresponds to the JSON property `correctedQuery`
|
|
1557
|
+
# @return [String]
|
|
1558
|
+
attr_accessor :corrected_query
|
|
1559
|
+
|
|
1560
|
+
# The corrected query, formatted in HTML.
|
|
1561
|
+
# Corresponds to the JSON property `htmlCorrectedQuery`
|
|
1562
|
+
# @return [String]
|
|
1563
|
+
attr_accessor :html_corrected_query
|
|
1564
|
+
|
|
1565
|
+
def initialize(**args)
|
|
1566
|
+
update!(**args)
|
|
1567
|
+
end
|
|
1568
|
+
|
|
1569
|
+
# Update properties of this object
|
|
1570
|
+
def update!(**args)
|
|
1571
|
+
@corrected_query = args[:corrected_query] if args.key?(:corrected_query)
|
|
1572
|
+
@html_corrected_query = args[:html_corrected_query] if args.key?(:html_corrected_query)
|
|
1573
|
+
end
|
|
1574
|
+
end
|
|
1575
|
+
|
|
1576
|
+
# OpenSearch template and URL.
|
|
1577
|
+
class Url
|
|
1578
|
+
include Google::Apis::Core::Hashable
|
|
1579
|
+
|
|
1580
|
+
# The actual [OpenSearch
|
|
1581
|
+
# template](http://www.opensearch.org/specifications/opensearch/1.1#
|
|
1582
|
+
# opensearch_url_template_syntax)
|
|
1583
|
+
# for this API.
|
|
1584
|
+
# Corresponds to the JSON property `template`
|
|
1585
|
+
# @return [String]
|
|
1586
|
+
attr_accessor :template
|
|
1587
|
+
|
|
1588
|
+
# The MIME type of the OpenSearch URL template for the Custom Search API.
|
|
1589
|
+
# Corresponds to the JSON property `type`
|
|
1590
|
+
# @return [String]
|
|
1591
|
+
attr_accessor :type
|
|
1592
|
+
|
|
1593
|
+
def initialize(**args)
|
|
1594
|
+
update!(**args)
|
|
1595
|
+
end
|
|
1596
|
+
|
|
1597
|
+
# Update properties of this object
|
|
1598
|
+
def update!(**args)
|
|
1599
|
+
@template = args[:template] if args.key?(:template)
|
|
1600
|
+
@type = args[:type] if args.key?(:type)
|
|
1601
|
+
end
|
|
1602
|
+
end
|
|
1603
|
+
end
|
|
1604
|
+
end
|
|
1605
|
+
end
|
|
1606
|
+
end
|