Skip to content

Commit f429787

Browse files
feat: Automated regeneration of datastore v1 client (googleapis#20397)
Auto-created at 2024-10-20 09:10:27 +0000 using the toys pull request generator.
1 parent ab77f00 commit f429787

File tree

5 files changed

+135
-3
lines changed

5 files changed

+135
-3
lines changed

api_names_out.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140503,16 +140503,21 @@
140503140503
"/datastore:v1/LookupResponse/transaction": transaction
140504140504
"/datastore:v1/Mutation": mutation
140505140505
"/datastore:v1/Mutation/baseVersion": base_version
140506+
"/datastore:v1/Mutation/conflictResolutionStrategy": conflict_resolution_strategy
140506140507
"/datastore:v1/Mutation/delete": delete
140507140508
"/datastore:v1/Mutation/insert": insert
140508140509
"/datastore:v1/Mutation/propertyMask": property_mask
140510+
"/datastore:v1/Mutation/propertyTransforms": property_transforms
140511+
"/datastore:v1/Mutation/propertyTransforms/property_transform": property_transform
140509140512
"/datastore:v1/Mutation/update": update
140510140513
"/datastore:v1/Mutation/updateTime": update_time
140511140514
"/datastore:v1/Mutation/upsert": upsert
140512140515
"/datastore:v1/MutationResult": mutation_result
140513140516
"/datastore:v1/MutationResult/conflictDetected": conflict_detected
140514140517
"/datastore:v1/MutationResult/createTime": create_time
140515140518
"/datastore:v1/MutationResult/key": key
140519+
"/datastore:v1/MutationResult/transformResults": transform_results
140520+
"/datastore:v1/MutationResult/transformResults/transform_result": transform_result
140516140521
"/datastore:v1/MutationResult/updateTime": update_time
140517140522
"/datastore:v1/MutationResult/version": version
140518140523
"/datastore:v1/PartitionId": partition_id
@@ -140541,6 +140546,14 @@
140541140546
"/datastore:v1/PropertyOrder/property": property
140542140547
"/datastore:v1/PropertyReference": property_reference
140543140548
"/datastore:v1/PropertyReference/name": name
140549+
"/datastore:v1/PropertyTransform": property_transform
140550+
"/datastore:v1/PropertyTransform/appendMissingElements": append_missing_elements
140551+
"/datastore:v1/PropertyTransform/increment": increment
140552+
"/datastore:v1/PropertyTransform/maximum": maximum
140553+
"/datastore:v1/PropertyTransform/minimum": minimum
140554+
"/datastore:v1/PropertyTransform/property": property
140555+
"/datastore:v1/PropertyTransform/removeAllFromArray": remove_all_from_array
140556+
"/datastore:v1/PropertyTransform/setToServerValue": set_to_server_value
140544140557
"/datastore:v1/Query": query
140545140558
"/datastore:v1/Query/distinctOn": distinct_on
140546140559
"/datastore:v1/Query/distinctOn/distinct_on": distinct_on

generated/google-apis-datastore_v1/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release history for google-apis-datastore_v1
22

3+
### v0.39.0 (2024-10-20)
4+
5+
* Regenerated from discovery document revision 20241008
6+
* Regenerated using generator version 0.15.1
7+
38
### v0.38.0 (2024-05-19)
49

510
* Regenerated using generator version 0.15.0

generated/google-apis-datastore_v1/lib/google/apis/datastore_v1/classes.rb

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,12 @@ class Mutation
18271827
# @return [Fixnum]
18281828
attr_accessor :base_version
18291829

1830+
# The strategy to use when a conflict is detected. Defaults to `SERVER_VALUE`.
1831+
# If this is set, then `conflict_detection_strategy` must also be set.
1832+
# Corresponds to the JSON property `conflictResolutionStrategy`
1833+
# @return [String]
1834+
attr_accessor :conflict_resolution_strategy
1835+
18301836
# A unique identifier for an entity. If a key's partition ID or any of its path
18311837
# kinds or names are reserved/read-only, the key is reserved/read-only. A
18321838
# reserved/read-only key is forbidden in certain documented contexts.
@@ -1845,6 +1851,14 @@ class Mutation
18451851
# @return [Google::Apis::DatastoreV1::PropertyMask]
18461852
attr_accessor :property_mask
18471853

1854+
# Optional. The transforms to perform on the entity. This field can be set only
1855+
# when the operation is `insert`, `update`, or `upsert`. If present, the
1856+
# transforms are be applied to the entity regardless of the property mask, in
1857+
# order, after the operation.
1858+
# Corresponds to the JSON property `propertyTransforms`
1859+
# @return [Array<Google::Apis::DatastoreV1::PropertyTransform>]
1860+
attr_accessor :property_transforms
1861+
18481862
# A Datastore data object. Must not exceed 1 MiB - 4 bytes.
18491863
# Corresponds to the JSON property `update`
18501864
# @return [Google::Apis::DatastoreV1::Entity]
@@ -1868,9 +1882,11 @@ def initialize(**args)
18681882
# Update properties of this object
18691883
def update!(**args)
18701884
@base_version = args[:base_version] if args.key?(:base_version)
1885+
@conflict_resolution_strategy = args[:conflict_resolution_strategy] if args.key?(:conflict_resolution_strategy)
18711886
@delete = args[:delete] if args.key?(:delete)
18721887
@insert = args[:insert] if args.key?(:insert)
18731888
@property_mask = args[:property_mask] if args.key?(:property_mask)
1889+
@property_transforms = args[:property_transforms] if args.key?(:property_transforms)
18741890
@update = args[:update] if args.key?(:update)
18751891
@update_time = args[:update_time] if args.key?(:update_time)
18761892
@upsert = args[:upsert] if args.key?(:upsert)
@@ -1900,6 +1916,12 @@ class MutationResult
19001916
# @return [Google::Apis::DatastoreV1::Key]
19011917
attr_accessor :key
19021918

1919+
# The results of applying each PropertyTransform, in the same order of the
1920+
# request.
1921+
# Corresponds to the JSON property `transformResults`
1922+
# @return [Array<Google::Apis::DatastoreV1::Value>]
1923+
attr_accessor :transform_results
1924+
19031925
# The update time of the entity on the server after processing the mutation. If
19041926
# the mutation doesn't change anything on the server, then the timestamp will be
19051927
# the update timestamp of the current entity. This field will not be set after a
@@ -1926,6 +1948,7 @@ def update!(**args)
19261948
@conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
19271949
@create_time = args[:create_time] if args.key?(:create_time)
19281950
@key = args[:key] if args.key?(:key)
1951+
@transform_results = args[:transform_results] if args.key?(:transform_results)
19291952
@update_time = args[:update_time] if args.key?(:update_time)
19301953
@version = args[:version] if args.key?(:version)
19311954
end
@@ -2152,6 +2175,68 @@ def update!(**args)
21522175
end
21532176
end
21542177

2178+
# A transformation of an entity property.
2179+
class PropertyTransform
2180+
include Google::Apis::Core::Hashable
2181+
2182+
# An array value.
2183+
# Corresponds to the JSON property `appendMissingElements`
2184+
# @return [Google::Apis::DatastoreV1::ArrayValue]
2185+
attr_accessor :append_missing_elements
2186+
2187+
# A message that can hold any of the supported value types and associated
2188+
# metadata.
2189+
# Corresponds to the JSON property `increment`
2190+
# @return [Google::Apis::DatastoreV1::Value]
2191+
attr_accessor :increment
2192+
2193+
# A message that can hold any of the supported value types and associated
2194+
# metadata.
2195+
# Corresponds to the JSON property `maximum`
2196+
# @return [Google::Apis::DatastoreV1::Value]
2197+
attr_accessor :maximum
2198+
2199+
# A message that can hold any of the supported value types and associated
2200+
# metadata.
2201+
# Corresponds to the JSON property `minimum`
2202+
# @return [Google::Apis::DatastoreV1::Value]
2203+
attr_accessor :minimum
2204+
2205+
# Optional. The name of the property. Property paths (a list of property names
2206+
# separated by dots (`.`)) may be used to refer to properties inside entity
2207+
# values. For example `foo.bar` means the property `bar` inside the entity
2208+
# property `foo`. If a property name contains a dot `.` or a backlslash `\`,
2209+
# then that name must be escaped.
2210+
# Corresponds to the JSON property `property`
2211+
# @return [String]
2212+
attr_accessor :property
2213+
2214+
# An array value.
2215+
# Corresponds to the JSON property `removeAllFromArray`
2216+
# @return [Google::Apis::DatastoreV1::ArrayValue]
2217+
attr_accessor :remove_all_from_array
2218+
2219+
# Sets the property to the given server value.
2220+
# Corresponds to the JSON property `setToServerValue`
2221+
# @return [String]
2222+
attr_accessor :set_to_server_value
2223+
2224+
def initialize(**args)
2225+
update!(**args)
2226+
end
2227+
2228+
# Update properties of this object
2229+
def update!(**args)
2230+
@append_missing_elements = args[:append_missing_elements] if args.key?(:append_missing_elements)
2231+
@increment = args[:increment] if args.key?(:increment)
2232+
@maximum = args[:maximum] if args.key?(:maximum)
2233+
@minimum = args[:minimum] if args.key?(:minimum)
2234+
@property = args[:property] if args.key?(:property)
2235+
@remove_all_from_array = args[:remove_all_from_array] if args.key?(:remove_all_from_array)
2236+
@set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value)
2237+
end
2238+
end
2239+
21552240
# A query for entities.
21562241
class Query
21572242
include Google::Apis::Core::Hashable

generated/google-apis-datastore_v1/lib/google/apis/datastore_v1/gem_version.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module DatastoreV1
1818
# Version of the google-apis-datastore_v1 gem
19-
GEM_VERSION = "0.38.0"
19+
GEM_VERSION = "0.39.0"
2020

2121
# Version of the code generator used to generate this client
22-
GENERATOR_VERSION = "0.15.0"
22+
GENERATOR_VERSION = "0.15.1"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20240317"
25+
REVISION = "20241008"
2626
end
2727
end
2828
end

generated/google-apis-datastore_v1/lib/google/apis/datastore_v1/representations.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
400400
include Google::Apis::Core::JsonObjectSupport
401401
end
402402

403+
class PropertyTransform
404+
class Representation < Google::Apis::Core::JsonRepresentation; end
405+
406+
include Google::Apis::Core::JsonObjectSupport
407+
end
408+
403409
class Query
404410
class Representation < Google::Apis::Core::JsonRepresentation; end
405411

@@ -1023,12 +1029,15 @@ class Mutation
10231029
# @private
10241030
class Representation < Google::Apis::Core::JsonRepresentation
10251031
property :base_version, :numeric_string => true, as: 'baseVersion'
1032+
property :conflict_resolution_strategy, as: 'conflictResolutionStrategy'
10261033
property :delete, as: 'delete', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
10271034

10281035
property :insert, as: 'insert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
10291036

10301037
property :property_mask, as: 'propertyMask', class: Google::Apis::DatastoreV1::PropertyMask, decorator: Google::Apis::DatastoreV1::PropertyMask::Representation
10311038

1039+
collection :property_transforms, as: 'propertyTransforms', class: Google::Apis::DatastoreV1::PropertyTransform, decorator: Google::Apis::DatastoreV1::PropertyTransform::Representation
1040+
10321041
property :update, as: 'update', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
10331042

10341043
property :update_time, as: 'updateTime'
@@ -1044,6 +1053,8 @@ class Representation < Google::Apis::Core::JsonRepresentation
10441053
property :create_time, as: 'createTime'
10451054
property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
10461055

1056+
collection :transform_results, as: 'transformResults', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1057+
10471058
property :update_time, as: 'updateTime'
10481059
property :version, :numeric_string => true, as: 'version'
10491060
end
@@ -1116,6 +1127,24 @@ class Representation < Google::Apis::Core::JsonRepresentation
11161127
end
11171128
end
11181129

1130+
class PropertyTransform
1131+
# @private
1132+
class Representation < Google::Apis::Core::JsonRepresentation
1133+
property :append_missing_elements, as: 'appendMissingElements', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
1134+
1135+
property :increment, as: 'increment', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1136+
1137+
property :maximum, as: 'maximum', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1138+
1139+
property :minimum, as: 'minimum', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1140+
1141+
property :property, as: 'property'
1142+
property :remove_all_from_array, as: 'removeAllFromArray', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
1143+
1144+
property :set_to_server_value, as: 'setToServerValue'
1145+
end
1146+
end
1147+
11191148
class Query
11201149
# @private
11211150
class Representation < Google::Apis::Core::JsonRepresentation

0 commit comments

Comments
 (0)