google-apis-datastore_v1 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e3e24d9ab67d083ae2b294ce049c40f1d017b0019cf750771876132af95fcc4
4
- data.tar.gz: 49069a3e3c143b52ec6524ea4fb947061ef0ed2cae511a93e8bdc5d586bc5af4
3
+ metadata.gz: 3948fb01c0e464276aa4b17a4344ea876f15d8a10ded3c0536bf4d8ba1d4ec85
4
+ data.tar.gz: 99caa454d159919e03b173038ee3c015a4f60ef14293f2f706aeaff166dbdb71
5
5
  SHA512:
6
- metadata.gz: 57ad4d171ead6e441457c88827d4b87e8e38a0f782ecc01c5b1fe7b8a56b5a775208be073d2a68c33be91702a4d2a6a06a5c26d9559f574662212b0e6be5e4cf
7
- data.tar.gz: 1eaeb92ba96fb9a99e0b1b87a641cde5a02ffb17bccf0bedf113fc2e7be36d19f8a487d99c39deaa4243d5d58941d01dc2780237dd889fd2945430178de59d98
6
+ metadata.gz: 8f3317a8ac15315ad8eddb7d91202631446f5f7ebdf8729ad6c191bc64c68fe59412aad48442d7e053294babc56f2efedc3fede8cbdfbd9b95410967a8f67660
7
+ data.tar.gz: 70975e6ae0581b75dae441657dc8df94e40cd2aa646b1687e4473b45bc9f481a75afd70de80f75a8c8f28670bd4fd43ab03ca6ca97f977f56807ef11caf83a4f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-datastore_v1
2
2
 
3
+ ### v0.40.0 (2024-11-03)
4
+
5
+ * Regenerated from discovery document revision 20241018
6
+
7
+ ### v0.39.0 (2024-10-20)
8
+
9
+ * Regenerated from discovery document revision 20241008
10
+ * Regenerated using generator version 0.15.1
11
+
3
12
  ### v0.38.0 (2024-05-19)
4
13
 
5
14
  * Regenerated using generator version 0.15.0
@@ -94,7 +94,9 @@ module Google
94
94
  # @return [Array<Google::Apis::DatastoreV1::Aggregation>]
95
95
  attr_accessor :aggregations
96
96
 
97
- # A query for entities.
97
+ # A query for entities. The query stages are executed in the following order: 1.
98
+ # kind 2. filter 3. projection 4. order + start_cursor + end_cursor 5. offset 6.
99
+ # limit 7. find_nearest
98
100
  # Corresponds to the JSON property `nestedQuery`
99
101
  # @return [Google::Apis::DatastoreV1::Query]
100
102
  attr_accessor :nested_query
@@ -654,6 +656,66 @@ module Google
654
656
  end
655
657
  end
656
658
 
659
+ # Nearest Neighbors search config. The ordering provided by FindNearest
660
+ # supersedes the order_by stage. If multiple documents have the same vector
661
+ # distance, the returned document order is not guaranteed to be stable between
662
+ # queries.
663
+ class FindNearest
664
+ include Google::Apis::Core::Hashable
665
+
666
+ # Required. The Distance Measure to use, required.
667
+ # Corresponds to the JSON property `distanceMeasure`
668
+ # @return [String]
669
+ attr_accessor :distance_measure
670
+
671
+ # Optional. Optional name of the field to output the result of the vector
672
+ # distance calculation. Must conform to entity property limitations.
673
+ # Corresponds to the JSON property `distanceResultProperty`
674
+ # @return [String]
675
+ attr_accessor :distance_result_property
676
+
677
+ # Optional. Option to specify a threshold for which no less similar documents
678
+ # will be returned. The behavior of the specified `distance_measure` will affect
679
+ # the meaning of the distance threshold. Since DOT_PRODUCT distances increase
680
+ # when the vectors are more similar, the comparison is inverted. * For EUCLIDEAN,
681
+ # COSINE: WHERE distance <= distance_threshold * For DOT_PRODUCT: WHERE
682
+ # distance >= distance_threshold
683
+ # Corresponds to the JSON property `distanceThreshold`
684
+ # @return [Float]
685
+ attr_accessor :distance_threshold
686
+
687
+ # Required. The number of nearest neighbors to return. Must be a positive
688
+ # integer of no more than 100.
689
+ # Corresponds to the JSON property `limit`
690
+ # @return [Fixnum]
691
+ attr_accessor :limit
692
+
693
+ # A message that can hold any of the supported value types and associated
694
+ # metadata.
695
+ # Corresponds to the JSON property `queryVector`
696
+ # @return [Google::Apis::DatastoreV1::Value]
697
+ attr_accessor :query_vector
698
+
699
+ # A reference to a property relative to the kind expressions.
700
+ # Corresponds to the JSON property `vectorProperty`
701
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
702
+ attr_accessor :vector_property
703
+
704
+ def initialize(**args)
705
+ update!(**args)
706
+ end
707
+
708
+ # Update properties of this object
709
+ def update!(**args)
710
+ @distance_measure = args[:distance_measure] if args.key?(:distance_measure)
711
+ @distance_result_property = args[:distance_result_property] if args.key?(:distance_result_property)
712
+ @distance_threshold = args[:distance_threshold] if args.key?(:distance_threshold)
713
+ @limit = args[:limit] if args.key?(:limit)
714
+ @query_vector = args[:query_vector] if args.key?(:query_vector)
715
+ @vector_property = args[:vector_property] if args.key?(:vector_property)
716
+ end
717
+ end
718
+
657
719
  # Metadata common to all Datastore Admin operations.
658
720
  class GoogleDatastoreAdminV1CommonMetadata
659
721
  include Google::Apis::Core::Hashable
@@ -1827,6 +1889,12 @@ module Google
1827
1889
  # @return [Fixnum]
1828
1890
  attr_accessor :base_version
1829
1891
 
1892
+ # The strategy to use when a conflict is detected. Defaults to `SERVER_VALUE`.
1893
+ # If this is set, then `conflict_detection_strategy` must also be set.
1894
+ # Corresponds to the JSON property `conflictResolutionStrategy`
1895
+ # @return [String]
1896
+ attr_accessor :conflict_resolution_strategy
1897
+
1830
1898
  # A unique identifier for an entity. If a key's partition ID or any of its path
1831
1899
  # kinds or names are reserved/read-only, the key is reserved/read-only. A
1832
1900
  # reserved/read-only key is forbidden in certain documented contexts.
@@ -1845,6 +1913,14 @@ module Google
1845
1913
  # @return [Google::Apis::DatastoreV1::PropertyMask]
1846
1914
  attr_accessor :property_mask
1847
1915
 
1916
+ # Optional. The transforms to perform on the entity. This field can be set only
1917
+ # when the operation is `insert`, `update`, or `upsert`. If present, the
1918
+ # transforms are be applied to the entity regardless of the property mask, in
1919
+ # order, after the operation.
1920
+ # Corresponds to the JSON property `propertyTransforms`
1921
+ # @return [Array<Google::Apis::DatastoreV1::PropertyTransform>]
1922
+ attr_accessor :property_transforms
1923
+
1848
1924
  # A Datastore data object. Must not exceed 1 MiB - 4 bytes.
1849
1925
  # Corresponds to the JSON property `update`
1850
1926
  # @return [Google::Apis::DatastoreV1::Entity]
@@ -1868,9 +1944,11 @@ module Google
1868
1944
  # Update properties of this object
1869
1945
  def update!(**args)
1870
1946
  @base_version = args[:base_version] if args.key?(:base_version)
1947
+ @conflict_resolution_strategy = args[:conflict_resolution_strategy] if args.key?(:conflict_resolution_strategy)
1871
1948
  @delete = args[:delete] if args.key?(:delete)
1872
1949
  @insert = args[:insert] if args.key?(:insert)
1873
1950
  @property_mask = args[:property_mask] if args.key?(:property_mask)
1951
+ @property_transforms = args[:property_transforms] if args.key?(:property_transforms)
1874
1952
  @update = args[:update] if args.key?(:update)
1875
1953
  @update_time = args[:update_time] if args.key?(:update_time)
1876
1954
  @upsert = args[:upsert] if args.key?(:upsert)
@@ -1900,6 +1978,12 @@ module Google
1900
1978
  # @return [Google::Apis::DatastoreV1::Key]
1901
1979
  attr_accessor :key
1902
1980
 
1981
+ # The results of applying each PropertyTransform, in the same order of the
1982
+ # request.
1983
+ # Corresponds to the JSON property `transformResults`
1984
+ # @return [Array<Google::Apis::DatastoreV1::Value>]
1985
+ attr_accessor :transform_results
1986
+
1903
1987
  # The update time of the entity on the server after processing the mutation. If
1904
1988
  # the mutation doesn't change anything on the server, then the timestamp will be
1905
1989
  # the update timestamp of the current entity. This field will not be set after a
@@ -1926,6 +2010,7 @@ module Google
1926
2010
  @conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
1927
2011
  @create_time = args[:create_time] if args.key?(:create_time)
1928
2012
  @key = args[:key] if args.key?(:key)
2013
+ @transform_results = args[:transform_results] if args.key?(:transform_results)
1929
2014
  @update_time = args[:update_time] if args.key?(:update_time)
1930
2015
  @version = args[:version] if args.key?(:version)
1931
2016
  end
@@ -2152,7 +2237,71 @@ module Google
2152
2237
  end
2153
2238
  end
2154
2239
 
2155
- # A query for entities.
2240
+ # A transformation of an entity property.
2241
+ class PropertyTransform
2242
+ include Google::Apis::Core::Hashable
2243
+
2244
+ # An array value.
2245
+ # Corresponds to the JSON property `appendMissingElements`
2246
+ # @return [Google::Apis::DatastoreV1::ArrayValue]
2247
+ attr_accessor :append_missing_elements
2248
+
2249
+ # A message that can hold any of the supported value types and associated
2250
+ # metadata.
2251
+ # Corresponds to the JSON property `increment`
2252
+ # @return [Google::Apis::DatastoreV1::Value]
2253
+ attr_accessor :increment
2254
+
2255
+ # A message that can hold any of the supported value types and associated
2256
+ # metadata.
2257
+ # Corresponds to the JSON property `maximum`
2258
+ # @return [Google::Apis::DatastoreV1::Value]
2259
+ attr_accessor :maximum
2260
+
2261
+ # A message that can hold any of the supported value types and associated
2262
+ # metadata.
2263
+ # Corresponds to the JSON property `minimum`
2264
+ # @return [Google::Apis::DatastoreV1::Value]
2265
+ attr_accessor :minimum
2266
+
2267
+ # Optional. The name of the property. Property paths (a list of property names
2268
+ # separated by dots (`.`)) may be used to refer to properties inside entity
2269
+ # values. For example `foo.bar` means the property `bar` inside the entity
2270
+ # property `foo`. If a property name contains a dot `.` or a backlslash `\`,
2271
+ # then that name must be escaped.
2272
+ # Corresponds to the JSON property `property`
2273
+ # @return [String]
2274
+ attr_accessor :property
2275
+
2276
+ # An array value.
2277
+ # Corresponds to the JSON property `removeAllFromArray`
2278
+ # @return [Google::Apis::DatastoreV1::ArrayValue]
2279
+ attr_accessor :remove_all_from_array
2280
+
2281
+ # Sets the property to the given server value.
2282
+ # Corresponds to the JSON property `setToServerValue`
2283
+ # @return [String]
2284
+ attr_accessor :set_to_server_value
2285
+
2286
+ def initialize(**args)
2287
+ update!(**args)
2288
+ end
2289
+
2290
+ # Update properties of this object
2291
+ def update!(**args)
2292
+ @append_missing_elements = args[:append_missing_elements] if args.key?(:append_missing_elements)
2293
+ @increment = args[:increment] if args.key?(:increment)
2294
+ @maximum = args[:maximum] if args.key?(:maximum)
2295
+ @minimum = args[:minimum] if args.key?(:minimum)
2296
+ @property = args[:property] if args.key?(:property)
2297
+ @remove_all_from_array = args[:remove_all_from_array] if args.key?(:remove_all_from_array)
2298
+ @set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value)
2299
+ end
2300
+ end
2301
+
2302
+ # A query for entities. The query stages are executed in the following order: 1.
2303
+ # kind 2. filter 3. projection 4. order + start_cursor + end_cursor 5. offset 6.
2304
+ # limit 7. find_nearest
2156
2305
  class Query
2157
2306
  include Google::Apis::Core::Hashable
2158
2307
 
@@ -2178,6 +2327,14 @@ module Google
2178
2327
  # @return [Google::Apis::DatastoreV1::Filter]
2179
2328
  attr_accessor :filter
2180
2329
 
2330
+ # Nearest Neighbors search config. The ordering provided by FindNearest
2331
+ # supersedes the order_by stage. If multiple documents have the same vector
2332
+ # distance, the returned document order is not guaranteed to be stable between
2333
+ # queries.
2334
+ # Corresponds to the JSON property `findNearest`
2335
+ # @return [Google::Apis::DatastoreV1::FindNearest]
2336
+ attr_accessor :find_nearest
2337
+
2181
2338
  # The kinds to query (if empty, returns entities of all kinds). Currently at
2182
2339
  # most 1 kind may be specified.
2183
2340
  # Corresponds to the JSON property `kind`
@@ -2223,6 +2380,7 @@ module Google
2223
2380
  @distinct_on = args[:distinct_on] if args.key?(:distinct_on)
2224
2381
  @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
2225
2382
  @filter = args[:filter] if args.key?(:filter)
2383
+ @find_nearest = args[:find_nearest] if args.key?(:find_nearest)
2226
2384
  @kind = args[:kind] if args.key?(:kind)
2227
2385
  @limit = args[:limit] if args.key?(:limit)
2228
2386
  @offset = args[:offset] if args.key?(:offset)
@@ -2613,7 +2771,9 @@ module Google
2613
2771
  # @return [Google::Apis::DatastoreV1::PropertyMask]
2614
2772
  attr_accessor :property_mask
2615
2773
 
2616
- # A query for entities.
2774
+ # A query for entities. The query stages are executed in the following order: 1.
2775
+ # kind 2. filter 3. projection 4. order + start_cursor + end_cursor 5. offset 6.
2776
+ # limit 7. find_nearest
2617
2777
  # Corresponds to the JSON property `query`
2618
2778
  # @return [Google::Apis::DatastoreV1::Query]
2619
2779
  attr_accessor :query
@@ -2653,7 +2813,9 @@ module Google
2653
2813
  # @return [Google::Apis::DatastoreV1::ExplainMetrics]
2654
2814
  attr_accessor :explain_metrics
2655
2815
 
2656
- # A query for entities.
2816
+ # A query for entities. The query stages are executed in the following order: 1.
2817
+ # kind 2. filter 3. projection 4. order + start_cursor + end_cursor 5. offset 6.
2818
+ # limit 7. find_nearest
2657
2819
  # Corresponds to the JSON property `query`
2658
2820
  # @return [Google::Apis::DatastoreV1::Query]
2659
2821
  attr_accessor :query
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module DatastoreV1
18
18
  # Version of the google-apis-datastore_v1 gem
19
- GEM_VERSION = "0.38.0"
19
+ GEM_VERSION = "0.40.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.15.0"
22
+ GENERATOR_VERSION = "0.15.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240317"
25
+ REVISION = "20241018"
26
26
  end
27
27
  end
28
28
  end
@@ -148,6 +148,12 @@ module Google
148
148
  include Google::Apis::Core::JsonObjectSupport
149
149
  end
150
150
 
151
+ class FindNearest
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
151
157
  class GoogleDatastoreAdminV1CommonMetadata
152
158
  class Representation < Google::Apis::Core::JsonRepresentation; end
153
159
 
@@ -400,6 +406,12 @@ module Google
400
406
  include Google::Apis::Core::JsonObjectSupport
401
407
  end
402
408
 
409
+ class PropertyTransform
410
+ class Representation < Google::Apis::Core::JsonRepresentation; end
411
+
412
+ include Google::Apis::Core::JsonObjectSupport
413
+ end
414
+
403
415
  class Query
404
416
  class Representation < Google::Apis::Core::JsonRepresentation; end
405
417
 
@@ -696,6 +708,20 @@ module Google
696
708
  end
697
709
  end
698
710
 
711
+ class FindNearest
712
+ # @private
713
+ class Representation < Google::Apis::Core::JsonRepresentation
714
+ property :distance_measure, as: 'distanceMeasure'
715
+ property :distance_result_property, as: 'distanceResultProperty'
716
+ property :distance_threshold, as: 'distanceThreshold'
717
+ property :limit, as: 'limit'
718
+ property :query_vector, as: 'queryVector', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
719
+
720
+ property :vector_property, as: 'vectorProperty', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation
721
+
722
+ end
723
+ end
724
+
699
725
  class GoogleDatastoreAdminV1CommonMetadata
700
726
  # @private
701
727
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1023,12 +1049,15 @@ module Google
1023
1049
  # @private
1024
1050
  class Representation < Google::Apis::Core::JsonRepresentation
1025
1051
  property :base_version, :numeric_string => true, as: 'baseVersion'
1052
+ property :conflict_resolution_strategy, as: 'conflictResolutionStrategy'
1026
1053
  property :delete, as: 'delete', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
1027
1054
 
1028
1055
  property :insert, as: 'insert', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
1029
1056
 
1030
1057
  property :property_mask, as: 'propertyMask', class: Google::Apis::DatastoreV1::PropertyMask, decorator: Google::Apis::DatastoreV1::PropertyMask::Representation
1031
1058
 
1059
+ collection :property_transforms, as: 'propertyTransforms', class: Google::Apis::DatastoreV1::PropertyTransform, decorator: Google::Apis::DatastoreV1::PropertyTransform::Representation
1060
+
1032
1061
  property :update, as: 'update', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation
1033
1062
 
1034
1063
  property :update_time, as: 'updateTime'
@@ -1044,6 +1073,8 @@ module Google
1044
1073
  property :create_time, as: 'createTime'
1045
1074
  property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation
1046
1075
 
1076
+ collection :transform_results, as: 'transformResults', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1077
+
1047
1078
  property :update_time, as: 'updateTime'
1048
1079
  property :version, :numeric_string => true, as: 'version'
1049
1080
  end
@@ -1116,6 +1147,24 @@ module Google
1116
1147
  end
1117
1148
  end
1118
1149
 
1150
+ class PropertyTransform
1151
+ # @private
1152
+ class Representation < Google::Apis::Core::JsonRepresentation
1153
+ property :append_missing_elements, as: 'appendMissingElements', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
1154
+
1155
+ property :increment, as: 'increment', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1156
+
1157
+ property :maximum, as: 'maximum', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1158
+
1159
+ property :minimum, as: 'minimum', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation
1160
+
1161
+ property :property, as: 'property'
1162
+ property :remove_all_from_array, as: 'removeAllFromArray', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation
1163
+
1164
+ property :set_to_server_value, as: 'setToServerValue'
1165
+ end
1166
+ end
1167
+
1119
1168
  class Query
1120
1169
  # @private
1121
1170
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1124,6 +1173,8 @@ module Google
1124
1173
  property :end_cursor, :base64 => true, as: 'endCursor'
1125
1174
  property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation
1126
1175
 
1176
+ property :find_nearest, as: 'findNearest', class: Google::Apis::DatastoreV1::FindNearest, decorator: Google::Apis::DatastoreV1::FindNearest::Representation
1177
+
1127
1178
  collection :kind, as: 'kind', class: Google::Apis::DatastoreV1::KindExpression, decorator: Google::Apis::DatastoreV1::KindExpression::Representation
1128
1179
 
1129
1180
  property :limit, as: 'limit'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-datastore_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-26 00:00:00.000000000 Z
11
+ date: 2024-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datastore_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-datastore_v1/v0.38.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-datastore_v1/v0.40.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datastore_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.5.6
78
+ rubygems_version: 3.5.21
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Cloud Datastore API V1