@@ -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
0 commit comments