google-api-client 0.9.9 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +8 -0
- data/api_names.yaml +62 -55
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +534 -39
- data/generated/google/apis/androidenterprise_v1/representations.rb +222 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +595 -10
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/appengine_v1beta5.rb +1 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +66 -6
- data/generated/google/apis/appengine_v1beta5/representations.rb +29 -0
- data/generated/google/apis/appengine_v1beta5/service.rb +15 -1
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +12 -4
- data/generated/google/apis/bigquery_v2/representations.rb +1 -0
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +77 -0
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +2 -2
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +110 -0
- data/generated/google/apis/cloudbuild_v1/representations.rb +60 -0
- 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 +157 -3
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +678 -17
- data/generated/google/apis/compute_beta/representations.rb +235 -0
- data/generated/google/apis/compute_beta/service.rb +1280 -600
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +34 -13
- data/generated/google/apis/compute_v1/representations.rb +14 -0
- data/generated/google/apis/compute_v1/service.rb +42 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +14 -0
- data/generated/google/apis/content_v2/representations.rb +2 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1237 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +567 -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 +6 -0
- data/generated/google/apis/deploymentmanager_v2/representations.rb +2 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +40 -50
- 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/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/fitness_v1.rb +2 -2
- data/generated/google/apis/fitness_v1/classes.rb +48 -5
- data/generated/google/apis/fitness_v1/representations.rb +18 -0
- data/generated/google/apis/fitness_v1/service.rb +15 -16
- 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 +35 -7
- data/generated/google/apis/genomics_v1/representations.rb +7 -3
- data/generated/google/apis/genomics_v1/service.rb +1 -3
- data/generated/google/apis/gmail_v1.rb +7 -1
- data/generated/google/apis/gmail_v1/classes.rb +543 -0
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- 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 +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +7 -6
- 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/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +14 -8
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +17 -9
- 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/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +8 -2
- data/generated/google/apis/youtube_v3/representations.rb +1 -0
- data/lib/google/apis/core/base_service.rb +3 -2
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/version.rb +1 -1
- data/sync.rb +71 -0
- metadata +11 -2
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @see https://developers.google.com/compute/docs/reference/latest/
|
26
26
|
module ComputeV1
|
27
27
|
VERSION = 'V1'
|
28
|
-
REVISION = '
|
28
|
+
REVISION = '20160628'
|
29
29
|
|
30
30
|
# View and manage your data across Google Cloud Platform services
|
31
31
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -1030,6 +1030,12 @@ module Google
|
|
1030
1030
|
# @return [String]
|
1031
1031
|
attr_accessor :description
|
1032
1032
|
|
1033
|
+
# If true, enable Cloud CDN for this BackendService.
|
1034
|
+
# Corresponds to the JSON property `enableCDN`
|
1035
|
+
# @return [Boolean]
|
1036
|
+
attr_accessor :enable_cdn
|
1037
|
+
alias_method :enable_cdn?, :enable_cdn
|
1038
|
+
|
1033
1039
|
# Fingerprint of this resource. A hash of the contents stored in this object.
|
1034
1040
|
# This field is used in optimistic locking. This field will be ignored when
|
1035
1041
|
# inserting a BackendService. An up-to-date fingerprint must be provided in
|
@@ -1111,6 +1117,7 @@ module Google
|
|
1111
1117
|
@backends = args[:backends] if args.key?(:backends)
|
1112
1118
|
@creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
|
1113
1119
|
@description = args[:description] if args.key?(:description)
|
1120
|
+
@enable_cdn = args[:enable_cdn] if args.key?(:enable_cdn)
|
1114
1121
|
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
|
1115
1122
|
@health_checks = args[:health_checks] if args.key?(:health_checks)
|
1116
1123
|
@id = args[:id] if args.key?(:id)
|
@@ -1155,8 +1162,7 @@ module Google
|
|
1155
1162
|
class BackendServiceList
|
1156
1163
|
include Google::Apis::Core::Hashable
|
1157
1164
|
|
1158
|
-
# [Output Only]
|
1159
|
-
# defined by the server.
|
1165
|
+
# [Output Only] Unique identifier for the resource; defined by the server.
|
1160
1166
|
# Corresponds to the JSON property `id`
|
1161
1167
|
# @return [String]
|
1162
1168
|
attr_accessor :id
|
@@ -1172,11 +1178,7 @@ module Google
|
|
1172
1178
|
# @return [String]
|
1173
1179
|
attr_accessor :kind
|
1174
1180
|
|
1175
|
-
# [Output Only]
|
1176
|
-
# requests. If the number of results is larger than maxResults, use the
|
1177
|
-
# nextPageToken as a value for the query parameter pageToken in the next list
|
1178
|
-
# request. Subsequent list requests will have their own nextPageToken to
|
1179
|
-
# continue paging through the results.
|
1181
|
+
# [Output Only] A token used to continue a truncated list request.
|
1180
1182
|
# Corresponds to the JSON property `nextPageToken`
|
1181
1183
|
# @return [String]
|
1182
1184
|
attr_accessor :next_page_token
|
@@ -1200,18 +1202,37 @@ module Google
|
|
1200
1202
|
end
|
1201
1203
|
end
|
1202
1204
|
|
1205
|
+
#
|
1206
|
+
class CacheInvalidationRule
|
1207
|
+
include Google::Apis::Core::Hashable
|
1208
|
+
|
1209
|
+
#
|
1210
|
+
# Corresponds to the JSON property `path`
|
1211
|
+
# @return [String]
|
1212
|
+
attr_accessor :path
|
1213
|
+
|
1214
|
+
def initialize(**args)
|
1215
|
+
update!(**args)
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
# Update properties of this object
|
1219
|
+
def update!(**args)
|
1220
|
+
@path = args[:path] if args.key?(:path)
|
1221
|
+
end
|
1222
|
+
end
|
1223
|
+
|
1203
1224
|
# Represents a customer-supplied encryption key
|
1204
1225
|
class CustomerEncryptionKey
|
1205
1226
|
include Google::Apis::Core::Hashable
|
1206
1227
|
|
1207
|
-
# Specifies a 256-bit customer-supplied encryption key, encoded in
|
1208
|
-
# either encrypt or decrypt this resource.
|
1228
|
+
# Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
|
1229
|
+
# base64 to either encrypt or decrypt this resource.
|
1209
1230
|
# Corresponds to the JSON property `rawKey`
|
1210
1231
|
# @return [String]
|
1211
1232
|
attr_accessor :raw_key
|
1212
1233
|
|
1213
|
-
# [Output only] The base64 encoded SHA-256 hash of the customer-
|
1214
|
-
# encryption key that protects this resource.
|
1234
|
+
# [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-
|
1235
|
+
# supplied encryption key that protects this resource.
|
1215
1236
|
# Corresponds to the JSON property `sha256`
|
1216
1237
|
# @return [String]
|
1217
1238
|
attr_accessor :sha256
|
@@ -2930,7 +2951,7 @@ module Google
|
|
2930
2951
|
# @return [String]
|
2931
2952
|
attr_accessor :kind
|
2932
2953
|
|
2933
|
-
# Any applicable
|
2954
|
+
# Any applicable license URI.
|
2934
2955
|
# Corresponds to the JSON property `licenses`
|
2935
2956
|
# @return [Array<String>]
|
2936
2957
|
attr_accessor :licenses
|
@@ -3496,7 +3517,7 @@ module Google
|
|
3496
3517
|
end
|
3497
3518
|
end
|
3498
3519
|
|
3499
|
-
#
|
3520
|
+
# An Instance Template Manager resource.
|
3500
3521
|
class InstanceGroupManager
|
3501
3522
|
include Google::Apis::Core::Hashable
|
3502
3523
|
|
@@ -160,6 +160,12 @@ module Google
|
|
160
160
|
include Google::Apis::Core::JsonObjectSupport
|
161
161
|
end
|
162
162
|
|
163
|
+
class CacheInvalidationRule
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
|
+
|
166
|
+
include Google::Apis::Core::JsonObjectSupport
|
167
|
+
end
|
168
|
+
|
163
169
|
class CustomerEncryptionKey
|
164
170
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
165
171
|
|
@@ -1506,6 +1512,7 @@ module Google
|
|
1506
1512
|
|
1507
1513
|
property :creation_timestamp, as: 'creationTimestamp'
|
1508
1514
|
property :description, as: 'description'
|
1515
|
+
property :enable_cdn, as: 'enableCDN'
|
1509
1516
|
property :fingerprint, :base64 => true, as: 'fingerprint'
|
1510
1517
|
collection :health_checks, as: 'healthChecks'
|
1511
1518
|
property :id, as: 'id'
|
@@ -1541,6 +1548,13 @@ module Google
|
|
1541
1548
|
end
|
1542
1549
|
end
|
1543
1550
|
|
1551
|
+
class CacheInvalidationRule
|
1552
|
+
# @private
|
1553
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
1554
|
+
property :path, as: 'path'
|
1555
|
+
end
|
1556
|
+
end
|
1557
|
+
|
1544
1558
|
class CustomerEncryptionKey
|
1545
1559
|
# @private
|
1546
1560
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -9445,6 +9445,48 @@ module Google
|
|
9445
9445
|
execute_or_queue_command(command, &block)
|
9446
9446
|
end
|
9447
9447
|
|
9448
|
+
# Initiates a cache invalidation operation, invalidating the specified path,
|
9449
|
+
# scoped to the specified UrlMap.
|
9450
|
+
# @param [String] project
|
9451
|
+
# Project ID for this request.
|
9452
|
+
# @param [String] url_map
|
9453
|
+
# Name of the UrlMap scoping this request.
|
9454
|
+
# @param [Google::Apis::ComputeV1::CacheInvalidationRule] cache_invalidation_rule_object
|
9455
|
+
# @param [String] fields
|
9456
|
+
# Selector specifying which fields to include in a partial response.
|
9457
|
+
# @param [String] quota_user
|
9458
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
9459
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
9460
|
+
# Overrides userIp if both are provided.
|
9461
|
+
# @param [String] user_ip
|
9462
|
+
# IP address of the site where the request originates. Use this if you want to
|
9463
|
+
# enforce per-user limits.
|
9464
|
+
# @param [Google::Apis::RequestOptions] options
|
9465
|
+
# Request-specific options
|
9466
|
+
#
|
9467
|
+
# @yield [result, err] Result & error if block supplied
|
9468
|
+
# @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
|
9469
|
+
# @yieldparam err [StandardError] error object if request failed
|
9470
|
+
#
|
9471
|
+
# @return [Google::Apis::ComputeV1::Operation]
|
9472
|
+
#
|
9473
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
9474
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
9475
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
9476
|
+
def invalidate_url_map_cache(project, url_map, cache_invalidation_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
9477
|
+
command = make_simple_command(:post, '{project}/global/urlMaps/{urlMap}/invalidateCache', options)
|
9478
|
+
command.request_representation = Google::Apis::ComputeV1::CacheInvalidationRule::Representation
|
9479
|
+
command.request_object = cache_invalidation_rule_object
|
9480
|
+
command.response_representation = Google::Apis::ComputeV1::Operation::Representation
|
9481
|
+
command.response_class = Google::Apis::ComputeV1::Operation
|
9482
|
+
command.params['project'] = project unless project.nil?
|
9483
|
+
command.params['urlMap'] = url_map unless url_map.nil?
|
9484
|
+
command.query['fields'] = fields unless fields.nil?
|
9485
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
9486
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
9487
|
+
execute_or_queue_command(command, &block)
|
9488
|
+
end
|
9489
|
+
|
9448
9490
|
# Retrieves the list of UrlMap resources available to the specified project.
|
9449
9491
|
# @param [String] project
|
9450
9492
|
# Project ID for this request.
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# @see https://developers.google.com/shopping-content
|
27
27
|
module ContentV2
|
28
28
|
VERSION = 'V2'
|
29
|
-
REVISION = '
|
29
|
+
REVISION = '20160602'
|
30
30
|
|
31
31
|
# Manage your product listings and accounts for Google Shopping
|
32
32
|
AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
|
@@ -493,6 +493,18 @@ module Google
|
|
493
493
|
# @return [Google::Apis::ContentV2::AccountShippingShippingServiceCostRule]
|
494
494
|
attr_accessor :cost_rule_tree
|
495
495
|
|
496
|
+
# The maximum number of days in transit. Must be a value between 0 and 250
|
497
|
+
# included. A value of 0 means same day delivery.
|
498
|
+
# Corresponds to the JSON property `maxDaysInTransit`
|
499
|
+
# @return [String]
|
500
|
+
attr_accessor :max_days_in_transit
|
501
|
+
|
502
|
+
# The minimum number of days in transit. Must be a value between 0 and
|
503
|
+
# maxDaysIntransit included. A value of 0 means same day delivery.
|
504
|
+
# Corresponds to the JSON property `minDaysInTransit`
|
505
|
+
# @return [String]
|
506
|
+
attr_accessor :min_days_in_transit
|
507
|
+
|
496
508
|
# The name of this shipping service.
|
497
509
|
# Corresponds to the JSON property `name`
|
498
510
|
# @return [String]
|
@@ -512,6 +524,8 @@ module Google
|
|
512
524
|
@active = args[:active] if args.key?(:active)
|
513
525
|
@calculation_method = args[:calculation_method] if args.key?(:calculation_method)
|
514
526
|
@cost_rule_tree = args[:cost_rule_tree] if args.key?(:cost_rule_tree)
|
527
|
+
@max_days_in_transit = args[:max_days_in_transit] if args.key?(:max_days_in_transit)
|
528
|
+
@min_days_in_transit = args[:min_days_in_transit] if args.key?(:min_days_in_transit)
|
515
529
|
@name = args[:name] if args.key?(:name)
|
516
530
|
@sale_country = args[:sale_country] if args.key?(:sale_country)
|
517
531
|
end
|
@@ -1037,6 +1037,8 @@ module Google
|
|
1037
1037
|
|
1038
1038
|
property :cost_rule_tree, as: 'costRuleTree', class: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule, decorator: Google::Apis::ContentV2::AccountShippingShippingServiceCostRule::Representation
|
1039
1039
|
|
1040
|
+
property :max_days_in_transit, as: 'maxDaysInTransit'
|
1041
|
+
property :min_days_in_transit, as: 'minDaysInTransit'
|
1040
1042
|
property :name, as: 'name'
|
1041
1043
|
property :sale_country, as: 'saleCountry'
|
1042
1044
|
end
|
@@ -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_v1beta3/service.rb'
|
16
|
+
require 'google/apis/datastore_v1beta3/classes.rb'
|
17
|
+
require 'google/apis/datastore_v1beta3/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 DatastoreV1beta3
|
28
|
+
VERSION = 'V1beta3'
|
29
|
+
REVISION = '20160614'
|
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,1237 @@
|
|
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 DatastoreV1beta3
|
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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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
|
+
# 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::DatastoreV1beta3::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 google.datastore.v1beta3.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
|
+
# 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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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::DatastoreV1beta3::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 google.datastore.v1beta3.Datastore.Rollback.
|
344
|
+
class RollbackRequest
|
345
|
+
include Google::Apis::Core::Hashable
|
346
|
+
|
347
|
+
# The transaction identifier, returned by a call to
|
348
|
+
# google.datastore.v1beta3.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::DatastoreV1beta3::Entity]
|
379
|
+
attr_accessor :entity
|
380
|
+
|
381
|
+
def initialize(**args)
|
382
|
+
update!(**args)
|
383
|
+
end
|
384
|
+
|
385
|
+
# Update properties of this object
|
386
|
+
def update!(**args)
|
387
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
388
|
+
@entity = args[:entity] if args.key?(:entity)
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
# A binding parameter for a GQL query.
|
393
|
+
class GqlQueryParameter
|
394
|
+
include Google::Apis::Core::Hashable
|
395
|
+
|
396
|
+
# A message that can hold any of the supported value types and associated
|
397
|
+
# metadata.
|
398
|
+
# Corresponds to the JSON property `value`
|
399
|
+
# @return [Google::Apis::DatastoreV1beta3::Value]
|
400
|
+
attr_accessor :value
|
401
|
+
|
402
|
+
# A query cursor. Query cursors are returned in query
|
403
|
+
# result batches.
|
404
|
+
# Corresponds to the JSON property `cursor`
|
405
|
+
# @return [String]
|
406
|
+
attr_accessor :cursor
|
407
|
+
|
408
|
+
def initialize(**args)
|
409
|
+
update!(**args)
|
410
|
+
end
|
411
|
+
|
412
|
+
# Update properties of this object
|
413
|
+
def update!(**args)
|
414
|
+
@value = args[:value] if args.key?(:value)
|
415
|
+
@cursor = args[:cursor] if args.key?(:cursor)
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
# An array value.
|
420
|
+
class ArrayValue
|
421
|
+
include Google::Apis::Core::Hashable
|
422
|
+
|
423
|
+
# Values in the array.
|
424
|
+
# The order of this array may not be preserved if it contains a mix of
|
425
|
+
# indexed and unindexed values.
|
426
|
+
# Corresponds to the JSON property `values`
|
427
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Value>]
|
428
|
+
attr_accessor :values
|
429
|
+
|
430
|
+
def initialize(**args)
|
431
|
+
update!(**args)
|
432
|
+
end
|
433
|
+
|
434
|
+
# Update properties of this object
|
435
|
+
def update!(**args)
|
436
|
+
@values = args[:values] if args.key?(:values)
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
# A holder for any type of filter.
|
441
|
+
class Filter
|
442
|
+
include Google::Apis::Core::Hashable
|
443
|
+
|
444
|
+
# A filter on a specific property.
|
445
|
+
# Corresponds to the JSON property `propertyFilter`
|
446
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyFilter]
|
447
|
+
attr_accessor :property_filter
|
448
|
+
|
449
|
+
# A filter that merges multiple other filters using the given operator.
|
450
|
+
# Corresponds to the JSON property `compositeFilter`
|
451
|
+
# @return [Google::Apis::DatastoreV1beta3::CompositeFilter]
|
452
|
+
attr_accessor :composite_filter
|
453
|
+
|
454
|
+
def initialize(**args)
|
455
|
+
update!(**args)
|
456
|
+
end
|
457
|
+
|
458
|
+
# Update properties of this object
|
459
|
+
def update!(**args)
|
460
|
+
@property_filter = args[:property_filter] if args.key?(:property_filter)
|
461
|
+
@composite_filter = args[:composite_filter] if args.key?(:composite_filter)
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
# The response for google.datastore.v1beta3.Datastore.BeginTransaction.
|
466
|
+
class BeginTransactionResponse
|
467
|
+
include Google::Apis::Core::Hashable
|
468
|
+
|
469
|
+
# The transaction identifier (always present).
|
470
|
+
# Corresponds to the JSON property `transaction`
|
471
|
+
# @return [String]
|
472
|
+
attr_accessor :transaction
|
473
|
+
|
474
|
+
def initialize(**args)
|
475
|
+
update!(**args)
|
476
|
+
end
|
477
|
+
|
478
|
+
# Update properties of this object
|
479
|
+
def update!(**args)
|
480
|
+
@transaction = args[:transaction] if args.key?(:transaction)
|
481
|
+
end
|
482
|
+
end
|
483
|
+
|
484
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
485
|
+
# by project and namespace, however the namespace ID may be empty.
|
486
|
+
# A partition ID contains several dimensions:
|
487
|
+
# project ID and namespace ID.
|
488
|
+
# Partition dimensions:
|
489
|
+
# - May be `""`.
|
490
|
+
# - Must be valid UTF-8 bytes.
|
491
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
492
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
493
|
+
# reserved/read-only.
|
494
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
495
|
+
# contexts.
|
496
|
+
# Foreign partition IDs (in which the project ID does
|
497
|
+
# not match the context project ID ) are discouraged.
|
498
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
499
|
+
# active state.
|
500
|
+
class PartitionId
|
501
|
+
include Google::Apis::Core::Hashable
|
502
|
+
|
503
|
+
# If not empty, the ID of the namespace to which the entities belong.
|
504
|
+
# Corresponds to the JSON property `namespaceId`
|
505
|
+
# @return [String]
|
506
|
+
attr_accessor :namespace_id
|
507
|
+
|
508
|
+
# The ID of the project to which the entities belong.
|
509
|
+
# Corresponds to the JSON property `projectId`
|
510
|
+
# @return [String]
|
511
|
+
attr_accessor :project_id
|
512
|
+
|
513
|
+
def initialize(**args)
|
514
|
+
update!(**args)
|
515
|
+
end
|
516
|
+
|
517
|
+
# Update properties of this object
|
518
|
+
def update!(**args)
|
519
|
+
@namespace_id = args[:namespace_id] if args.key?(:namespace_id)
|
520
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
# A batch of results produced by a query.
|
525
|
+
class QueryResultBatch
|
526
|
+
include Google::Apis::Core::Hashable
|
527
|
+
|
528
|
+
# A cursor that points to the position after the last result in the batch.
|
529
|
+
# Corresponds to the JSON property `endCursor`
|
530
|
+
# @return [String]
|
531
|
+
attr_accessor :end_cursor
|
532
|
+
|
533
|
+
# A cursor that points to the position after the last skipped result.
|
534
|
+
# Will be set when `skipped_results` != 0.
|
535
|
+
# Corresponds to the JSON property `skippedCursor`
|
536
|
+
# @return [String]
|
537
|
+
attr_accessor :skipped_cursor
|
538
|
+
|
539
|
+
# The result type for every entity in `entity_results`.
|
540
|
+
# Corresponds to the JSON property `entityResultType`
|
541
|
+
# @return [String]
|
542
|
+
attr_accessor :entity_result_type
|
543
|
+
|
544
|
+
# The state of the query after the current batch.
|
545
|
+
# Corresponds to the JSON property `moreResults`
|
546
|
+
# @return [String]
|
547
|
+
attr_accessor :more_results
|
548
|
+
|
549
|
+
# The results for this batch.
|
550
|
+
# Corresponds to the JSON property `entityResults`
|
551
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
552
|
+
attr_accessor :entity_results
|
553
|
+
|
554
|
+
# The number of results skipped, typically because of an offset.
|
555
|
+
# Corresponds to the JSON property `skippedResults`
|
556
|
+
# @return [Fixnum]
|
557
|
+
attr_accessor :skipped_results
|
558
|
+
|
559
|
+
def initialize(**args)
|
560
|
+
update!(**args)
|
561
|
+
end
|
562
|
+
|
563
|
+
# Update properties of this object
|
564
|
+
def update!(**args)
|
565
|
+
@end_cursor = args[:end_cursor] if args.key?(:end_cursor)
|
566
|
+
@skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
|
567
|
+
@entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
|
568
|
+
@more_results = args[:more_results] if args.key?(:more_results)
|
569
|
+
@entity_results = args[:entity_results] if args.key?(:entity_results)
|
570
|
+
@skipped_results = args[:skipped_results] if args.key?(:skipped_results)
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
# The request for google.datastore.v1beta3.Datastore.AllocateIds.
|
575
|
+
class AllocateIdsRequest
|
576
|
+
include Google::Apis::Core::Hashable
|
577
|
+
|
578
|
+
# A list of keys with incomplete key paths for which to allocate IDs.
|
579
|
+
# No key may be reserved/read-only.
|
580
|
+
# Corresponds to the JSON property `keys`
|
581
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
582
|
+
attr_accessor :keys
|
583
|
+
|
584
|
+
def initialize(**args)
|
585
|
+
update!(**args)
|
586
|
+
end
|
587
|
+
|
588
|
+
# Update properties of this object
|
589
|
+
def update!(**args)
|
590
|
+
@keys = args[:keys] if args.key?(:keys)
|
591
|
+
end
|
592
|
+
end
|
593
|
+
|
594
|
+
# A representation of a kind.
|
595
|
+
class KindExpression
|
596
|
+
include Google::Apis::Core::Hashable
|
597
|
+
|
598
|
+
# The name of the kind.
|
599
|
+
# Corresponds to the JSON property `name`
|
600
|
+
# @return [String]
|
601
|
+
attr_accessor :name
|
602
|
+
|
603
|
+
def initialize(**args)
|
604
|
+
update!(**args)
|
605
|
+
end
|
606
|
+
|
607
|
+
# Update properties of this object
|
608
|
+
def update!(**args)
|
609
|
+
@name = args[:name] if args.key?(:name)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
613
|
+
# A filter on a specific property.
|
614
|
+
class PropertyFilter
|
615
|
+
include Google::Apis::Core::Hashable
|
616
|
+
|
617
|
+
# A message that can hold any of the supported value types and associated
|
618
|
+
# metadata.
|
619
|
+
# Corresponds to the JSON property `value`
|
620
|
+
# @return [Google::Apis::DatastoreV1beta3::Value]
|
621
|
+
attr_accessor :value
|
622
|
+
|
623
|
+
# The operator to filter by.
|
624
|
+
# Corresponds to the JSON property `op`
|
625
|
+
# @return [String]
|
626
|
+
attr_accessor :op
|
627
|
+
|
628
|
+
# A reference to a property relative to the kind expressions.
|
629
|
+
# Corresponds to the JSON property `property`
|
630
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyReference]
|
631
|
+
attr_accessor :property
|
632
|
+
|
633
|
+
def initialize(**args)
|
634
|
+
update!(**args)
|
635
|
+
end
|
636
|
+
|
637
|
+
# Update properties of this object
|
638
|
+
def update!(**args)
|
639
|
+
@value = args[:value] if args.key?(:value)
|
640
|
+
@op = args[:op] if args.key?(:op)
|
641
|
+
@property = args[:property] if args.key?(:property)
|
642
|
+
end
|
643
|
+
end
|
644
|
+
|
645
|
+
# A (kind, ID/name) pair used to construct a key path.
|
646
|
+
# If either name or ID is set, the element is complete.
|
647
|
+
# If neither is set, the element is incomplete.
|
648
|
+
class PathElement
|
649
|
+
include Google::Apis::Core::Hashable
|
650
|
+
|
651
|
+
# The kind of the entity.
|
652
|
+
# A kind matching regex `__.*__` is reserved/read-only.
|
653
|
+
# A kind must not contain more than 1500 bytes when UTF-8 encoded.
|
654
|
+
# Cannot be `""`.
|
655
|
+
# Corresponds to the JSON property `kind`
|
656
|
+
# @return [String]
|
657
|
+
attr_accessor :kind
|
658
|
+
|
659
|
+
# The auto-allocated ID of the entity.
|
660
|
+
# Never equal to zero. Values less than zero are discouraged and may not
|
661
|
+
# be supported in the future.
|
662
|
+
# Corresponds to the JSON property `id`
|
663
|
+
# @return [String]
|
664
|
+
attr_accessor :id
|
665
|
+
|
666
|
+
# The name of the entity.
|
667
|
+
# A name matching regex `__.*__` is reserved/read-only.
|
668
|
+
# A name must not be more than 1500 bytes when UTF-8 encoded.
|
669
|
+
# Cannot be `""`.
|
670
|
+
# Corresponds to the JSON property `name`
|
671
|
+
# @return [String]
|
672
|
+
attr_accessor :name
|
673
|
+
|
674
|
+
def initialize(**args)
|
675
|
+
update!(**args)
|
676
|
+
end
|
677
|
+
|
678
|
+
# Update properties of this object
|
679
|
+
def update!(**args)
|
680
|
+
@kind = args[:kind] if args.key?(:kind)
|
681
|
+
@id = args[:id] if args.key?(:id)
|
682
|
+
@name = args[:name] if args.key?(:name)
|
683
|
+
end
|
684
|
+
end
|
685
|
+
|
686
|
+
# The response for google.datastore.v1beta3.Datastore.Rollback
|
687
|
+
# (an empty message).
|
688
|
+
class RollbackResponse
|
689
|
+
include Google::Apis::Core::Hashable
|
690
|
+
|
691
|
+
def initialize(**args)
|
692
|
+
update!(**args)
|
693
|
+
end
|
694
|
+
|
695
|
+
# Update properties of this object
|
696
|
+
def update!(**args)
|
697
|
+
end
|
698
|
+
end
|
699
|
+
|
700
|
+
# A reference to a property relative to the kind expressions.
|
701
|
+
class PropertyReference
|
702
|
+
include Google::Apis::Core::Hashable
|
703
|
+
|
704
|
+
# The name of the property.
|
705
|
+
# If name includes "."s, it may be interpreted as a property name path.
|
706
|
+
# Corresponds to the JSON property `name`
|
707
|
+
# @return [String]
|
708
|
+
attr_accessor :name
|
709
|
+
|
710
|
+
def initialize(**args)
|
711
|
+
update!(**args)
|
712
|
+
end
|
713
|
+
|
714
|
+
# Update properties of this object
|
715
|
+
def update!(**args)
|
716
|
+
@name = args[:name] if args.key?(:name)
|
717
|
+
end
|
718
|
+
end
|
719
|
+
|
720
|
+
# A representation of a property in a projection.
|
721
|
+
class Projection
|
722
|
+
include Google::Apis::Core::Hashable
|
723
|
+
|
724
|
+
# A reference to a property relative to the kind expressions.
|
725
|
+
# Corresponds to the JSON property `property`
|
726
|
+
# @return [Google::Apis::DatastoreV1beta3::PropertyReference]
|
727
|
+
attr_accessor :property
|
728
|
+
|
729
|
+
def initialize(**args)
|
730
|
+
update!(**args)
|
731
|
+
end
|
732
|
+
|
733
|
+
# Update properties of this object
|
734
|
+
def update!(**args)
|
735
|
+
@property = args[:property] if args.key?(:property)
|
736
|
+
end
|
737
|
+
end
|
738
|
+
|
739
|
+
# The result of applying a mutation.
|
740
|
+
class MutationResult
|
741
|
+
include Google::Apis::Core::Hashable
|
742
|
+
|
743
|
+
# A unique identifier for an entity.
|
744
|
+
# If a key's partition ID or any of its path kinds or names are
|
745
|
+
# reserved/read-only, the key is reserved/read-only.
|
746
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
747
|
+
# Corresponds to the JSON property `key`
|
748
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
749
|
+
attr_accessor :key
|
750
|
+
|
751
|
+
def initialize(**args)
|
752
|
+
update!(**args)
|
753
|
+
end
|
754
|
+
|
755
|
+
# Update properties of this object
|
756
|
+
def update!(**args)
|
757
|
+
@key = args[:key] if args.key?(:key)
|
758
|
+
end
|
759
|
+
end
|
760
|
+
|
761
|
+
# The response for google.datastore.v1beta3.Datastore.AllocateIds.
|
762
|
+
class AllocateIdsResponse
|
763
|
+
include Google::Apis::Core::Hashable
|
764
|
+
|
765
|
+
# The keys specified in the request (in the same order), each with
|
766
|
+
# its key path completed with a newly allocated ID.
|
767
|
+
# Corresponds to the JSON property `keys`
|
768
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
769
|
+
attr_accessor :keys
|
770
|
+
|
771
|
+
def initialize(**args)
|
772
|
+
update!(**args)
|
773
|
+
end
|
774
|
+
|
775
|
+
# Update properties of this object
|
776
|
+
def update!(**args)
|
777
|
+
@keys = args[:keys] if args.key?(:keys)
|
778
|
+
end
|
779
|
+
end
|
780
|
+
|
781
|
+
# The response for google.datastore.v1beta3.Datastore.Lookup.
|
782
|
+
class LookupResponse
|
783
|
+
include Google::Apis::Core::Hashable
|
784
|
+
|
785
|
+
# Entities found as `ResultType.FULL` entities. The order of results in this
|
786
|
+
# field is undefined and has no relation to the order of the keys in the
|
787
|
+
# input.
|
788
|
+
# Corresponds to the JSON property `found`
|
789
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
790
|
+
attr_accessor :found
|
791
|
+
|
792
|
+
# Entities not found as `ResultType.KEY_ONLY` entities. The order of results
|
793
|
+
# in this field is undefined and has no relation to the order of the keys
|
794
|
+
# in the input.
|
795
|
+
# Corresponds to the JSON property `missing`
|
796
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::EntityResult>]
|
797
|
+
attr_accessor :missing
|
798
|
+
|
799
|
+
# A list of keys that were not looked up due to resource constraints. The
|
800
|
+
# order of results in this field is undefined and has no relation to the
|
801
|
+
# order of the keys in the input.
|
802
|
+
# Corresponds to the JSON property `deferred`
|
803
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
804
|
+
attr_accessor :deferred
|
805
|
+
|
806
|
+
def initialize(**args)
|
807
|
+
update!(**args)
|
808
|
+
end
|
809
|
+
|
810
|
+
# Update properties of this object
|
811
|
+
def update!(**args)
|
812
|
+
@found = args[:found] if args.key?(:found)
|
813
|
+
@missing = args[:missing] if args.key?(:missing)
|
814
|
+
@deferred = args[:deferred] if args.key?(:deferred)
|
815
|
+
end
|
816
|
+
end
|
817
|
+
|
818
|
+
# The request for google.datastore.v1beta3.Datastore.BeginTransaction.
|
819
|
+
class BeginTransactionRequest
|
820
|
+
include Google::Apis::Core::Hashable
|
821
|
+
|
822
|
+
def initialize(**args)
|
823
|
+
update!(**args)
|
824
|
+
end
|
825
|
+
|
826
|
+
# Update properties of this object
|
827
|
+
def update!(**args)
|
828
|
+
end
|
829
|
+
end
|
830
|
+
|
831
|
+
# A unique identifier for an entity.
|
832
|
+
# If a key's partition ID or any of its path kinds or names are
|
833
|
+
# reserved/read-only, the key is reserved/read-only.
|
834
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
835
|
+
class Key
|
836
|
+
include Google::Apis::Core::Hashable
|
837
|
+
|
838
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
839
|
+
# by project and namespace, however the namespace ID may be empty.
|
840
|
+
# A partition ID contains several dimensions:
|
841
|
+
# project ID and namespace ID.
|
842
|
+
# Partition dimensions:
|
843
|
+
# - May be `""`.
|
844
|
+
# - Must be valid UTF-8 bytes.
|
845
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
846
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
847
|
+
# reserved/read-only.
|
848
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
849
|
+
# contexts.
|
850
|
+
# Foreign partition IDs (in which the project ID does
|
851
|
+
# not match the context project ID ) are discouraged.
|
852
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
853
|
+
# active state.
|
854
|
+
# Corresponds to the JSON property `partitionId`
|
855
|
+
# @return [Google::Apis::DatastoreV1beta3::PartitionId]
|
856
|
+
attr_accessor :partition_id
|
857
|
+
|
858
|
+
# The entity path.
|
859
|
+
# An entity path consists of one or more elements composed of a kind and a
|
860
|
+
# string or numerical identifier, which identify entities. The first
|
861
|
+
# element identifies a _root entity_, the second element identifies
|
862
|
+
# a _child_ of the root entity, the third element identifies a child of the
|
863
|
+
# second entity, and so forth. The entities identified by all prefixes of
|
864
|
+
# the path are called the element's _ancestors_.
|
865
|
+
# An entity path is always fully complete: *all* of the entity's ancestors
|
866
|
+
# are required to be in the path along with the entity identifier itself.
|
867
|
+
# The only exception is that in some documented cases, the identifier in the
|
868
|
+
# last path element (for the entity) itself may be omitted. For example,
|
869
|
+
# the last path element of the key of `Mutation.insert` may have no
|
870
|
+
# identifier.
|
871
|
+
# A path can never be empty, and a path can have at most 100 elements.
|
872
|
+
# Corresponds to the JSON property `path`
|
873
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::PathElement>]
|
874
|
+
attr_accessor :path
|
875
|
+
|
876
|
+
def initialize(**args)
|
877
|
+
update!(**args)
|
878
|
+
end
|
879
|
+
|
880
|
+
# Update properties of this object
|
881
|
+
def update!(**args)
|
882
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
883
|
+
@path = args[:path] if args.key?(:path)
|
884
|
+
end
|
885
|
+
end
|
886
|
+
|
887
|
+
# The response for google.datastore.v1beta3.Datastore.RunQuery.
|
888
|
+
class RunQueryResponse
|
889
|
+
include Google::Apis::Core::Hashable
|
890
|
+
|
891
|
+
# A batch of results produced by a query.
|
892
|
+
# Corresponds to the JSON property `batch`
|
893
|
+
# @return [Google::Apis::DatastoreV1beta3::QueryResultBatch]
|
894
|
+
attr_accessor :batch
|
895
|
+
|
896
|
+
# A query for entities.
|
897
|
+
# Corresponds to the JSON property `query`
|
898
|
+
# @return [Google::Apis::DatastoreV1beta3::Query]
|
899
|
+
attr_accessor :query
|
900
|
+
|
901
|
+
def initialize(**args)
|
902
|
+
update!(**args)
|
903
|
+
end
|
904
|
+
|
905
|
+
# Update properties of this object
|
906
|
+
def update!(**args)
|
907
|
+
@batch = args[:batch] if args.key?(:batch)
|
908
|
+
@query = args[:query] if args.key?(:query)
|
909
|
+
end
|
910
|
+
end
|
911
|
+
|
912
|
+
# A Datastore data object.
|
913
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
914
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
915
|
+
# message.
|
916
|
+
class Entity
|
917
|
+
include Google::Apis::Core::Hashable
|
918
|
+
|
919
|
+
# The entity's properties.
|
920
|
+
# The map's keys are property names.
|
921
|
+
# A property name matching regex `__.*__` is reserved.
|
922
|
+
# A reserved property name is forbidden in certain documented contexts.
|
923
|
+
# The name must not contain more than 500 characters.
|
924
|
+
# The name cannot be `""`.
|
925
|
+
# Corresponds to the JSON property `properties`
|
926
|
+
# @return [Hash<String,Google::Apis::DatastoreV1beta3::Value>]
|
927
|
+
attr_accessor :properties
|
928
|
+
|
929
|
+
# A unique identifier for an entity.
|
930
|
+
# If a key's partition ID or any of its path kinds or names are
|
931
|
+
# reserved/read-only, the key is reserved/read-only.
|
932
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
933
|
+
# Corresponds to the JSON property `key`
|
934
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
935
|
+
attr_accessor :key
|
936
|
+
|
937
|
+
def initialize(**args)
|
938
|
+
update!(**args)
|
939
|
+
end
|
940
|
+
|
941
|
+
# Update properties of this object
|
942
|
+
def update!(**args)
|
943
|
+
@properties = args[:properties] if args.key?(:properties)
|
944
|
+
@key = args[:key] if args.key?(:key)
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
949
|
+
class GqlQuery
|
950
|
+
include Google::Apis::Core::Hashable
|
951
|
+
|
952
|
+
# A string of the format described
|
953
|
+
# [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
954
|
+
# Corresponds to the JSON property `queryString`
|
955
|
+
# @return [String]
|
956
|
+
attr_accessor :query_string
|
957
|
+
|
958
|
+
# For each non-reserved named binding site in the query string,
|
959
|
+
# there must be a named parameter with that name,
|
960
|
+
# but not necessarily the inverse.
|
961
|
+
# Key must match regex `A-Za-z_$*`, must not match regex
|
962
|
+
# `__.*__`, and must not be `""`.
|
963
|
+
# Corresponds to the JSON property `namedBindings`
|
964
|
+
# @return [Hash<String,Google::Apis::DatastoreV1beta3::GqlQueryParameter>]
|
965
|
+
attr_accessor :named_bindings
|
966
|
+
|
967
|
+
# When false, the query string must not contain any literals and instead
|
968
|
+
# must bind all values. For example,
|
969
|
+
# `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
|
970
|
+
# `SELECT * FROM Kind WHERE a = @value` is.
|
971
|
+
# Corresponds to the JSON property `allowLiterals`
|
972
|
+
# @return [Boolean]
|
973
|
+
attr_accessor :allow_literals
|
974
|
+
alias_method :allow_literals?, :allow_literals
|
975
|
+
|
976
|
+
# Numbered binding site @1 references the first numbered parameter,
|
977
|
+
# effectively using 1-based indexing, rather than the usual 0.
|
978
|
+
# For each binding site numbered i in `query_string`,
|
979
|
+
# there must be an i-th numbered parameter.
|
980
|
+
# The inverse must also be true.
|
981
|
+
# Corresponds to the JSON property `positionalBindings`
|
982
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::GqlQueryParameter>]
|
983
|
+
attr_accessor :positional_bindings
|
984
|
+
|
985
|
+
def initialize(**args)
|
986
|
+
update!(**args)
|
987
|
+
end
|
988
|
+
|
989
|
+
# Update properties of this object
|
990
|
+
def update!(**args)
|
991
|
+
@query_string = args[:query_string] if args.key?(:query_string)
|
992
|
+
@named_bindings = args[:named_bindings] if args.key?(:named_bindings)
|
993
|
+
@allow_literals = args[:allow_literals] if args.key?(:allow_literals)
|
994
|
+
@positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings)
|
995
|
+
end
|
996
|
+
end
|
997
|
+
|
998
|
+
# A mutation to apply to an entity.
|
999
|
+
class Mutation
|
1000
|
+
include Google::Apis::Core::Hashable
|
1001
|
+
|
1002
|
+
# A Datastore data object.
|
1003
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
1004
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
1005
|
+
# message.
|
1006
|
+
# Corresponds to the JSON property `insert`
|
1007
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1008
|
+
attr_accessor :insert
|
1009
|
+
|
1010
|
+
# A Datastore data object.
|
1011
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
1012
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
1013
|
+
# message.
|
1014
|
+
# Corresponds to the JSON property `update`
|
1015
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1016
|
+
attr_accessor :update
|
1017
|
+
|
1018
|
+
# A Datastore data object.
|
1019
|
+
# An entity is limited to 1 megabyte when stored. That _roughly_
|
1020
|
+
# corresponds to a limit of 1 megabyte for the serialized form of this
|
1021
|
+
# message.
|
1022
|
+
# Corresponds to the JSON property `upsert`
|
1023
|
+
# @return [Google::Apis::DatastoreV1beta3::Entity]
|
1024
|
+
attr_accessor :upsert
|
1025
|
+
|
1026
|
+
# A unique identifier for an entity.
|
1027
|
+
# If a key's partition ID or any of its path kinds or names are
|
1028
|
+
# reserved/read-only, the key is reserved/read-only.
|
1029
|
+
# A reserved/read-only key is forbidden in certain documented contexts.
|
1030
|
+
# Corresponds to the JSON property `delete`
|
1031
|
+
# @return [Google::Apis::DatastoreV1beta3::Key]
|
1032
|
+
attr_accessor :delete
|
1033
|
+
|
1034
|
+
def initialize(**args)
|
1035
|
+
update!(**args)
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
# Update properties of this object
|
1039
|
+
def update!(**args)
|
1040
|
+
@insert = args[:insert] if args.key?(:insert)
|
1041
|
+
@update = args[:update] if args.key?(:update)
|
1042
|
+
@upsert = args[:upsert] if args.key?(:upsert)
|
1043
|
+
@delete = args[:delete] if args.key?(:delete)
|
1044
|
+
end
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
# The response for google.datastore.v1beta3.Datastore.Commit.
|
1048
|
+
class CommitResponse
|
1049
|
+
include Google::Apis::Core::Hashable
|
1050
|
+
|
1051
|
+
# The result of performing the mutations.
|
1052
|
+
# The i-th mutation result corresponds to the i-th mutation in the request.
|
1053
|
+
# Corresponds to the JSON property `mutationResults`
|
1054
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::MutationResult>]
|
1055
|
+
attr_accessor :mutation_results
|
1056
|
+
|
1057
|
+
# The number of index entries updated during the commit, or zero if none were
|
1058
|
+
# updated.
|
1059
|
+
# Corresponds to the JSON property `indexUpdates`
|
1060
|
+
# @return [Fixnum]
|
1061
|
+
attr_accessor :index_updates
|
1062
|
+
|
1063
|
+
def initialize(**args)
|
1064
|
+
update!(**args)
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# Update properties of this object
|
1068
|
+
def update!(**args)
|
1069
|
+
@mutation_results = args[:mutation_results] if args.key?(:mutation_results)
|
1070
|
+
@index_updates = args[:index_updates] if args.key?(:index_updates)
|
1071
|
+
end
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
# The request for google.datastore.v1beta3.Datastore.RunQuery.
|
1075
|
+
class RunQueryRequest
|
1076
|
+
include Google::Apis::Core::Hashable
|
1077
|
+
|
1078
|
+
# A partition ID identifies a grouping of entities. The grouping is always
|
1079
|
+
# by project and namespace, however the namespace ID may be empty.
|
1080
|
+
# A partition ID contains several dimensions:
|
1081
|
+
# project ID and namespace ID.
|
1082
|
+
# Partition dimensions:
|
1083
|
+
# - May be `""`.
|
1084
|
+
# - Must be valid UTF-8 bytes.
|
1085
|
+
# - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
|
1086
|
+
# If the value of any dimension matches regex `__.*__`, the partition is
|
1087
|
+
# reserved/read-only.
|
1088
|
+
# A reserved/read-only partition ID is forbidden in certain documented
|
1089
|
+
# contexts.
|
1090
|
+
# Foreign partition IDs (in which the project ID does
|
1091
|
+
# not match the context project ID ) are discouraged.
|
1092
|
+
# Reads and writes of foreign partition IDs may fail if the project is not in an
|
1093
|
+
# active state.
|
1094
|
+
# Corresponds to the JSON property `partitionId`
|
1095
|
+
# @return [Google::Apis::DatastoreV1beta3::PartitionId]
|
1096
|
+
attr_accessor :partition_id
|
1097
|
+
|
1098
|
+
# A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
|
1099
|
+
# Corresponds to the JSON property `gqlQuery`
|
1100
|
+
# @return [Google::Apis::DatastoreV1beta3::GqlQuery]
|
1101
|
+
attr_accessor :gql_query
|
1102
|
+
|
1103
|
+
# The options shared by read requests.
|
1104
|
+
# Corresponds to the JSON property `readOptions`
|
1105
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadOptions]
|
1106
|
+
attr_accessor :read_options
|
1107
|
+
|
1108
|
+
# A query for entities.
|
1109
|
+
# Corresponds to the JSON property `query`
|
1110
|
+
# @return [Google::Apis::DatastoreV1beta3::Query]
|
1111
|
+
attr_accessor :query
|
1112
|
+
|
1113
|
+
def initialize(**args)
|
1114
|
+
update!(**args)
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Update properties of this object
|
1118
|
+
def update!(**args)
|
1119
|
+
@partition_id = args[:partition_id] if args.key?(:partition_id)
|
1120
|
+
@gql_query = args[:gql_query] if args.key?(:gql_query)
|
1121
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
1122
|
+
@query = args[:query] if args.key?(:query)
|
1123
|
+
end
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
# The request for google.datastore.v1beta3.Datastore.Lookup.
|
1127
|
+
class LookupRequest
|
1128
|
+
include Google::Apis::Core::Hashable
|
1129
|
+
|
1130
|
+
# The options shared by read requests.
|
1131
|
+
# Corresponds to the JSON property `readOptions`
|
1132
|
+
# @return [Google::Apis::DatastoreV1beta3::ReadOptions]
|
1133
|
+
attr_accessor :read_options
|
1134
|
+
|
1135
|
+
# Keys of entities to look up.
|
1136
|
+
# Corresponds to the JSON property `keys`
|
1137
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Key>]
|
1138
|
+
attr_accessor :keys
|
1139
|
+
|
1140
|
+
def initialize(**args)
|
1141
|
+
update!(**args)
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
# Update properties of this object
|
1145
|
+
def update!(**args)
|
1146
|
+
@read_options = args[:read_options] if args.key?(:read_options)
|
1147
|
+
@keys = args[:keys] if args.key?(:keys)
|
1148
|
+
end
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
1152
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
1153
|
+
# specified otherwise, this must conform to the
|
1154
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
1155
|
+
# standard</a>. Values must be within normalized ranges.
|
1156
|
+
# Example of normalization code in Python:
|
1157
|
+
# def NormalizeLongitude(longitude):
|
1158
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
1159
|
+
# q, r = divmod(longitude, 360.0)
|
1160
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
1161
|
+
# return r - 360.0
|
1162
|
+
# return r
|
1163
|
+
# def NormalizeLatLng(latitude, longitude):
|
1164
|
+
# """Wraps decimal degrees latitude and longitude to
|
1165
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
1166
|
+
# r = latitude % 360.0
|
1167
|
+
# if r <= 90.0:
|
1168
|
+
# return r, NormalizeLongitude(longitude)
|
1169
|
+
# elif r >= 270.0:
|
1170
|
+
# return r - 360, NormalizeLongitude(longitude)
|
1171
|
+
# else:
|
1172
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
1173
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
1174
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
1175
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
1176
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
1177
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
1178
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
1179
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
1180
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
1181
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
1182
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
1183
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
1184
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
1185
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
1186
|
+
class LatLng
|
1187
|
+
include Google::Apis::Core::Hashable
|
1188
|
+
|
1189
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
1190
|
+
# Corresponds to the JSON property `latitude`
|
1191
|
+
# @return [Float]
|
1192
|
+
attr_accessor :latitude
|
1193
|
+
|
1194
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
1195
|
+
# Corresponds to the JSON property `longitude`
|
1196
|
+
# @return [Float]
|
1197
|
+
attr_accessor :longitude
|
1198
|
+
|
1199
|
+
def initialize(**args)
|
1200
|
+
update!(**args)
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
# Update properties of this object
|
1204
|
+
def update!(**args)
|
1205
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
1206
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
1207
|
+
end
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
# A filter that merges multiple other filters using the given operator.
|
1211
|
+
class CompositeFilter
|
1212
|
+
include Google::Apis::Core::Hashable
|
1213
|
+
|
1214
|
+
# The operator for combining multiple filters.
|
1215
|
+
# Corresponds to the JSON property `op`
|
1216
|
+
# @return [String]
|
1217
|
+
attr_accessor :op
|
1218
|
+
|
1219
|
+
# The list of filters to combine.
|
1220
|
+
# Must contain at least one filter.
|
1221
|
+
# Corresponds to the JSON property `filters`
|
1222
|
+
# @return [Array<Google::Apis::DatastoreV1beta3::Filter>]
|
1223
|
+
attr_accessor :filters
|
1224
|
+
|
1225
|
+
def initialize(**args)
|
1226
|
+
update!(**args)
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
# Update properties of this object
|
1230
|
+
def update!(**args)
|
1231
|
+
@op = args[:op] if args.key?(:op)
|
1232
|
+
@filters = args[:filters] if args.key?(:filters)
|
1233
|
+
end
|
1234
|
+
end
|
1235
|
+
end
|
1236
|
+
end
|
1237
|
+
end
|