google-api-client 0.9.8 → 0.9.20
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 +37 -0
- data/Gemfile +9 -1
- data/README.md +10 -2
- data/api_names.yaml +63 -110
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
- data/generated/google/apis/admin_directory_v1/service.rb +41 -2
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +2 -2
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +379 -3
- data/generated/google/apis/analytics_v3/representations.rb +136 -0
- data/generated/google/apis/analytics_v3/service.rb +217 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
- data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
- data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
- data/generated/google/apis/appengine_v1beta5.rb +7 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
- data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
- data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +277 -20
- data/generated/google/apis/bigquery_v2/representations.rb +86 -0
- data/generated/google/apis/bigquery_v2/service.rb +8 -2
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +79 -1
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
- data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
- data/generated/google/apis/civicinfo_v2/service.rb +27 -6
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +183 -37
- data/generated/google/apis/classroom_v1/representations.rb +74 -9
- data/generated/google/apis/classroom_v1/service.rb +403 -38
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
- data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
- data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
- data/generated/google/apis/clouddebugger_v2.rb +3 -6
- data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +2299 -434
- data/generated/google/apis/compute_beta/representations.rb +752 -33
- data/generated/google/apis/compute_beta/service.rb +6067 -3153
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1681 -207
- data/generated/google/apis/compute_v1/representations.rb +552 -0
- data/generated/google/apis/compute_v1/service.rb +2797 -1171
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +757 -1
- data/generated/google/apis/content_v2/representations.rb +337 -0
- data/generated/google/apis/content_v2/service.rb +244 -0
- data/generated/google/apis/dataflow_v1b3.rb +38 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +213 -68
- data/generated/google/apis/dataproc_v1/representations.rb +38 -0
- data/generated/google/apis/dataproc_v1/service.rb +78 -48
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
- data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +27 -3
- data/generated/google/apis/drive_v2/representations.rb +4 -0
- data/generated/google/apis/drive_v2/service.rb +16 -3
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +50 -16
- data/generated/google/apis/drive_v3/representations.rb +4 -0
- data/generated/google/apis/drive_v3/service.rb +12 -2
- data/generated/google/apis/fitness_v1.rb +8 -2
- data/generated/google/apis/fitness_v1/classes.rb +64 -6
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -4
- data/generated/google/apis/genomics_v1/classes.rb +143 -34
- data/generated/google/apis/genomics_v1/representations.rb +48 -11
- data/generated/google/apis/genomics_v1/service.rb +35 -37
- data/generated/google/apis/gmail_v1.rb +10 -1
- data/generated/google/apis/gmail_v1/classes.rb +542 -4
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +181 -206
- data/generated/google/apis/iam_v1/representations.rb +36 -45
- data/generated/google/apis/iam_v1/service.rb +101 -67
- data/generated/google/apis/identitytoolkit_v3.rb +4 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +599 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +152 -0
- data/generated/google/apis/logging_v2beta1.rb +6 -6
- data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
- data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
- data/generated/google/apis/logging_v2beta1/service.rb +290 -209
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +711 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +10 -9
- data/generated/google/apis/pubsub_v1/service.rb +128 -27
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -0
- data/generated/google/apis/script_v1/representations.rb +1 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +910 -89
- data/generated/google/apis/sheets_v4/representations.rb +194 -10
- data/generated/google/apis/sheets_v4/service.rb +216 -49
- data/generated/google/apis/slides_v1.rb +49 -0
- data/generated/google/apis/slides_v1/classes.rb +3926 -0
- data/generated/google/apis/slides_v1/representations.rb +1722 -0
- data/generated/google/apis/slides_v1/service.rb +202 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
- data/generated/google/apis/speech_v1beta1/service.rb +271 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +43 -18
- data/generated/google/apis/storage_v1/representations.rb +4 -1
- data/generated/google/apis/storage_v1/service.rb +5 -2
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +12 -11
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +183 -21
- data/generated/google/apis/youtube_v3/representations.rb +85 -4
- data/generated/google/apis/youtube_v3/service.rb +41 -5
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/base_service.rb +10 -4
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +2 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/sync.rb +71 -0
- metadata +55 -13
|
@@ -76,6 +76,12 @@ module Google
|
|
|
76
76
|
include Google::Apis::Core::JsonObjectSupport
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
class ClusterMetrics
|
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
81
|
+
|
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
83
|
+
end
|
|
84
|
+
|
|
79
85
|
class Operation
|
|
80
86
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
81
87
|
|
|
@@ -178,6 +184,12 @@ module Google
|
|
|
178
184
|
include Google::Apis::Core::JsonObjectSupport
|
|
179
185
|
end
|
|
180
186
|
|
|
187
|
+
class YarnApplication
|
|
188
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
189
|
+
|
|
190
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
191
|
+
end
|
|
192
|
+
|
|
181
193
|
class ListJobsResponse
|
|
182
194
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
183
195
|
|
|
@@ -245,11 +257,14 @@ module Google
|
|
|
245
257
|
property :cluster_name, as: 'clusterName'
|
|
246
258
|
property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation
|
|
247
259
|
|
|
260
|
+
hash :labels, as: 'labels'
|
|
248
261
|
property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation
|
|
249
262
|
|
|
250
263
|
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation
|
|
251
264
|
|
|
252
265
|
property :cluster_uuid, as: 'clusterUuid'
|
|
266
|
+
property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation
|
|
267
|
+
|
|
253
268
|
end
|
|
254
269
|
end
|
|
255
270
|
|
|
@@ -278,6 +293,7 @@ module Google
|
|
|
278
293
|
property :zone_uri, as: 'zoneUri'
|
|
279
294
|
property :network_uri, as: 'networkUri'
|
|
280
295
|
property :subnetwork_uri, as: 'subnetworkUri'
|
|
296
|
+
property :internal_ip_only, as: 'internalIpOnly'
|
|
281
297
|
collection :service_account_scopes, as: 'serviceAccountScopes'
|
|
282
298
|
collection :tags, as: 'tags'
|
|
283
299
|
hash :metadata, as: 'metadata'
|
|
@@ -340,6 +356,14 @@ module Google
|
|
|
340
356
|
end
|
|
341
357
|
end
|
|
342
358
|
|
|
359
|
+
class ClusterMetrics
|
|
360
|
+
# @private
|
|
361
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
362
|
+
hash :hdfs_metrics, as: 'hdfsMetrics'
|
|
363
|
+
hash :yarn_metrics, as: 'yarnMetrics'
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
|
|
343
367
|
class Operation
|
|
344
368
|
# @private
|
|
345
369
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -407,8 +431,11 @@ module Google
|
|
|
407
431
|
|
|
408
432
|
collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
|
|
409
433
|
|
|
434
|
+
collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation
|
|
435
|
+
|
|
410
436
|
property :driver_output_resource_uri, as: 'driverOutputResourceUri'
|
|
411
437
|
property :driver_control_files_uri, as: 'driverControlFilesUri'
|
|
438
|
+
hash :labels, as: 'labels'
|
|
412
439
|
end
|
|
413
440
|
end
|
|
414
441
|
|
|
@@ -538,6 +565,16 @@ module Google
|
|
|
538
565
|
end
|
|
539
566
|
end
|
|
540
567
|
|
|
568
|
+
class YarnApplication
|
|
569
|
+
# @private
|
|
570
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
571
|
+
property :name, as: 'name'
|
|
572
|
+
property :state, as: 'state'
|
|
573
|
+
property :progress, as: 'progress'
|
|
574
|
+
property :tracking_url, as: 'trackingUrl'
|
|
575
|
+
end
|
|
576
|
+
end
|
|
577
|
+
|
|
541
578
|
class ListJobsResponse
|
|
542
579
|
# @private
|
|
543
580
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
@@ -586,6 +623,7 @@ module Google
|
|
|
586
623
|
|
|
587
624
|
property :operation_type, as: 'operationType'
|
|
588
625
|
property :description, as: 'description'
|
|
626
|
+
hash :labels, as: 'labels'
|
|
589
627
|
end
|
|
590
628
|
end
|
|
591
629
|
|
|
@@ -22,7 +22,7 @@ module Google
|
|
|
22
22
|
module DataprocV1
|
|
23
23
|
# Google Cloud Dataproc API
|
|
24
24
|
#
|
|
25
|
-
#
|
|
25
|
+
# An API for managing Hadoop-based clusters and jobs on Google Cloud Platform.
|
|
26
26
|
#
|
|
27
27
|
# @example
|
|
28
28
|
# require 'google/apis/dataproc_v1'
|
|
@@ -215,10 +215,24 @@ module Google
|
|
|
215
215
|
# belongs to.
|
|
216
216
|
# @param [String] region
|
|
217
217
|
# [Required] The Cloud Dataproc region in which to handle the request.
|
|
218
|
+
# @param [String] filter
|
|
219
|
+
# [Optional] A filter constraining the clusters to list. Filters are case-
|
|
220
|
+
# sensitive and have the following syntax: field:value [field:value] ... or
|
|
221
|
+
# field = value [AND [field = value]] ... where **field** is one of `status.
|
|
222
|
+
# state`, `clusterName`, or `labels.[KEY]`, and `[KEY]` is a label key. **value**
|
|
223
|
+
# can be `*` to match all values. `status.state` can be one of the following: `
|
|
224
|
+
# ACTIVE`, `INACTIVE`, `CREATING`, `RUNNING`, `ERROR`, `DELETING`, or `UPDATING`.
|
|
225
|
+
# `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE`
|
|
226
|
+
# contains the `DELETING` and `ERROR` states. `clusterName` is the name of the
|
|
227
|
+
# cluster provided at creation time. Only the logical `AND` operator is
|
|
228
|
+
# supported; space-separated items are treated as having an implicit `AND`
|
|
229
|
+
# operator. Example valid filters are: status.state:ACTIVE clusterName:mycluster
|
|
230
|
+
# labels.env:staging \ labels.starred:* and status.state = ACTIVE AND
|
|
231
|
+
# clusterName = mycluster \ AND labels.env = staging AND labels.starred = *
|
|
218
232
|
# @param [Fixnum] page_size
|
|
219
|
-
# The standard List page size.
|
|
233
|
+
# [Optional] The standard List page size.
|
|
220
234
|
# @param [String] page_token
|
|
221
|
-
# The standard List page token.
|
|
235
|
+
# [Optional] The standard List page token.
|
|
222
236
|
# @param [String] fields
|
|
223
237
|
# Selector specifying which fields to include in a partial response.
|
|
224
238
|
# @param [String] quota_user
|
|
@@ -236,12 +250,13 @@ module Google
|
|
|
236
250
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
237
251
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
238
252
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
239
|
-
def list_clusters(project_id, region, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
253
|
+
def list_clusters(project_id, region, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
240
254
|
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options)
|
|
241
255
|
command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation
|
|
242
256
|
command.response_class = Google::Apis::DataprocV1::ListClustersResponse
|
|
243
257
|
command.params['projectId'] = project_id unless project_id.nil?
|
|
244
258
|
command.params['region'] = region unless region.nil?
|
|
259
|
+
command.query['filter'] = filter unless filter.nil?
|
|
245
260
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
246
261
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
247
262
|
command.query['fields'] = fields unless fields.nil?
|
|
@@ -376,7 +391,18 @@ module Google
|
|
|
376
391
|
# [Optional] If set, the returned jobs list includes only jobs that were
|
|
377
392
|
# submitted to the named cluster.
|
|
378
393
|
# @param [String] job_state_matcher
|
|
379
|
-
# [Optional] Specifies enumerated categories of jobs to list
|
|
394
|
+
# [Optional] Specifies enumerated categories of jobs to list (default = match
|
|
395
|
+
# ALL jobs).
|
|
396
|
+
# @param [String] filter
|
|
397
|
+
# [Optional] A filter constraining the jobs to list. Filters are case-sensitive
|
|
398
|
+
# and have the following syntax: field:value] ... or [field = value] AND [field [
|
|
399
|
+
# = value]] ... where **field** is `status.state` or `labels.[KEY]`, and `[KEY]`
|
|
400
|
+
# is a label key. **value** can be `*` to match all values. `status.state` can
|
|
401
|
+
# be either `ACTIVE` or `INACTIVE`. Only the logical `AND` operator is supported;
|
|
402
|
+
# space-separated items are treated as having an implicit `AND` operator.
|
|
403
|
+
# Example valid filters are: status.state:ACTIVE labels.env:staging labels.
|
|
404
|
+
# starred:* and status.state = ACTIVE AND labels.env = staging AND labels.
|
|
405
|
+
# starred = *
|
|
380
406
|
# @param [String] fields
|
|
381
407
|
# Selector specifying which fields to include in a partial response.
|
|
382
408
|
# @param [String] quota_user
|
|
@@ -394,7 +420,7 @@ module Google
|
|
|
394
420
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
395
421
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
396
422
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
397
|
-
def list_jobs(project_id, region, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
423
|
+
def list_jobs(project_id, region, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
398
424
|
command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options)
|
|
399
425
|
command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation
|
|
400
426
|
command.response_class = Google::Apis::DataprocV1::ListJobsResponse
|
|
@@ -404,6 +430,7 @@ module Google
|
|
|
404
430
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
405
431
|
command.query['clusterName'] = cluster_name unless cluster_name.nil?
|
|
406
432
|
command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
|
|
433
|
+
command.query['filter'] = filter unless filter.nil?
|
|
407
434
|
command.query['fields'] = fields unless fields.nil?
|
|
408
435
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
409
436
|
execute_or_queue_command(command, &block)
|
|
@@ -488,10 +515,18 @@ module Google
|
|
|
488
515
|
execute_or_queue_command(command, &block)
|
|
489
516
|
end
|
|
490
517
|
|
|
491
|
-
#
|
|
492
|
-
#
|
|
518
|
+
# Lists operations that match the specified filter in the request. If the server
|
|
519
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
|
520
|
+
# binding below allows API services to override the binding to use different
|
|
521
|
+
# resource name schemes, such as `users/*/operations`.
|
|
493
522
|
# @param [String] name
|
|
494
|
-
# The name of the operation
|
|
523
|
+
# The name of the operation collection.
|
|
524
|
+
# @param [String] filter
|
|
525
|
+
# The standard list filter.
|
|
526
|
+
# @param [Fixnum] page_size
|
|
527
|
+
# The standard list page size.
|
|
528
|
+
# @param [String] page_token
|
|
529
|
+
# The standard list page token.
|
|
495
530
|
# @param [String] fields
|
|
496
531
|
# Selector specifying which fields to include in a partial response.
|
|
497
532
|
# @param [String] quota_user
|
|
@@ -501,36 +536,31 @@ module Google
|
|
|
501
536
|
# Request-specific options
|
|
502
537
|
#
|
|
503
538
|
# @yield [result, err] Result & error if block supplied
|
|
504
|
-
# @yieldparam result [Google::Apis::DataprocV1::
|
|
539
|
+
# @yieldparam result [Google::Apis::DataprocV1::ListOperationsResponse] parsed result object
|
|
505
540
|
# @yieldparam err [StandardError] error object if request failed
|
|
506
541
|
#
|
|
507
|
-
# @return [Google::Apis::DataprocV1::
|
|
542
|
+
# @return [Google::Apis::DataprocV1::ListOperationsResponse]
|
|
508
543
|
#
|
|
509
544
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
510
545
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
511
546
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
512
|
-
def
|
|
547
|
+
def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
513
548
|
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
514
|
-
command.response_representation = Google::Apis::DataprocV1::
|
|
515
|
-
command.response_class = Google::Apis::DataprocV1::
|
|
549
|
+
command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation
|
|
550
|
+
command.response_class = Google::Apis::DataprocV1::ListOperationsResponse
|
|
516
551
|
command.params['name'] = name unless name.nil?
|
|
552
|
+
command.query['filter'] = filter unless filter.nil?
|
|
553
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
554
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
517
555
|
command.query['fields'] = fields unless fields.nil?
|
|
518
556
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
519
557
|
execute_or_queue_command(command, &block)
|
|
520
558
|
end
|
|
521
559
|
|
|
522
|
-
#
|
|
523
|
-
#
|
|
524
|
-
# binding below allows API services to override the binding to use different
|
|
525
|
-
# resource name schemes, such as `users/*/operations`.
|
|
560
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
|
561
|
+
# to poll the operation result at intervals as recommended by the API service.
|
|
526
562
|
# @param [String] name
|
|
527
|
-
# The name of the operation
|
|
528
|
-
# @param [String] filter
|
|
529
|
-
# The standard list filter.
|
|
530
|
-
# @param [Fixnum] page_size
|
|
531
|
-
# The standard list page size.
|
|
532
|
-
# @param [String] page_token
|
|
533
|
-
# The standard list page token.
|
|
563
|
+
# The name of the operation resource.
|
|
534
564
|
# @param [String] fields
|
|
535
565
|
# Selector specifying which fields to include in a partial response.
|
|
536
566
|
# @param [String] quota_user
|
|
@@ -540,34 +570,30 @@ module Google
|
|
|
540
570
|
# Request-specific options
|
|
541
571
|
#
|
|
542
572
|
# @yield [result, err] Result & error if block supplied
|
|
543
|
-
# @yieldparam result [Google::Apis::DataprocV1::
|
|
573
|
+
# @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
|
|
544
574
|
# @yieldparam err [StandardError] error object if request failed
|
|
545
575
|
#
|
|
546
|
-
# @return [Google::Apis::DataprocV1::
|
|
576
|
+
# @return [Google::Apis::DataprocV1::Operation]
|
|
547
577
|
#
|
|
548
578
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
549
579
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
550
580
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
551
|
-
def
|
|
581
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
552
582
|
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
553
|
-
command.response_representation = Google::Apis::DataprocV1::
|
|
554
|
-
command.response_class = Google::Apis::DataprocV1::
|
|
583
|
+
command.response_representation = Google::Apis::DataprocV1::Operation::Representation
|
|
584
|
+
command.response_class = Google::Apis::DataprocV1::Operation
|
|
555
585
|
command.params['name'] = name unless name.nil?
|
|
556
|
-
command.query['filter'] = filter unless filter.nil?
|
|
557
|
-
command.query['pageSize'] = page_size unless page_size.nil?
|
|
558
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
559
586
|
command.query['fields'] = fields unless fields.nil?
|
|
560
587
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
561
588
|
execute_or_queue_command(command, &block)
|
|
562
589
|
end
|
|
563
590
|
|
|
564
|
-
#
|
|
565
|
-
#
|
|
566
|
-
# server doesn't support this method, it returns `google.rpc.Code.
|
|
567
|
-
#
|
|
568
|
-
# cancellation succeeded or whether the operation completed despite cancellation.
|
|
591
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
|
592
|
+
# longer interested in the operation result. It does not cancel the operation.
|
|
593
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
|
594
|
+
# UNIMPLEMENTED`.
|
|
569
595
|
# @param [String] name
|
|
570
|
-
# The name of the operation resource to be
|
|
596
|
+
# The name of the operation resource to be deleted.
|
|
571
597
|
# @param [String] fields
|
|
572
598
|
# Selector specifying which fields to include in a partial response.
|
|
573
599
|
# @param [String] quota_user
|
|
@@ -585,8 +611,8 @@ module Google
|
|
|
585
611
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
586
612
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
587
613
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
588
|
-
def
|
|
589
|
-
command = make_simple_command(:
|
|
614
|
+
def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
615
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
|
590
616
|
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
|
|
591
617
|
command.response_class = Google::Apis::DataprocV1::Empty
|
|
592
618
|
command.params['name'] = name unless name.nil?
|
|
@@ -595,12 +621,16 @@ module Google
|
|
|
595
621
|
execute_or_queue_command(command, &block)
|
|
596
622
|
end
|
|
597
623
|
|
|
598
|
-
#
|
|
599
|
-
#
|
|
600
|
-
#
|
|
601
|
-
#
|
|
624
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
|
625
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
|
626
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
|
627
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
|
628
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
|
629
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
|
630
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
|
631
|
+
# corresponding to `Code.CANCELLED`.
|
|
602
632
|
# @param [String] name
|
|
603
|
-
# The name of the operation resource to be
|
|
633
|
+
# The name of the operation resource to be cancelled.
|
|
604
634
|
# @param [String] fields
|
|
605
635
|
# Selector specifying which fields to include in a partial response.
|
|
606
636
|
# @param [String] quota_user
|
|
@@ -618,8 +648,8 @@ module Google
|
|
|
618
648
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
619
649
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
620
650
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
621
|
-
def
|
|
622
|
-
command = make_simple_command(:
|
|
651
|
+
def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
652
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
|
623
653
|
command.response_representation = Google::Apis::DataprocV1::Empty::Representation
|
|
624
654
|
command.response_class = Google::Apis::DataprocV1::Empty
|
|
625
655
|
command.params['name'] = name unless name.nil?
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Copyright 2015 Google Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'google/apis/datastore_v1/service.rb'
|
|
16
|
+
require 'google/apis/datastore_v1/classes.rb'
|
|
17
|
+
require 'google/apis/datastore_v1/representations.rb'
|
|
18
|
+
|
|
19
|
+
module Google
|
|
20
|
+
module Apis
|
|
21
|
+
# Google Cloud Datastore API
|
|
22
|
+
#
|
|
23
|
+
# Accesses the schemaless NoSQL database to provide fully managed, robust,
|
|
24
|
+
# scalable storage for your application.
|
|
25
|
+
#
|
|
26
|
+
# @see https://cloud.google.com/datastore/
|
|
27
|
+
module DatastoreV1
|
|
28
|
+
VERSION = 'V1'
|
|
29
|
+
REVISION = '20161025'
|
|
30
|
+
|
|
31
|
+
# View and manage your data across Google Cloud Platform services
|
|
32
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
33
|
+
|
|
34
|
+
# View and manage your Google Cloud Datastore data
|
|
35
|
+
AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,1284 @@
|
|
|
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 DatastoreV1
|
|
24
|
+
|
|
25
|
+
# A message that can hold any of the supported value types and associated
|
|
26
|
+
# metadata.
|
|
27
|
+
class Value
|
|
28
|
+
include Google::Apis::Core::Hashable
|
|
29
|
+
|
|
30
|
+
# A UTF-8 encoded string value.
|
|
31
|
+
# When `exclude_from_indexes` is false (it is indexed) , may have at most 1500
|
|
32
|
+
# bytes.
|
|
33
|
+
# Otherwise, may be set to at least 1,000,000 bytes.
|
|
34
|
+
# Corresponds to the JSON property `stringValue`
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :string_value
|
|
37
|
+
|
|
38
|
+
# An array value.
|
|
39
|
+
# Corresponds to the JSON property `arrayValue`
|
|
40
|
+
# @return [Google::Apis::DatastoreV1::ArrayValue]
|
|
41
|
+
attr_accessor :array_value
|
|
42
|
+
|
|
43
|
+
# A Datastore data object.
|
|
44
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
45
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
46
|
+
# message.
|
|
47
|
+
# Corresponds to the JSON property `entityValue`
|
|
48
|
+
# @return [Google::Apis::DatastoreV1::Entity]
|
|
49
|
+
attr_accessor :entity_value
|
|
50
|
+
|
|
51
|
+
# The `meaning` field should only be populated for backwards compatibility.
|
|
52
|
+
# Corresponds to the JSON property `meaning`
|
|
53
|
+
# @return [Fixnum]
|
|
54
|
+
attr_accessor :meaning
|
|
55
|
+
|
|
56
|
+
# An integer value.
|
|
57
|
+
# Corresponds to the JSON property `integerValue`
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :integer_value
|
|
60
|
+
|
|
61
|
+
# A double value.
|
|
62
|
+
# Corresponds to the JSON property `doubleValue`
|
|
63
|
+
# @return [Float]
|
|
64
|
+
attr_accessor :double_value
|
|
65
|
+
|
|
66
|
+
# A blob value.
|
|
67
|
+
# May have at most 1,000,000 bytes.
|
|
68
|
+
# When `exclude_from_indexes` is false, may have at most 1500 bytes.
|
|
69
|
+
# In JSON requests, must be base64-encoded.
|
|
70
|
+
# Corresponds to the JSON property `blobValue`
|
|
71
|
+
# @return [String]
|
|
72
|
+
attr_accessor :blob_value
|
|
73
|
+
|
|
74
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
|
75
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
|
76
|
+
# specified otherwise, this must conform to the
|
|
77
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
|
78
|
+
# standard</a>. Values must be within normalized ranges.
|
|
79
|
+
# Example of normalization code in Python:
|
|
80
|
+
# def NormalizeLongitude(longitude):
|
|
81
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
|
82
|
+
# q, r = divmod(longitude, 360.0)
|
|
83
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
|
84
|
+
# return r - 360.0
|
|
85
|
+
# return r
|
|
86
|
+
# def NormalizeLatLng(latitude, longitude):
|
|
87
|
+
# """Wraps decimal degrees latitude and longitude to
|
|
88
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
|
89
|
+
# r = latitude % 360.0
|
|
90
|
+
# if r <= 90.0:
|
|
91
|
+
# return r, NormalizeLongitude(longitude)
|
|
92
|
+
# elif r >= 270.0:
|
|
93
|
+
# return r - 360, NormalizeLongitude(longitude)
|
|
94
|
+
# else:
|
|
95
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
|
96
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
|
97
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
|
98
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
|
99
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
|
100
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
|
101
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
|
102
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
|
103
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
|
104
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
|
105
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
|
106
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
|
107
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
|
108
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
|
109
|
+
# Corresponds to the JSON property `geoPointValue`
|
|
110
|
+
# @return [Google::Apis::DatastoreV1::LatLng]
|
|
111
|
+
attr_accessor :geo_point_value
|
|
112
|
+
|
|
113
|
+
# A null value.
|
|
114
|
+
# Corresponds to the JSON property `nullValue`
|
|
115
|
+
# @return [String]
|
|
116
|
+
attr_accessor :null_value
|
|
117
|
+
|
|
118
|
+
# A boolean value.
|
|
119
|
+
# Corresponds to the JSON property `booleanValue`
|
|
120
|
+
# @return [Boolean]
|
|
121
|
+
attr_accessor :boolean_value
|
|
122
|
+
alias_method :boolean_value?, :boolean_value
|
|
123
|
+
|
|
124
|
+
# A unique identifier for an entity.
|
|
125
|
+
# If a key's partition ID or any of its path kinds or names are
|
|
126
|
+
# reserved/read-only, the key is reserved/read-only.
|
|
127
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
|
128
|
+
# Corresponds to the JSON property `keyValue`
|
|
129
|
+
# @return [Google::Apis::DatastoreV1::Key]
|
|
130
|
+
attr_accessor :key_value
|
|
131
|
+
|
|
132
|
+
# If the value should be excluded from all indexes including those defined
|
|
133
|
+
# explicitly.
|
|
134
|
+
# Corresponds to the JSON property `excludeFromIndexes`
|
|
135
|
+
# @return [Boolean]
|
|
136
|
+
attr_accessor :exclude_from_indexes
|
|
137
|
+
alias_method :exclude_from_indexes?, :exclude_from_indexes
|
|
138
|
+
|
|
139
|
+
# A timestamp value.
|
|
140
|
+
# When stored in the Datastore, precise only to microseconds;
|
|
141
|
+
# any additional precision is rounded down.
|
|
142
|
+
# Corresponds to the JSON property `timestampValue`
|
|
143
|
+
# @return [String]
|
|
144
|
+
attr_accessor :timestamp_value
|
|
145
|
+
|
|
146
|
+
def initialize(**args)
|
|
147
|
+
update!(**args)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Update properties of this object
|
|
151
|
+
def update!(**args)
|
|
152
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
|
153
|
+
@array_value = args[:array_value] if args.key?(:array_value)
|
|
154
|
+
@entity_value = args[:entity_value] if args.key?(:entity_value)
|
|
155
|
+
@meaning = args[:meaning] if args.key?(:meaning)
|
|
156
|
+
@integer_value = args[:integer_value] if args.key?(:integer_value)
|
|
157
|
+
@double_value = args[:double_value] if args.key?(:double_value)
|
|
158
|
+
@blob_value = args[:blob_value] if args.key?(:blob_value)
|
|
159
|
+
@geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
|
|
160
|
+
@null_value = args[:null_value] if args.key?(:null_value)
|
|
161
|
+
@boolean_value = args[:boolean_value] if args.key?(:boolean_value)
|
|
162
|
+
@key_value = args[:key_value] if args.key?(:key_value)
|
|
163
|
+
@exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes)
|
|
164
|
+
@timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# The options shared by read requests.
|
|
169
|
+
class ReadOptions
|
|
170
|
+
include Google::Apis::Core::Hashable
|
|
171
|
+
|
|
172
|
+
# The identifier of the transaction in which to read. A
|
|
173
|
+
# transaction identifier is returned by a call to
|
|
174
|
+
# Datastore.BeginTransaction.
|
|
175
|
+
# Corresponds to the JSON property `transaction`
|
|
176
|
+
# @return [String]
|
|
177
|
+
attr_accessor :transaction
|
|
178
|
+
|
|
179
|
+
# The non-transactional read consistency to use.
|
|
180
|
+
# Cannot be set to `STRONG` for global queries.
|
|
181
|
+
# Corresponds to the JSON property `readConsistency`
|
|
182
|
+
# @return [String]
|
|
183
|
+
attr_accessor :read_consistency
|
|
184
|
+
|
|
185
|
+
def initialize(**args)
|
|
186
|
+
update!(**args)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Update properties of this object
|
|
190
|
+
def update!(**args)
|
|
191
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
|
192
|
+
@read_consistency = args[:read_consistency] if args.key?(:read_consistency)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# The desired order for a specific property.
|
|
197
|
+
class PropertyOrder
|
|
198
|
+
include Google::Apis::Core::Hashable
|
|
199
|
+
|
|
200
|
+
# The direction to order by. Defaults to `ASCENDING`.
|
|
201
|
+
# Corresponds to the JSON property `direction`
|
|
202
|
+
# @return [String]
|
|
203
|
+
attr_accessor :direction
|
|
204
|
+
|
|
205
|
+
# A reference to a property relative to the kind expressions.
|
|
206
|
+
# Corresponds to the JSON property `property`
|
|
207
|
+
# @return [Google::Apis::DatastoreV1::PropertyReference]
|
|
208
|
+
attr_accessor :property
|
|
209
|
+
|
|
210
|
+
def initialize(**args)
|
|
211
|
+
update!(**args)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Update properties of this object
|
|
215
|
+
def update!(**args)
|
|
216
|
+
@direction = args[:direction] if args.key?(:direction)
|
|
217
|
+
@property = args[:property] if args.key?(:property)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# The request for Datastore.Commit.
|
|
222
|
+
class CommitRequest
|
|
223
|
+
include Google::Apis::Core::Hashable
|
|
224
|
+
|
|
225
|
+
# The identifier of the transaction associated with the commit. A
|
|
226
|
+
# transaction identifier is returned by a call to
|
|
227
|
+
# Datastore.BeginTransaction.
|
|
228
|
+
# Corresponds to the JSON property `transaction`
|
|
229
|
+
# @return [String]
|
|
230
|
+
attr_accessor :transaction
|
|
231
|
+
|
|
232
|
+
# The type of commit to perform. Defaults to `TRANSACTIONAL`.
|
|
233
|
+
# Corresponds to the JSON property `mode`
|
|
234
|
+
# @return [String]
|
|
235
|
+
attr_accessor :mode
|
|
236
|
+
|
|
237
|
+
# The mutations to perform.
|
|
238
|
+
# When mode is `TRANSACTIONAL`, mutations affecting a single entity are
|
|
239
|
+
# applied in order. The following sequences of mutations affecting a single
|
|
240
|
+
# entity are not permitted in a single `Commit` request:
|
|
241
|
+
# - `insert` followed by `insert`
|
|
242
|
+
# - `update` followed by `insert`
|
|
243
|
+
# - `upsert` followed by `insert`
|
|
244
|
+
# - `delete` followed by `update`
|
|
245
|
+
# When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
|
|
246
|
+
# entity.
|
|
247
|
+
# Corresponds to the JSON property `mutations`
|
|
248
|
+
# @return [Array<Google::Apis::DatastoreV1::Mutation>]
|
|
249
|
+
attr_accessor :mutations
|
|
250
|
+
|
|
251
|
+
def initialize(**args)
|
|
252
|
+
update!(**args)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Update properties of this object
|
|
256
|
+
def update!(**args)
|
|
257
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
|
258
|
+
@mode = args[:mode] if args.key?(:mode)
|
|
259
|
+
@mutations = args[:mutations] if args.key?(:mutations)
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# A query for entities.
|
|
264
|
+
class Query
|
|
265
|
+
include Google::Apis::Core::Hashable
|
|
266
|
+
|
|
267
|
+
# The maximum number of results to return. Applies after all other
|
|
268
|
+
# constraints. Optional.
|
|
269
|
+
# Unspecified is interpreted as no limit.
|
|
270
|
+
# Must be >= 0 if specified.
|
|
271
|
+
# Corresponds to the JSON property `limit`
|
|
272
|
+
# @return [Fixnum]
|
|
273
|
+
attr_accessor :limit
|
|
274
|
+
|
|
275
|
+
# A holder for any type of filter.
|
|
276
|
+
# Corresponds to the JSON property `filter`
|
|
277
|
+
# @return [Google::Apis::DatastoreV1::Filter]
|
|
278
|
+
attr_accessor :filter
|
|
279
|
+
|
|
280
|
+
# An ending point for the query results. Query cursors are
|
|
281
|
+
# returned in query result batches and
|
|
282
|
+
# [can only be used to limit the same query](https://cloud.google.com/datastore/
|
|
283
|
+
# docs/concepts/queries#cursors_limits_and_offsets).
|
|
284
|
+
# Corresponds to the JSON property `endCursor`
|
|
285
|
+
# @return [String]
|
|
286
|
+
attr_accessor :end_cursor
|
|
287
|
+
|
|
288
|
+
# The properties to make distinct. The query results will contain the first
|
|
289
|
+
# result for each distinct combination of values for the given properties
|
|
290
|
+
# (if empty, all results are returned).
|
|
291
|
+
# Corresponds to the JSON property `distinctOn`
|
|
292
|
+
# @return [Array<Google::Apis::DatastoreV1::PropertyReference>]
|
|
293
|
+
attr_accessor :distinct_on
|
|
294
|
+
|
|
295
|
+
# The number of results to skip. Applies before limit, but after all other
|
|
296
|
+
# constraints. Optional. Must be >= 0 if specified.
|
|
297
|
+
# Corresponds to the JSON property `offset`
|
|
298
|
+
# @return [Fixnum]
|
|
299
|
+
attr_accessor :offset
|
|
300
|
+
|
|
301
|
+
# The projection to return. Defaults to returning all properties.
|
|
302
|
+
# Corresponds to the JSON property `projection`
|
|
303
|
+
# @return [Array<Google::Apis::DatastoreV1::Projection>]
|
|
304
|
+
attr_accessor :projection
|
|
305
|
+
|
|
306
|
+
# The order to apply to the query results (if empty, order is unspecified).
|
|
307
|
+
# Corresponds to the JSON property `order`
|
|
308
|
+
# @return [Array<Google::Apis::DatastoreV1::PropertyOrder>]
|
|
309
|
+
attr_accessor :order
|
|
310
|
+
|
|
311
|
+
# A starting point for the query results. Query cursors are
|
|
312
|
+
# returned in query result batches and
|
|
313
|
+
# [can only be used to continue the same query](https://cloud.google.com/
|
|
314
|
+
# datastore/docs/concepts/queries#cursors_limits_and_offsets).
|
|
315
|
+
# Corresponds to the JSON property `startCursor`
|
|
316
|
+
# @return [String]
|
|
317
|
+
attr_accessor :start_cursor
|
|
318
|
+
|
|
319
|
+
# The kinds to query (if empty, returns entities of all kinds).
|
|
320
|
+
# Currently at most 1 kind may be specified.
|
|
321
|
+
# Corresponds to the JSON property `kind`
|
|
322
|
+
# @return [Array<Google::Apis::DatastoreV1::KindExpression>]
|
|
323
|
+
attr_accessor :kind
|
|
324
|
+
|
|
325
|
+
def initialize(**args)
|
|
326
|
+
update!(**args)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Update properties of this object
|
|
330
|
+
def update!(**args)
|
|
331
|
+
@limit = args[:limit] if args.key?(:limit)
|
|
332
|
+
@filter = args[:filter] if args.key?(:filter)
|
|
333
|
+
@end_cursor = args[:end_cursor] if args.key?(:end_cursor)
|
|
334
|
+
@distinct_on = args[:distinct_on] if args.key?(:distinct_on)
|
|
335
|
+
@offset = args[:offset] if args.key?(:offset)
|
|
336
|
+
@projection = args[:projection] if args.key?(:projection)
|
|
337
|
+
@order = args[:order] if args.key?(:order)
|
|
338
|
+
@start_cursor = args[:start_cursor] if args.key?(:start_cursor)
|
|
339
|
+
@kind = args[:kind] if args.key?(:kind)
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# The request for Datastore.Rollback.
|
|
344
|
+
class RollbackRequest
|
|
345
|
+
include Google::Apis::Core::Hashable
|
|
346
|
+
|
|
347
|
+
# The transaction identifier, returned by a call to
|
|
348
|
+
# Datastore.BeginTransaction.
|
|
349
|
+
# Corresponds to the JSON property `transaction`
|
|
350
|
+
# @return [String]
|
|
351
|
+
attr_accessor :transaction
|
|
352
|
+
|
|
353
|
+
def initialize(**args)
|
|
354
|
+
update!(**args)
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Update properties of this object
|
|
358
|
+
def update!(**args)
|
|
359
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
|
360
|
+
end
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# The result of fetching an entity from Datastore.
|
|
364
|
+
class EntityResult
|
|
365
|
+
include Google::Apis::Core::Hashable
|
|
366
|
+
|
|
367
|
+
# A cursor that points to the position after the result entity.
|
|
368
|
+
# Set only when the `EntityResult` is part of a `QueryResultBatch` message.
|
|
369
|
+
# Corresponds to the JSON property `cursor`
|
|
370
|
+
# @return [String]
|
|
371
|
+
attr_accessor :cursor
|
|
372
|
+
|
|
373
|
+
# A Datastore data object.
|
|
374
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
375
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
376
|
+
# message.
|
|
377
|
+
# Corresponds to the JSON property `entity`
|
|
378
|
+
# @return [Google::Apis::DatastoreV1::Entity]
|
|
379
|
+
attr_accessor :entity
|
|
380
|
+
|
|
381
|
+
# The version of the entity, a strictly positive number that monotonically
|
|
382
|
+
# increases with changes to the entity.
|
|
383
|
+
# This field is set for `FULL` entity
|
|
384
|
+
# results.
|
|
385
|
+
# For missing entities in `LookupResponse`, this
|
|
386
|
+
# is the version of the snapshot that was used to look up the entity, and it
|
|
387
|
+
# is always set except for eventually consistent reads.
|
|
388
|
+
# Corresponds to the JSON property `version`
|
|
389
|
+
# @return [String]
|
|
390
|
+
attr_accessor :version
|
|
391
|
+
|
|
392
|
+
def initialize(**args)
|
|
393
|
+
update!(**args)
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Update properties of this object
|
|
397
|
+
def update!(**args)
|
|
398
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
|
399
|
+
@entity = args[:entity] if args.key?(:entity)
|
|
400
|
+
@version = args[:version] if args.key?(:version)
|
|
401
|
+
end
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# A binding parameter for a GQL query.
|
|
405
|
+
class GqlQueryParameter
|
|
406
|
+
include Google::Apis::Core::Hashable
|
|
407
|
+
|
|
408
|
+
# A message that can hold any of the supported value types and associated
|
|
409
|
+
# metadata.
|
|
410
|
+
# Corresponds to the JSON property `value`
|
|
411
|
+
# @return [Google::Apis::DatastoreV1::Value]
|
|
412
|
+
attr_accessor :value
|
|
413
|
+
|
|
414
|
+
# A query cursor. Query cursors are returned in query
|
|
415
|
+
# result batches.
|
|
416
|
+
# Corresponds to the JSON property `cursor`
|
|
417
|
+
# @return [String]
|
|
418
|
+
attr_accessor :cursor
|
|
419
|
+
|
|
420
|
+
def initialize(**args)
|
|
421
|
+
update!(**args)
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Update properties of this object
|
|
425
|
+
def update!(**args)
|
|
426
|
+
@value = args[:value] if args.key?(:value)
|
|
427
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# An array value.
|
|
432
|
+
class ArrayValue
|
|
433
|
+
include Google::Apis::Core::Hashable
|
|
434
|
+
|
|
435
|
+
# Values in the array.
|
|
436
|
+
# The order of this array may not be preserved if it contains a mix of
|
|
437
|
+
# indexed and unindexed values.
|
|
438
|
+
# Corresponds to the JSON property `values`
|
|
439
|
+
# @return [Array<Google::Apis::DatastoreV1::Value>]
|
|
440
|
+
attr_accessor :values
|
|
441
|
+
|
|
442
|
+
def initialize(**args)
|
|
443
|
+
update!(**args)
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Update properties of this object
|
|
447
|
+
def update!(**args)
|
|
448
|
+
@values = args[:values] if args.key?(:values)
|
|
449
|
+
end
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# A holder for any type of filter.
|
|
453
|
+
class Filter
|
|
454
|
+
include Google::Apis::Core::Hashable
|
|
455
|
+
|
|
456
|
+
# A filter on a specific property.
|
|
457
|
+
# Corresponds to the JSON property `propertyFilter`
|
|
458
|
+
# @return [Google::Apis::DatastoreV1::PropertyFilter]
|
|
459
|
+
attr_accessor :property_filter
|
|
460
|
+
|
|
461
|
+
# A filter that merges multiple other filters using the given operator.
|
|
462
|
+
# Corresponds to the JSON property `compositeFilter`
|
|
463
|
+
# @return [Google::Apis::DatastoreV1::CompositeFilter]
|
|
464
|
+
attr_accessor :composite_filter
|
|
465
|
+
|
|
466
|
+
def initialize(**args)
|
|
467
|
+
update!(**args)
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Update properties of this object
|
|
471
|
+
def update!(**args)
|
|
472
|
+
@property_filter = args[:property_filter] if args.key?(:property_filter)
|
|
473
|
+
@composite_filter = args[:composite_filter] if args.key?(:composite_filter)
|
|
474
|
+
end
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# The response for Datastore.BeginTransaction.
|
|
478
|
+
class BeginTransactionResponse
|
|
479
|
+
include Google::Apis::Core::Hashable
|
|
480
|
+
|
|
481
|
+
# The transaction identifier (always present).
|
|
482
|
+
# Corresponds to the JSON property `transaction`
|
|
483
|
+
# @return [String]
|
|
484
|
+
attr_accessor :transaction
|
|
485
|
+
|
|
486
|
+
def initialize(**args)
|
|
487
|
+
update!(**args)
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# Update properties of this object
|
|
491
|
+
def update!(**args)
|
|
492
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
|
497
|
+
# by project and namespace, however the namespace ID may be empty.
|
|
498
|
+
# A partition ID contains several dimensions:
|
|
499
|
+
# project ID and namespace ID.
|
|
500
|
+
# Partition dimensions:
|
|
501
|
+
# - May be `""`.
|
|
502
|
+
# - Must be valid UTF-8 bytes.
|
|
503
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
|
504
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
|
505
|
+
# reserved/read-only.
|
|
506
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
|
507
|
+
# contexts.
|
|
508
|
+
# Foreign partition IDs (in which the project ID does
|
|
509
|
+
# not match the context project ID ) are discouraged.
|
|
510
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
|
511
|
+
# active state.
|
|
512
|
+
class PartitionId
|
|
513
|
+
include Google::Apis::Core::Hashable
|
|
514
|
+
|
|
515
|
+
# If not empty, the ID of the namespace to which the entities belong.
|
|
516
|
+
# Corresponds to the JSON property `namespaceId`
|
|
517
|
+
# @return [String]
|
|
518
|
+
attr_accessor :namespace_id
|
|
519
|
+
|
|
520
|
+
# The ID of the project to which the entities belong.
|
|
521
|
+
# Corresponds to the JSON property `projectId`
|
|
522
|
+
# @return [String]
|
|
523
|
+
attr_accessor :project_id
|
|
524
|
+
|
|
525
|
+
def initialize(**args)
|
|
526
|
+
update!(**args)
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# Update properties of this object
|
|
530
|
+
def update!(**args)
|
|
531
|
+
@namespace_id = args[:namespace_id] if args.key?(:namespace_id)
|
|
532
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# A batch of results produced by a query.
|
|
537
|
+
class QueryResultBatch
|
|
538
|
+
include Google::Apis::Core::Hashable
|
|
539
|
+
|
|
540
|
+
# The version number of the snapshot this batch was returned from.
|
|
541
|
+
# This applies to the range of results from the query's `start_cursor` (or
|
|
542
|
+
# the beginning of the query if no cursor was given) to this batch's
|
|
543
|
+
# `end_cursor` (not the query's `end_cursor`).
|
|
544
|
+
# In a single transaction, subsequent query result batches for the same query
|
|
545
|
+
# can have a greater snapshot version number. Each batch's snapshot version
|
|
546
|
+
# is valid for all preceding batches.
|
|
547
|
+
# Corresponds to the JSON property `snapshotVersion`
|
|
548
|
+
# @return [String]
|
|
549
|
+
attr_accessor :snapshot_version
|
|
550
|
+
|
|
551
|
+
# A cursor that points to the position after the last result in the batch.
|
|
552
|
+
# Corresponds to the JSON property `endCursor`
|
|
553
|
+
# @return [String]
|
|
554
|
+
attr_accessor :end_cursor
|
|
555
|
+
|
|
556
|
+
# A cursor that points to the position after the last skipped result.
|
|
557
|
+
# Will be set when `skipped_results` != 0.
|
|
558
|
+
# Corresponds to the JSON property `skippedCursor`
|
|
559
|
+
# @return [String]
|
|
560
|
+
attr_accessor :skipped_cursor
|
|
561
|
+
|
|
562
|
+
# The result type for every entity in `entity_results`.
|
|
563
|
+
# Corresponds to the JSON property `entityResultType`
|
|
564
|
+
# @return [String]
|
|
565
|
+
attr_accessor :entity_result_type
|
|
566
|
+
|
|
567
|
+
# The state of the query after the current batch.
|
|
568
|
+
# Corresponds to the JSON property `moreResults`
|
|
569
|
+
# @return [String]
|
|
570
|
+
attr_accessor :more_results
|
|
571
|
+
|
|
572
|
+
# The results for this batch.
|
|
573
|
+
# Corresponds to the JSON property `entityResults`
|
|
574
|
+
# @return [Array<Google::Apis::DatastoreV1::EntityResult>]
|
|
575
|
+
attr_accessor :entity_results
|
|
576
|
+
|
|
577
|
+
# The number of results skipped, typically because of an offset.
|
|
578
|
+
# Corresponds to the JSON property `skippedResults`
|
|
579
|
+
# @return [Fixnum]
|
|
580
|
+
attr_accessor :skipped_results
|
|
581
|
+
|
|
582
|
+
def initialize(**args)
|
|
583
|
+
update!(**args)
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# Update properties of this object
|
|
587
|
+
def update!(**args)
|
|
588
|
+
@snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
|
|
589
|
+
@end_cursor = args[:end_cursor] if args.key?(:end_cursor)
|
|
590
|
+
@skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
|
|
591
|
+
@entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
|
|
592
|
+
@more_results = args[:more_results] if args.key?(:more_results)
|
|
593
|
+
@entity_results = args[:entity_results] if args.key?(:entity_results)
|
|
594
|
+
@skipped_results = args[:skipped_results] if args.key?(:skipped_results)
|
|
595
|
+
end
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# The request for Datastore.AllocateIds.
|
|
599
|
+
class AllocateIdsRequest
|
|
600
|
+
include Google::Apis::Core::Hashable
|
|
601
|
+
|
|
602
|
+
# A list of keys with incomplete key paths for which to allocate IDs.
|
|
603
|
+
# No key may be reserved/read-only.
|
|
604
|
+
# Corresponds to the JSON property `keys`
|
|
605
|
+
# @return [Array<Google::Apis::DatastoreV1::Key>]
|
|
606
|
+
attr_accessor :keys
|
|
607
|
+
|
|
608
|
+
def initialize(**args)
|
|
609
|
+
update!(**args)
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
# Update properties of this object
|
|
613
|
+
def update!(**args)
|
|
614
|
+
@keys = args[:keys] if args.key?(:keys)
|
|
615
|
+
end
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# A representation of a kind.
|
|
619
|
+
class KindExpression
|
|
620
|
+
include Google::Apis::Core::Hashable
|
|
621
|
+
|
|
622
|
+
# The name of the kind.
|
|
623
|
+
# Corresponds to the JSON property `name`
|
|
624
|
+
# @return [String]
|
|
625
|
+
attr_accessor :name
|
|
626
|
+
|
|
627
|
+
def initialize(**args)
|
|
628
|
+
update!(**args)
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
# Update properties of this object
|
|
632
|
+
def update!(**args)
|
|
633
|
+
@name = args[:name] if args.key?(:name)
|
|
634
|
+
end
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
# A filter on a specific property.
|
|
638
|
+
class PropertyFilter
|
|
639
|
+
include Google::Apis::Core::Hashable
|
|
640
|
+
|
|
641
|
+
# A message that can hold any of the supported value types and associated
|
|
642
|
+
# metadata.
|
|
643
|
+
# Corresponds to the JSON property `value`
|
|
644
|
+
# @return [Google::Apis::DatastoreV1::Value]
|
|
645
|
+
attr_accessor :value
|
|
646
|
+
|
|
647
|
+
# The operator to filter by.
|
|
648
|
+
# Corresponds to the JSON property `op`
|
|
649
|
+
# @return [String]
|
|
650
|
+
attr_accessor :op
|
|
651
|
+
|
|
652
|
+
# A reference to a property relative to the kind expressions.
|
|
653
|
+
# Corresponds to the JSON property `property`
|
|
654
|
+
# @return [Google::Apis::DatastoreV1::PropertyReference]
|
|
655
|
+
attr_accessor :property
|
|
656
|
+
|
|
657
|
+
def initialize(**args)
|
|
658
|
+
update!(**args)
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# Update properties of this object
|
|
662
|
+
def update!(**args)
|
|
663
|
+
@value = args[:value] if args.key?(:value)
|
|
664
|
+
@op = args[:op] if args.key?(:op)
|
|
665
|
+
@property = args[:property] if args.key?(:property)
|
|
666
|
+
end
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
# A (kind, ID/name) pair used to construct a key path.
|
|
670
|
+
# If either name or ID is set, the element is complete.
|
|
671
|
+
# If neither is set, the element is incomplete.
|
|
672
|
+
class PathElement
|
|
673
|
+
include Google::Apis::Core::Hashable
|
|
674
|
+
|
|
675
|
+
# The kind of the entity.
|
|
676
|
+
# A kind matching regex `__.*__` is reserved/read-only.
|
|
677
|
+
# A kind must not contain more than 1500 bytes when UTF-8 encoded.
|
|
678
|
+
# Cannot be `""`.
|
|
679
|
+
# Corresponds to the JSON property `kind`
|
|
680
|
+
# @return [String]
|
|
681
|
+
attr_accessor :kind
|
|
682
|
+
|
|
683
|
+
# The auto-allocated ID of the entity.
|
|
684
|
+
# Never equal to zero. Values less than zero are discouraged and may not
|
|
685
|
+
# be supported in the future.
|
|
686
|
+
# Corresponds to the JSON property `id`
|
|
687
|
+
# @return [String]
|
|
688
|
+
attr_accessor :id
|
|
689
|
+
|
|
690
|
+
# The name of the entity.
|
|
691
|
+
# A name matching regex `__.*__` is reserved/read-only.
|
|
692
|
+
# A name must not be more than 1500 bytes when UTF-8 encoded.
|
|
693
|
+
# Cannot be `""`.
|
|
694
|
+
# Corresponds to the JSON property `name`
|
|
695
|
+
# @return [String]
|
|
696
|
+
attr_accessor :name
|
|
697
|
+
|
|
698
|
+
def initialize(**args)
|
|
699
|
+
update!(**args)
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
# Update properties of this object
|
|
703
|
+
def update!(**args)
|
|
704
|
+
@kind = args[:kind] if args.key?(:kind)
|
|
705
|
+
@id = args[:id] if args.key?(:id)
|
|
706
|
+
@name = args[:name] if args.key?(:name)
|
|
707
|
+
end
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
# The response for Datastore.Rollback.
|
|
711
|
+
# (an empty message).
|
|
712
|
+
class RollbackResponse
|
|
713
|
+
include Google::Apis::Core::Hashable
|
|
714
|
+
|
|
715
|
+
def initialize(**args)
|
|
716
|
+
update!(**args)
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
# Update properties of this object
|
|
720
|
+
def update!(**args)
|
|
721
|
+
end
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
# A reference to a property relative to the kind expressions.
|
|
725
|
+
class PropertyReference
|
|
726
|
+
include Google::Apis::Core::Hashable
|
|
727
|
+
|
|
728
|
+
# The name of the property.
|
|
729
|
+
# If name includes "."s, it may be interpreted as a property name path.
|
|
730
|
+
# Corresponds to the JSON property `name`
|
|
731
|
+
# @return [String]
|
|
732
|
+
attr_accessor :name
|
|
733
|
+
|
|
734
|
+
def initialize(**args)
|
|
735
|
+
update!(**args)
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
# Update properties of this object
|
|
739
|
+
def update!(**args)
|
|
740
|
+
@name = args[:name] if args.key?(:name)
|
|
741
|
+
end
|
|
742
|
+
end
|
|
743
|
+
|
|
744
|
+
# A representation of a property in a projection.
|
|
745
|
+
class Projection
|
|
746
|
+
include Google::Apis::Core::Hashable
|
|
747
|
+
|
|
748
|
+
# A reference to a property relative to the kind expressions.
|
|
749
|
+
# Corresponds to the JSON property `property`
|
|
750
|
+
# @return [Google::Apis::DatastoreV1::PropertyReference]
|
|
751
|
+
attr_accessor :property
|
|
752
|
+
|
|
753
|
+
def initialize(**args)
|
|
754
|
+
update!(**args)
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# Update properties of this object
|
|
758
|
+
def update!(**args)
|
|
759
|
+
@property = args[:property] if args.key?(:property)
|
|
760
|
+
end
|
|
761
|
+
end
|
|
762
|
+
|
|
763
|
+
# The result of applying a mutation.
|
|
764
|
+
class MutationResult
|
|
765
|
+
include Google::Apis::Core::Hashable
|
|
766
|
+
|
|
767
|
+
# Whether a conflict was detected for this mutation. Always false when a
|
|
768
|
+
# conflict detection strategy field is not set in the mutation.
|
|
769
|
+
# Corresponds to the JSON property `conflictDetected`
|
|
770
|
+
# @return [Boolean]
|
|
771
|
+
attr_accessor :conflict_detected
|
|
772
|
+
alias_method :conflict_detected?, :conflict_detected
|
|
773
|
+
|
|
774
|
+
# A unique identifier for an entity.
|
|
775
|
+
# If a key's partition ID or any of its path kinds or names are
|
|
776
|
+
# reserved/read-only, the key is reserved/read-only.
|
|
777
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
|
778
|
+
# Corresponds to the JSON property `key`
|
|
779
|
+
# @return [Google::Apis::DatastoreV1::Key]
|
|
780
|
+
attr_accessor :key
|
|
781
|
+
|
|
782
|
+
# The version of the entity on the server after processing the mutation. If
|
|
783
|
+
# the mutation doesn't change anything on the server, then the version will
|
|
784
|
+
# be the version of the current entity or, if no entity is present, a version
|
|
785
|
+
# that is strictly greater than the version of any previous entity and less
|
|
786
|
+
# than the version of any possible future entity.
|
|
787
|
+
# Corresponds to the JSON property `version`
|
|
788
|
+
# @return [String]
|
|
789
|
+
attr_accessor :version
|
|
790
|
+
|
|
791
|
+
def initialize(**args)
|
|
792
|
+
update!(**args)
|
|
793
|
+
end
|
|
794
|
+
|
|
795
|
+
# Update properties of this object
|
|
796
|
+
def update!(**args)
|
|
797
|
+
@conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
|
|
798
|
+
@key = args[:key] if args.key?(:key)
|
|
799
|
+
@version = args[:version] if args.key?(:version)
|
|
800
|
+
end
|
|
801
|
+
end
|
|
802
|
+
|
|
803
|
+
# The response for Datastore.AllocateIds.
|
|
804
|
+
class AllocateIdsResponse
|
|
805
|
+
include Google::Apis::Core::Hashable
|
|
806
|
+
|
|
807
|
+
# The keys specified in the request (in the same order), each with
|
|
808
|
+
# its key path completed with a newly allocated ID.
|
|
809
|
+
# Corresponds to the JSON property `keys`
|
|
810
|
+
# @return [Array<Google::Apis::DatastoreV1::Key>]
|
|
811
|
+
attr_accessor :keys
|
|
812
|
+
|
|
813
|
+
def initialize(**args)
|
|
814
|
+
update!(**args)
|
|
815
|
+
end
|
|
816
|
+
|
|
817
|
+
# Update properties of this object
|
|
818
|
+
def update!(**args)
|
|
819
|
+
@keys = args[:keys] if args.key?(:keys)
|
|
820
|
+
end
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
# The response for Datastore.Lookup.
|
|
824
|
+
class LookupResponse
|
|
825
|
+
include Google::Apis::Core::Hashable
|
|
826
|
+
|
|
827
|
+
# Entities found as `ResultType.FULL` entities. The order of results in this
|
|
828
|
+
# field is undefined and has no relation to the order of the keys in the
|
|
829
|
+
# input.
|
|
830
|
+
# Corresponds to the JSON property `found`
|
|
831
|
+
# @return [Array<Google::Apis::DatastoreV1::EntityResult>]
|
|
832
|
+
attr_accessor :found
|
|
833
|
+
|
|
834
|
+
# Entities not found as `ResultType.KEY_ONLY` entities. The order of results
|
|
835
|
+
# in this field is undefined and has no relation to the order of the keys
|
|
836
|
+
# in the input.
|
|
837
|
+
# Corresponds to the JSON property `missing`
|
|
838
|
+
# @return [Array<Google::Apis::DatastoreV1::EntityResult>]
|
|
839
|
+
attr_accessor :missing
|
|
840
|
+
|
|
841
|
+
# A list of keys that were not looked up due to resource constraints. The
|
|
842
|
+
# order of results in this field is undefined and has no relation to the
|
|
843
|
+
# order of the keys in the input.
|
|
844
|
+
# Corresponds to the JSON property `deferred`
|
|
845
|
+
# @return [Array<Google::Apis::DatastoreV1::Key>]
|
|
846
|
+
attr_accessor :deferred
|
|
847
|
+
|
|
848
|
+
def initialize(**args)
|
|
849
|
+
update!(**args)
|
|
850
|
+
end
|
|
851
|
+
|
|
852
|
+
# Update properties of this object
|
|
853
|
+
def update!(**args)
|
|
854
|
+
@found = args[:found] if args.key?(:found)
|
|
855
|
+
@missing = args[:missing] if args.key?(:missing)
|
|
856
|
+
@deferred = args[:deferred] if args.key?(:deferred)
|
|
857
|
+
end
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# The request for Datastore.BeginTransaction.
|
|
861
|
+
class BeginTransactionRequest
|
|
862
|
+
include Google::Apis::Core::Hashable
|
|
863
|
+
|
|
864
|
+
def initialize(**args)
|
|
865
|
+
update!(**args)
|
|
866
|
+
end
|
|
867
|
+
|
|
868
|
+
# Update properties of this object
|
|
869
|
+
def update!(**args)
|
|
870
|
+
end
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
# A unique identifier for an entity.
|
|
874
|
+
# If a key's partition ID or any of its path kinds or names are
|
|
875
|
+
# reserved/read-only, the key is reserved/read-only.
|
|
876
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
|
877
|
+
class Key
|
|
878
|
+
include Google::Apis::Core::Hashable
|
|
879
|
+
|
|
880
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
|
881
|
+
# by project and namespace, however the namespace ID may be empty.
|
|
882
|
+
# A partition ID contains several dimensions:
|
|
883
|
+
# project ID and namespace ID.
|
|
884
|
+
# Partition dimensions:
|
|
885
|
+
# - May be `""`.
|
|
886
|
+
# - Must be valid UTF-8 bytes.
|
|
887
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
|
888
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
|
889
|
+
# reserved/read-only.
|
|
890
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
|
891
|
+
# contexts.
|
|
892
|
+
# Foreign partition IDs (in which the project ID does
|
|
893
|
+
# not match the context project ID ) are discouraged.
|
|
894
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
|
895
|
+
# active state.
|
|
896
|
+
# Corresponds to the JSON property `partitionId`
|
|
897
|
+
# @return [Google::Apis::DatastoreV1::PartitionId]
|
|
898
|
+
attr_accessor :partition_id
|
|
899
|
+
|
|
900
|
+
# The entity path.
|
|
901
|
+
# An entity path consists of one or more elements composed of a kind and a
|
|
902
|
+
# string or numerical identifier, which identify entities. The first
|
|
903
|
+
# element identifies a _root entity_, the second element identifies
|
|
904
|
+
# a _child_ of the root entity, the third element identifies a child of the
|
|
905
|
+
# second entity, and so forth. The entities identified by all prefixes of
|
|
906
|
+
# the path are called the element's _ancestors_.
|
|
907
|
+
# An entity path is always fully complete: *all* of the entity's ancestors
|
|
908
|
+
# are required to be in the path along with the entity identifier itself.
|
|
909
|
+
# The only exception is that in some documented cases, the identifier in the
|
|
910
|
+
# last path element (for the entity) itself may be omitted. For example,
|
|
911
|
+
# the last path element of the key of `Mutation.insert` may have no
|
|
912
|
+
# identifier.
|
|
913
|
+
# A path can never be empty, and a path can have at most 100 elements.
|
|
914
|
+
# Corresponds to the JSON property `path`
|
|
915
|
+
# @return [Array<Google::Apis::DatastoreV1::PathElement>]
|
|
916
|
+
attr_accessor :path
|
|
917
|
+
|
|
918
|
+
def initialize(**args)
|
|
919
|
+
update!(**args)
|
|
920
|
+
end
|
|
921
|
+
|
|
922
|
+
# Update properties of this object
|
|
923
|
+
def update!(**args)
|
|
924
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
|
925
|
+
@path = args[:path] if args.key?(:path)
|
|
926
|
+
end
|
|
927
|
+
end
|
|
928
|
+
|
|
929
|
+
# The response for Datastore.RunQuery.
|
|
930
|
+
class RunQueryResponse
|
|
931
|
+
include Google::Apis::Core::Hashable
|
|
932
|
+
|
|
933
|
+
# A batch of results produced by a query.
|
|
934
|
+
# Corresponds to the JSON property `batch`
|
|
935
|
+
# @return [Google::Apis::DatastoreV1::QueryResultBatch]
|
|
936
|
+
attr_accessor :batch
|
|
937
|
+
|
|
938
|
+
# A query for entities.
|
|
939
|
+
# Corresponds to the JSON property `query`
|
|
940
|
+
# @return [Google::Apis::DatastoreV1::Query]
|
|
941
|
+
attr_accessor :query
|
|
942
|
+
|
|
943
|
+
def initialize(**args)
|
|
944
|
+
update!(**args)
|
|
945
|
+
end
|
|
946
|
+
|
|
947
|
+
# Update properties of this object
|
|
948
|
+
def update!(**args)
|
|
949
|
+
@batch = args[:batch] if args.key?(:batch)
|
|
950
|
+
@query = args[:query] if args.key?(:query)
|
|
951
|
+
end
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# A Datastore data object.
|
|
955
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
956
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
957
|
+
# message.
|
|
958
|
+
class Entity
|
|
959
|
+
include Google::Apis::Core::Hashable
|
|
960
|
+
|
|
961
|
+
# The entity's properties.
|
|
962
|
+
# The map's keys are property names.
|
|
963
|
+
# A property name matching regex `__.*__` is reserved.
|
|
964
|
+
# A reserved property name is forbidden in certain documented contexts.
|
|
965
|
+
# The name must not contain more than 500 characters.
|
|
966
|
+
# The name cannot be `""`.
|
|
967
|
+
# Corresponds to the JSON property `properties`
|
|
968
|
+
# @return [Hash<String,Google::Apis::DatastoreV1::Value>]
|
|
969
|
+
attr_accessor :properties
|
|
970
|
+
|
|
971
|
+
# A unique identifier for an entity.
|
|
972
|
+
# If a key's partition ID or any of its path kinds or names are
|
|
973
|
+
# reserved/read-only, the key is reserved/read-only.
|
|
974
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
|
975
|
+
# Corresponds to the JSON property `key`
|
|
976
|
+
# @return [Google::Apis::DatastoreV1::Key]
|
|
977
|
+
attr_accessor :key
|
|
978
|
+
|
|
979
|
+
def initialize(**args)
|
|
980
|
+
update!(**args)
|
|
981
|
+
end
|
|
982
|
+
|
|
983
|
+
# Update properties of this object
|
|
984
|
+
def update!(**args)
|
|
985
|
+
@properties = args[:properties] if args.key?(:properties)
|
|
986
|
+
@key = args[:key] if args.key?(:key)
|
|
987
|
+
end
|
|
988
|
+
end
|
|
989
|
+
|
|
990
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
|
991
|
+
class GqlQuery
|
|
992
|
+
include Google::Apis::Core::Hashable
|
|
993
|
+
|
|
994
|
+
# A string of the format described
|
|
995
|
+
# [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
|
996
|
+
# Corresponds to the JSON property `queryString`
|
|
997
|
+
# @return [String]
|
|
998
|
+
attr_accessor :query_string
|
|
999
|
+
|
|
1000
|
+
# For each non-reserved named binding site in the query string, there must be
|
|
1001
|
+
# a named parameter with that name, but not necessarily the inverse.
|
|
1002
|
+
# Key must match regex `A-Za-z_$*`, must not match regex
|
|
1003
|
+
# `__.*__`, and must not be `""`.
|
|
1004
|
+
# Corresponds to the JSON property `namedBindings`
|
|
1005
|
+
# @return [Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter>]
|
|
1006
|
+
attr_accessor :named_bindings
|
|
1007
|
+
|
|
1008
|
+
# When false, the query string must not contain any literals and instead must
|
|
1009
|
+
# bind all values. For example,
|
|
1010
|
+
# `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
|
|
1011
|
+
# `SELECT * FROM Kind WHERE a = @value` is.
|
|
1012
|
+
# Corresponds to the JSON property `allowLiterals`
|
|
1013
|
+
# @return [Boolean]
|
|
1014
|
+
attr_accessor :allow_literals
|
|
1015
|
+
alias_method :allow_literals?, :allow_literals
|
|
1016
|
+
|
|
1017
|
+
# Numbered binding site @1 references the first numbered parameter,
|
|
1018
|
+
# effectively using 1-based indexing, rather than the usual 0.
|
|
1019
|
+
# For each binding site numbered i in `query_string`, there must be an i-th
|
|
1020
|
+
# numbered parameter. The inverse must also be true.
|
|
1021
|
+
# Corresponds to the JSON property `positionalBindings`
|
|
1022
|
+
# @return [Array<Google::Apis::DatastoreV1::GqlQueryParameter>]
|
|
1023
|
+
attr_accessor :positional_bindings
|
|
1024
|
+
|
|
1025
|
+
def initialize(**args)
|
|
1026
|
+
update!(**args)
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
# Update properties of this object
|
|
1030
|
+
def update!(**args)
|
|
1031
|
+
@query_string = args[:query_string] if args.key?(:query_string)
|
|
1032
|
+
@named_bindings = args[:named_bindings] if args.key?(:named_bindings)
|
|
1033
|
+
@allow_literals = args[:allow_literals] if args.key?(:allow_literals)
|
|
1034
|
+
@positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings)
|
|
1035
|
+
end
|
|
1036
|
+
end
|
|
1037
|
+
|
|
1038
|
+
# A mutation to apply to an entity.
|
|
1039
|
+
class Mutation
|
|
1040
|
+
include Google::Apis::Core::Hashable
|
|
1041
|
+
|
|
1042
|
+
# A Datastore data object.
|
|
1043
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
1044
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
1045
|
+
# message.
|
|
1046
|
+
# Corresponds to the JSON property `insert`
|
|
1047
|
+
# @return [Google::Apis::DatastoreV1::Entity]
|
|
1048
|
+
attr_accessor :insert
|
|
1049
|
+
|
|
1050
|
+
# A Datastore data object.
|
|
1051
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
1052
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
1053
|
+
# message.
|
|
1054
|
+
# Corresponds to the JSON property `update`
|
|
1055
|
+
# @return [Google::Apis::DatastoreV1::Entity]
|
|
1056
|
+
attr_accessor :update
|
|
1057
|
+
|
|
1058
|
+
# The version of the entity that this mutation is being applied to. If this
|
|
1059
|
+
# does not match the current version on the server, the mutation conflicts.
|
|
1060
|
+
# Corresponds to the JSON property `baseVersion`
|
|
1061
|
+
# @return [String]
|
|
1062
|
+
attr_accessor :base_version
|
|
1063
|
+
|
|
1064
|
+
# A Datastore data object.
|
|
1065
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
|
1066
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
|
1067
|
+
# message.
|
|
1068
|
+
# Corresponds to the JSON property `upsert`
|
|
1069
|
+
# @return [Google::Apis::DatastoreV1::Entity]
|
|
1070
|
+
attr_accessor :upsert
|
|
1071
|
+
|
|
1072
|
+
# A unique identifier for an entity.
|
|
1073
|
+
# If a key's partition ID or any of its path kinds or names are
|
|
1074
|
+
# reserved/read-only, the key is reserved/read-only.
|
|
1075
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
|
1076
|
+
# Corresponds to the JSON property `delete`
|
|
1077
|
+
# @return [Google::Apis::DatastoreV1::Key]
|
|
1078
|
+
attr_accessor :delete
|
|
1079
|
+
|
|
1080
|
+
def initialize(**args)
|
|
1081
|
+
update!(**args)
|
|
1082
|
+
end
|
|
1083
|
+
|
|
1084
|
+
# Update properties of this object
|
|
1085
|
+
def update!(**args)
|
|
1086
|
+
@insert = args[:insert] if args.key?(:insert)
|
|
1087
|
+
@update = args[:update] if args.key?(:update)
|
|
1088
|
+
@base_version = args[:base_version] if args.key?(:base_version)
|
|
1089
|
+
@upsert = args[:upsert] if args.key?(:upsert)
|
|
1090
|
+
@delete = args[:delete] if args.key?(:delete)
|
|
1091
|
+
end
|
|
1092
|
+
end
|
|
1093
|
+
|
|
1094
|
+
# The response for Datastore.Commit.
|
|
1095
|
+
class CommitResponse
|
|
1096
|
+
include Google::Apis::Core::Hashable
|
|
1097
|
+
|
|
1098
|
+
# The result of performing the mutations.
|
|
1099
|
+
# The i-th mutation result corresponds to the i-th mutation in the request.
|
|
1100
|
+
# Corresponds to the JSON property `mutationResults`
|
|
1101
|
+
# @return [Array<Google::Apis::DatastoreV1::MutationResult>]
|
|
1102
|
+
attr_accessor :mutation_results
|
|
1103
|
+
|
|
1104
|
+
# The number of index entries updated during the commit, or zero if none were
|
|
1105
|
+
# updated.
|
|
1106
|
+
# Corresponds to the JSON property `indexUpdates`
|
|
1107
|
+
# @return [Fixnum]
|
|
1108
|
+
attr_accessor :index_updates
|
|
1109
|
+
|
|
1110
|
+
def initialize(**args)
|
|
1111
|
+
update!(**args)
|
|
1112
|
+
end
|
|
1113
|
+
|
|
1114
|
+
# Update properties of this object
|
|
1115
|
+
def update!(**args)
|
|
1116
|
+
@mutation_results = args[:mutation_results] if args.key?(:mutation_results)
|
|
1117
|
+
@index_updates = args[:index_updates] if args.key?(:index_updates)
|
|
1118
|
+
end
|
|
1119
|
+
end
|
|
1120
|
+
|
|
1121
|
+
# The request for Datastore.RunQuery.
|
|
1122
|
+
class RunQueryRequest
|
|
1123
|
+
include Google::Apis::Core::Hashable
|
|
1124
|
+
|
|
1125
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
|
1126
|
+
# by project and namespace, however the namespace ID may be empty.
|
|
1127
|
+
# A partition ID contains several dimensions:
|
|
1128
|
+
# project ID and namespace ID.
|
|
1129
|
+
# Partition dimensions:
|
|
1130
|
+
# - May be `""`.
|
|
1131
|
+
# - Must be valid UTF-8 bytes.
|
|
1132
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
|
1133
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
|
1134
|
+
# reserved/read-only.
|
|
1135
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
|
1136
|
+
# contexts.
|
|
1137
|
+
# Foreign partition IDs (in which the project ID does
|
|
1138
|
+
# not match the context project ID ) are discouraged.
|
|
1139
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
|
1140
|
+
# active state.
|
|
1141
|
+
# Corresponds to the JSON property `partitionId`
|
|
1142
|
+
# @return [Google::Apis::DatastoreV1::PartitionId]
|
|
1143
|
+
attr_accessor :partition_id
|
|
1144
|
+
|
|
1145
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
|
1146
|
+
# Corresponds to the JSON property `gqlQuery`
|
|
1147
|
+
# @return [Google::Apis::DatastoreV1::GqlQuery]
|
|
1148
|
+
attr_accessor :gql_query
|
|
1149
|
+
|
|
1150
|
+
# The options shared by read requests.
|
|
1151
|
+
# Corresponds to the JSON property `readOptions`
|
|
1152
|
+
# @return [Google::Apis::DatastoreV1::ReadOptions]
|
|
1153
|
+
attr_accessor :read_options
|
|
1154
|
+
|
|
1155
|
+
# A query for entities.
|
|
1156
|
+
# Corresponds to the JSON property `query`
|
|
1157
|
+
# @return [Google::Apis::DatastoreV1::Query]
|
|
1158
|
+
attr_accessor :query
|
|
1159
|
+
|
|
1160
|
+
def initialize(**args)
|
|
1161
|
+
update!(**args)
|
|
1162
|
+
end
|
|
1163
|
+
|
|
1164
|
+
# Update properties of this object
|
|
1165
|
+
def update!(**args)
|
|
1166
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
|
1167
|
+
@gql_query = args[:gql_query] if args.key?(:gql_query)
|
|
1168
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
|
1169
|
+
@query = args[:query] if args.key?(:query)
|
|
1170
|
+
end
|
|
1171
|
+
end
|
|
1172
|
+
|
|
1173
|
+
# The request for Datastore.Lookup.
|
|
1174
|
+
class LookupRequest
|
|
1175
|
+
include Google::Apis::Core::Hashable
|
|
1176
|
+
|
|
1177
|
+
# The options shared by read requests.
|
|
1178
|
+
# Corresponds to the JSON property `readOptions`
|
|
1179
|
+
# @return [Google::Apis::DatastoreV1::ReadOptions]
|
|
1180
|
+
attr_accessor :read_options
|
|
1181
|
+
|
|
1182
|
+
# Keys of entities to look up.
|
|
1183
|
+
# Corresponds to the JSON property `keys`
|
|
1184
|
+
# @return [Array<Google::Apis::DatastoreV1::Key>]
|
|
1185
|
+
attr_accessor :keys
|
|
1186
|
+
|
|
1187
|
+
def initialize(**args)
|
|
1188
|
+
update!(**args)
|
|
1189
|
+
end
|
|
1190
|
+
|
|
1191
|
+
# Update properties of this object
|
|
1192
|
+
def update!(**args)
|
|
1193
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
|
1194
|
+
@keys = args[:keys] if args.key?(:keys)
|
|
1195
|
+
end
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
|
1199
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
|
1200
|
+
# specified otherwise, this must conform to the
|
|
1201
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
|
1202
|
+
# standard</a>. Values must be within normalized ranges.
|
|
1203
|
+
# Example of normalization code in Python:
|
|
1204
|
+
# def NormalizeLongitude(longitude):
|
|
1205
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
|
1206
|
+
# q, r = divmod(longitude, 360.0)
|
|
1207
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
|
1208
|
+
# return r - 360.0
|
|
1209
|
+
# return r
|
|
1210
|
+
# def NormalizeLatLng(latitude, longitude):
|
|
1211
|
+
# """Wraps decimal degrees latitude and longitude to
|
|
1212
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
|
1213
|
+
# r = latitude % 360.0
|
|
1214
|
+
# if r <= 90.0:
|
|
1215
|
+
# return r, NormalizeLongitude(longitude)
|
|
1216
|
+
# elif r >= 270.0:
|
|
1217
|
+
# return r - 360, NormalizeLongitude(longitude)
|
|
1218
|
+
# else:
|
|
1219
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
|
1220
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
|
1221
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
|
1222
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
|
1223
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
|
1224
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
|
1225
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
|
1226
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
|
1227
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
|
1228
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
|
1229
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
|
1230
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
|
1231
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
|
1232
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
|
1233
|
+
class LatLng
|
|
1234
|
+
include Google::Apis::Core::Hashable
|
|
1235
|
+
|
|
1236
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
|
1237
|
+
# Corresponds to the JSON property `latitude`
|
|
1238
|
+
# @return [Float]
|
|
1239
|
+
attr_accessor :latitude
|
|
1240
|
+
|
|
1241
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
|
1242
|
+
# Corresponds to the JSON property `longitude`
|
|
1243
|
+
# @return [Float]
|
|
1244
|
+
attr_accessor :longitude
|
|
1245
|
+
|
|
1246
|
+
def initialize(**args)
|
|
1247
|
+
update!(**args)
|
|
1248
|
+
end
|
|
1249
|
+
|
|
1250
|
+
# Update properties of this object
|
|
1251
|
+
def update!(**args)
|
|
1252
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
|
1253
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
|
1254
|
+
end
|
|
1255
|
+
end
|
|
1256
|
+
|
|
1257
|
+
# A filter that merges multiple other filters using the given operator.
|
|
1258
|
+
class CompositeFilter
|
|
1259
|
+
include Google::Apis::Core::Hashable
|
|
1260
|
+
|
|
1261
|
+
# The operator for combining multiple filters.
|
|
1262
|
+
# Corresponds to the JSON property `op`
|
|
1263
|
+
# @return [String]
|
|
1264
|
+
attr_accessor :op
|
|
1265
|
+
|
|
1266
|
+
# The list of filters to combine.
|
|
1267
|
+
# Must contain at least one filter.
|
|
1268
|
+
# Corresponds to the JSON property `filters`
|
|
1269
|
+
# @return [Array<Google::Apis::DatastoreV1::Filter>]
|
|
1270
|
+
attr_accessor :filters
|
|
1271
|
+
|
|
1272
|
+
def initialize(**args)
|
|
1273
|
+
update!(**args)
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
# Update properties of this object
|
|
1277
|
+
def update!(**args)
|
|
1278
|
+
@op = args[:op] if args.key?(:op)
|
|
1279
|
+
@filters = args[:filters] if args.key?(:filters)
|
|
1280
|
+
end
|
|
1281
|
+
end
|
|
1282
|
+
end
|
|
1283
|
+
end
|
|
1284
|
+
end
|