google-cloud-datastore-v1 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb8c9f572ab0c660ea1154a6658bd2c3eda2ee81df80d60855a988d6a2fd147a
4
- data.tar.gz: 76248d8f01388ea24dff7fa7f9008bc89d30477bc4f6d149d44117aff1d11c5b
3
+ metadata.gz: 40547a8a273560ebb8959396340c4d8d1fa1aefc09d754c4aef44a39c53ae048
4
+ data.tar.gz: 12a520f6ff7e6778b1e0e55c1c32aae8d05fcae861c6d945d9c173de8ac31a6e
5
5
  SHA512:
6
- metadata.gz: 8bd5b9cb0d229039c3406b86595f91231101c531bf0c599cf282c2a562b5cebde65d7e44cd66cbca8ab2f6a85b30ef39ed86a51d21c3d51fe8c14dbf9d5a8bdc
7
- data.tar.gz: 1a70771b803bf567a18b090e49294abe9279bb589d74b71239cae703e2e227eb263c06189a6fbfb720909a7e741e1e67cae27422887736707061505f0fe92eb5
6
+ metadata.gz: 4689deec549b20ba89de52c5eeee5e29b8643ad3097bd0f893c3aa818a7449e3f3c4d4b75d2be09bc6d0f846896329edf03d731b0097e999de92efe4f4b8b03c
7
+ data.tar.gz: '0389d04daf27d7ca7eac240e6027f9885d5f9df81f409c521ccd63052369bbd2f14f5416680fa0ad669eb226670a0d7e8c849be0c52b1046f92037f802094f09'
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/datastore)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/datastore/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::Datastore::V1::Datastore::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
86
 
77
87
  ## Supported Ruby Versions
78
88
 
79
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
80
90
 
81
91
  Google provides official support for Ruby versions that are actively supported
82
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -188,8 +188,28 @@ module Google
188
188
  universe_domain: @config.universe_domain,
189
189
  channel_args: @config.channel_args,
190
190
  interceptors: @config.interceptors,
191
- channel_pool_config: @config.channel_pool
191
+ channel_pool_config: @config.channel_pool,
192
+ logger: @config.logger
192
193
  )
194
+
195
+ @datastore_stub.stub_logger&.info do |entry|
196
+ entry.set_system_name
197
+ entry.set_service
198
+ entry.message = "Created client for #{entry.service}"
199
+ entry.set_credentials_fields credentials
200
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
201
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
202
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
203
+ end
204
+ end
205
+
206
+ ##
207
+ # The logger used for request/response debug logging.
208
+ #
209
+ # @return [Logger]
210
+ #
211
+ def logger
212
+ @datastore_stub.logger
193
213
  end
194
214
 
195
215
  # Service calls
@@ -293,7 +313,6 @@ module Google
293
313
 
294
314
  @datastore_stub.call_rpc :lookup, request, options: options do |response, operation|
295
315
  yield response, operation if block_given?
296
- return response
297
316
  end
298
317
  rescue ::GRPC::BadStatus => e
299
318
  raise ::Google::Cloud::Error.from_error(e)
@@ -333,8 +352,12 @@ module Google
333
352
  # The options for this query.
334
353
  # @param query [::Google::Cloud::Datastore::V1::Query, ::Hash]
335
354
  # The query to run.
355
+ #
356
+ # Note: The following fields are mutually exclusive: `query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
336
357
  # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash]
337
358
  # The GQL query to run. This query must be a non-aggregation query.
359
+ #
360
+ # Note: The following fields are mutually exclusive: `gql_query`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
338
361
  # @param property_mask [::Google::Cloud::Datastore::V1::PropertyMask, ::Hash]
339
362
  # The properties to return.
340
363
  # This field must not be set for a projection query.
@@ -407,7 +430,6 @@ module Google
407
430
 
408
431
  @datastore_stub.call_rpc :run_query, request, options: options do |response, operation|
409
432
  yield response, operation if block_given?
410
- return response
411
433
  end
412
434
  rescue ::GRPC::BadStatus => e
413
435
  raise ::Google::Cloud::Error.from_error(e)
@@ -447,8 +469,12 @@ module Google
447
469
  # The options for this query.
448
470
  # @param aggregation_query [::Google::Cloud::Datastore::V1::AggregationQuery, ::Hash]
449
471
  # The query to run.
472
+ #
473
+ # Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
450
474
  # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash]
451
475
  # The GQL query to run. This query must be an aggregation query.
476
+ #
477
+ # Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
452
478
  # @param explain_options [::Google::Cloud::Datastore::V1::ExplainOptions, ::Hash]
453
479
  # Optional. Explain options for the query. If set, additional query
454
480
  # statistics will be returned. If not, only query results will be returned.
@@ -515,7 +541,6 @@ module Google
515
541
 
516
542
  @datastore_stub.call_rpc :run_aggregation_query, request, options: options do |response, operation|
517
543
  yield response, operation if block_given?
518
- return response
519
544
  end
520
545
  rescue ::GRPC::BadStatus => e
521
546
  raise ::Google::Cloud::Error.from_error(e)
@@ -611,7 +636,6 @@ module Google
611
636
 
612
637
  @datastore_stub.call_rpc :begin_transaction, request, options: options do |response, operation|
613
638
  yield response, operation if block_given?
614
- return response
615
639
  end
616
640
  rescue ::GRPC::BadStatus => e
617
641
  raise ::Google::Cloud::Error.from_error(e)
@@ -649,11 +673,15 @@ module Google
649
673
  # The identifier of the transaction associated with the commit. A
650
674
  # transaction identifier is returned by a call to
651
675
  # {::Google::Cloud::Datastore::V1::Datastore::Client#begin_transaction Datastore.BeginTransaction}.
676
+ #
677
+ # Note: The following fields are mutually exclusive: `transaction`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
652
678
  # @param single_use_transaction [::Google::Cloud::Datastore::V1::TransactionOptions, ::Hash]
653
679
  # Options for beginning a new transaction for this request.
654
680
  # The transaction is committed when the request completes. If specified,
655
681
  # {::Google::Cloud::Datastore::V1::TransactionOptions TransactionOptions.mode} must be
656
682
  # {::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite TransactionOptions.ReadWrite}.
683
+ #
684
+ # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
657
685
  # @param mutations [::Array<::Google::Cloud::Datastore::V1::Mutation, ::Hash>]
658
686
  # The mutations to perform.
659
687
  #
@@ -731,7 +759,6 @@ module Google
731
759
 
732
760
  @datastore_stub.call_rpc :commit, request, options: options do |response, operation|
733
761
  yield response, operation if block_given?
734
- return response
735
762
  end
736
763
  rescue ::GRPC::BadStatus => e
737
764
  raise ::Google::Cloud::Error.from_error(e)
@@ -828,7 +855,6 @@ module Google
828
855
 
829
856
  @datastore_stub.call_rpc :rollback, request, options: options do |response, operation|
830
857
  yield response, operation if block_given?
831
- return response
832
858
  end
833
859
  rescue ::GRPC::BadStatus => e
834
860
  raise ::Google::Cloud::Error.from_error(e)
@@ -926,7 +952,6 @@ module Google
926
952
 
927
953
  @datastore_stub.call_rpc :allocate_ids, request, options: options do |response, operation|
928
954
  yield response, operation if block_given?
929
- return response
930
955
  end
931
956
  rescue ::GRPC::BadStatus => e
932
957
  raise ::Google::Cloud::Error.from_error(e)
@@ -1024,7 +1049,6 @@ module Google
1024
1049
 
1025
1050
  @datastore_stub.call_rpc :reserve_ids, request, options: options do |response, operation|
1026
1051
  yield response, operation if block_given?
1027
- return response
1028
1052
  end
1029
1053
  rescue ::GRPC::BadStatus => e
1030
1054
  raise ::Google::Cloud::Error.from_error(e)
@@ -1074,6 +1098,13 @@ module Google
1074
1098
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1075
1099
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1076
1100
  # * (`nil`) indicating no credentials
1101
+ #
1102
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1103
+ # external source for authentication to Google Cloud, you must validate it before
1104
+ # providing it to a Google API client library. Providing an unvalidated credential
1105
+ # configuration to Google APIs can compromise the security of your systems and data.
1106
+ # For more information, refer to [Validate credential configurations from external
1107
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1077
1108
  # @return [::Object]
1078
1109
  # @!attribute [rw] scope
1079
1110
  # The OAuth scopes
@@ -1113,6 +1144,11 @@ module Google
1113
1144
  # default endpoint URL. The default value of nil uses the environment
1114
1145
  # universe (usually the default "googleapis.com" universe).
1115
1146
  # @return [::String,nil]
1147
+ # @!attribute [rw] logger
1148
+ # A custom logger to use for request/response debug logging, or the value
1149
+ # `:default` (the default) to construct a default logger, or `nil` to
1150
+ # explicitly disable logging.
1151
+ # @return [::Logger,:default,nil]
1116
1152
  #
1117
1153
  class Configuration
1118
1154
  extend ::Gapic::Config
@@ -1137,6 +1173,7 @@ module Google
1137
1173
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1138
1174
  config_attr :quota_project, nil, ::String, nil
1139
1175
  config_attr :universe_domain, nil, ::String, nil
1176
+ config_attr :logger, :default, ::Logger, nil, :default
1140
1177
 
1141
1178
  # @private
1142
1179
  def initialize parent_config = nil
@@ -181,8 +181,28 @@ module Google
181
181
  endpoint: @config.endpoint,
182
182
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
183
183
  universe_domain: @config.universe_domain,
184
- credentials: credentials
184
+ credentials: credentials,
185
+ logger: @config.logger
185
186
  )
187
+
188
+ @datastore_stub.logger(stub: true)&.info do |entry|
189
+ entry.set_system_name
190
+ entry.set_service
191
+ entry.message = "Created client for #{entry.service}"
192
+ entry.set_credentials_fields credentials
193
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
194
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
195
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
196
+ end
197
+ end
198
+
199
+ ##
200
+ # The logger used for request/response debug logging.
201
+ #
202
+ # @return [Logger]
203
+ #
204
+ def logger
205
+ @datastore_stub.logger
186
206
  end
187
207
 
188
208
  # Service calls
@@ -276,7 +296,6 @@ module Google
276
296
 
277
297
  @datastore_stub.lookup request, options do |result, operation|
278
298
  yield result, operation if block_given?
279
- return result
280
299
  end
281
300
  rescue ::Gapic::Rest::Error => e
282
301
  raise ::Google::Cloud::Error.from_error(e)
@@ -316,8 +335,12 @@ module Google
316
335
  # The options for this query.
317
336
  # @param query [::Google::Cloud::Datastore::V1::Query, ::Hash]
318
337
  # The query to run.
338
+ #
339
+ # Note: The following fields are mutually exclusive: `query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
319
340
  # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash]
320
341
  # The GQL query to run. This query must be a non-aggregation query.
342
+ #
343
+ # Note: The following fields are mutually exclusive: `gql_query`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
321
344
  # @param property_mask [::Google::Cloud::Datastore::V1::PropertyMask, ::Hash]
322
345
  # The properties to return.
323
346
  # This field must not be set for a projection query.
@@ -380,7 +403,6 @@ module Google
380
403
 
381
404
  @datastore_stub.run_query request, options do |result, operation|
382
405
  yield result, operation if block_given?
383
- return result
384
406
  end
385
407
  rescue ::Gapic::Rest::Error => e
386
408
  raise ::Google::Cloud::Error.from_error(e)
@@ -420,8 +442,12 @@ module Google
420
442
  # The options for this query.
421
443
  # @param aggregation_query [::Google::Cloud::Datastore::V1::AggregationQuery, ::Hash]
422
444
  # The query to run.
445
+ #
446
+ # Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
423
447
  # @param gql_query [::Google::Cloud::Datastore::V1::GqlQuery, ::Hash]
424
448
  # The GQL query to run. This query must be an aggregation query.
449
+ #
450
+ # Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
425
451
  # @param explain_options [::Google::Cloud::Datastore::V1::ExplainOptions, ::Hash]
426
452
  # Optional. Explain options for the query. If set, additional query
427
453
  # statistics will be returned. If not, only query results will be returned.
@@ -478,7 +504,6 @@ module Google
478
504
 
479
505
  @datastore_stub.run_aggregation_query request, options do |result, operation|
480
506
  yield result, operation if block_given?
481
- return result
482
507
  end
483
508
  rescue ::Gapic::Rest::Error => e
484
509
  raise ::Google::Cloud::Error.from_error(e)
@@ -564,7 +589,6 @@ module Google
564
589
 
565
590
  @datastore_stub.begin_transaction request, options do |result, operation|
566
591
  yield result, operation if block_given?
567
- return result
568
592
  end
569
593
  rescue ::Gapic::Rest::Error => e
570
594
  raise ::Google::Cloud::Error.from_error(e)
@@ -602,11 +626,15 @@ module Google
602
626
  # The identifier of the transaction associated with the commit. A
603
627
  # transaction identifier is returned by a call to
604
628
  # {::Google::Cloud::Datastore::V1::Datastore::Rest::Client#begin_transaction Datastore.BeginTransaction}.
629
+ #
630
+ # Note: The following fields are mutually exclusive: `transaction`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
605
631
  # @param single_use_transaction [::Google::Cloud::Datastore::V1::TransactionOptions, ::Hash]
606
632
  # Options for beginning a new transaction for this request.
607
633
  # The transaction is committed when the request completes. If specified,
608
634
  # {::Google::Cloud::Datastore::V1::TransactionOptions TransactionOptions.mode} must be
609
635
  # {::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite TransactionOptions.ReadWrite}.
636
+ #
637
+ # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
610
638
  # @param mutations [::Array<::Google::Cloud::Datastore::V1::Mutation, ::Hash>]
611
639
  # The mutations to perform.
612
640
  #
@@ -674,7 +702,6 @@ module Google
674
702
 
675
703
  @datastore_stub.commit request, options do |result, operation|
676
704
  yield result, operation if block_given?
677
- return result
678
705
  end
679
706
  rescue ::Gapic::Rest::Error => e
680
707
  raise ::Google::Cloud::Error.from_error(e)
@@ -761,7 +788,6 @@ module Google
761
788
 
762
789
  @datastore_stub.rollback request, options do |result, operation|
763
790
  yield result, operation if block_given?
764
- return result
765
791
  end
766
792
  rescue ::Gapic::Rest::Error => e
767
793
  raise ::Google::Cloud::Error.from_error(e)
@@ -849,7 +875,6 @@ module Google
849
875
 
850
876
  @datastore_stub.allocate_ids request, options do |result, operation|
851
877
  yield result, operation if block_given?
852
- return result
853
878
  end
854
879
  rescue ::Gapic::Rest::Error => e
855
880
  raise ::Google::Cloud::Error.from_error(e)
@@ -937,7 +962,6 @@ module Google
937
962
 
938
963
  @datastore_stub.reserve_ids request, options do |result, operation|
939
964
  yield result, operation if block_given?
940
- return result
941
965
  end
942
966
  rescue ::Gapic::Rest::Error => e
943
967
  raise ::Google::Cloud::Error.from_error(e)
@@ -985,6 +1009,13 @@ module Google
985
1009
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
986
1010
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
987
1011
  # * (`nil`) indicating no credentials
1012
+ #
1013
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1014
+ # external source for authentication to Google Cloud, you must validate it before
1015
+ # providing it to a Google API client library. Providing an unvalidated credential
1016
+ # configuration to Google APIs can compromise the security of your systems and data.
1017
+ # For more information, refer to [Validate credential configurations from external
1018
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
988
1019
  # @return [::Object]
989
1020
  # @!attribute [rw] scope
990
1021
  # The OAuth scopes
@@ -1017,6 +1048,11 @@ module Google
1017
1048
  # default endpoint URL. The default value of nil uses the environment
1018
1049
  # universe (usually the default "googleapis.com" universe).
1019
1050
  # @return [::String,nil]
1051
+ # @!attribute [rw] logger
1052
+ # A custom logger to use for request/response debug logging, or the value
1053
+ # `:default` (the default) to construct a default logger, or `nil` to
1054
+ # explicitly disable logging.
1055
+ # @return [::Logger,:default,nil]
1020
1056
  #
1021
1057
  class Configuration
1022
1058
  extend ::Gapic::Config
@@ -1038,6 +1074,7 @@ module Google
1038
1074
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1039
1075
  config_attr :quota_project, nil, ::String, nil
1040
1076
  config_attr :universe_domain, nil, ::String, nil
1077
+ config_attr :logger, :default, ::Logger, nil, :default
1041
1078
 
1042
1079
  # @private
1043
1080
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the lookup REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "lookup",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Datastore::V1::LookupResponse.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "run_query",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::Datastore::V1::RunQueryResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "run_aggregation_query",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Cloud::Datastore::V1::RunAggregationQueryResponse.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "begin_transaction",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Cloud::Datastore::V1::BeginTransactionResponse.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "commit",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Cloud::Datastore::V1::CommitResponse.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "rollback",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Cloud::Datastore::V1::RollbackResponse.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "allocate_ids",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Cloud::Datastore::V1::AllocateIdsResponse.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "reserve_ids",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Cloud::Datastore::V1::ReserveIdsResponse.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Datastore
23
23
  module V1
24
- VERSION = "1.1.0"
24
+ VERSION = "1.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -306,9 +306,28 @@ module Google
306
306
  # @!attribute [rw] common
307
307
  # @return [::Google::Api::CommonLanguageSettings]
308
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
309
319
  class GoSettings
310
320
  include ::Google::Protobuf::MessageExts
311
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
312
331
  end
313
332
 
314
333
  # Describes the generator configuration for a method.
@@ -105,9 +105,13 @@ module Google
105
105
  # @!attribute [rw] query
106
106
  # @return [::Google::Cloud::Datastore::V1::Query]
107
107
  # The query to run.
108
+ #
109
+ # Note: The following fields are mutually exclusive: `query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
108
110
  # @!attribute [rw] gql_query
109
111
  # @return [::Google::Cloud::Datastore::V1::GqlQuery]
110
112
  # The GQL query to run. This query must be a non-aggregation query.
113
+ #
114
+ # Note: The following fields are mutually exclusive: `gql_query`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
111
115
  # @!attribute [rw] property_mask
112
116
  # @return [::Google::Cloud::Datastore::V1::PropertyMask]
113
117
  # The properties to return.
@@ -174,9 +178,13 @@ module Google
174
178
  # @!attribute [rw] aggregation_query
175
179
  # @return [::Google::Cloud::Datastore::V1::AggregationQuery]
176
180
  # The query to run.
181
+ #
182
+ # Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
177
183
  # @!attribute [rw] gql_query
178
184
  # @return [::Google::Cloud::Datastore::V1::GqlQuery]
179
185
  # The GQL query to run. This query must be an aggregation query.
186
+ #
187
+ # Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
180
188
  # @!attribute [rw] explain_options
181
189
  # @return [::Google::Cloud::Datastore::V1::ExplainOptions]
182
190
  # Optional. Explain options for the query. If set, additional query
@@ -287,12 +295,16 @@ module Google
287
295
  # The identifier of the transaction associated with the commit. A
288
296
  # transaction identifier is returned by a call to
289
297
  # {::Google::Cloud::Datastore::V1::Datastore::Client#begin_transaction Datastore.BeginTransaction}.
298
+ #
299
+ # Note: The following fields are mutually exclusive: `transaction`, `single_use_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
290
300
  # @!attribute [rw] single_use_transaction
291
301
  # @return [::Google::Cloud::Datastore::V1::TransactionOptions]
292
302
  # Options for beginning a new transaction for this request.
293
303
  # The transaction is committed when the request completes. If specified,
294
304
  # {::Google::Cloud::Datastore::V1::TransactionOptions TransactionOptions.mode} must be
295
305
  # {::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite TransactionOptions.ReadWrite}.
306
+ #
307
+ # Note: The following fields are mutually exclusive: `single_use_transaction`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
296
308
  # @!attribute [rw] mutations
297
309
  # @return [::Array<::Google::Cloud::Datastore::V1::Mutation>]
298
310
  # The mutations to perform.
@@ -407,28 +419,40 @@ module Google
407
419
  # @return [::Google::Cloud::Datastore::V1::Entity]
408
420
  # The entity to insert. The entity must not already exist.
409
421
  # The entity key's final path element may be incomplete.
422
+ #
423
+ # Note: The following fields are mutually exclusive: `insert`, `update`, `upsert`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
410
424
  # @!attribute [rw] update
411
425
  # @return [::Google::Cloud::Datastore::V1::Entity]
412
426
  # The entity to update. The entity must already exist.
413
427
  # Must have a complete key path.
428
+ #
429
+ # Note: The following fields are mutually exclusive: `update`, `insert`, `upsert`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
414
430
  # @!attribute [rw] upsert
415
431
  # @return [::Google::Cloud::Datastore::V1::Entity]
416
432
  # The entity to upsert. The entity may or may not already exist.
417
433
  # The entity key's final path element may be incomplete.
434
+ #
435
+ # Note: The following fields are mutually exclusive: `upsert`, `insert`, `update`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared.
418
436
  # @!attribute [rw] delete
419
437
  # @return [::Google::Cloud::Datastore::V1::Key]
420
438
  # The key of the entity to delete. The entity may or may not already exist.
421
439
  # Must have a complete key path and must not be reserved/read-only.
440
+ #
441
+ # Note: The following fields are mutually exclusive: `delete`, `insert`, `update`, `upsert`. If a field in that set is populated, all other fields in the set will automatically be cleared.
422
442
  # @!attribute [rw] base_version
423
443
  # @return [::Integer]
424
444
  # The version of the entity that this mutation is being applied
425
445
  # to. If this does not match the current version on the server, the
426
446
  # mutation conflicts.
447
+ #
448
+ # Note: The following fields are mutually exclusive: `base_version`, `update_time`. If a field in that set is populated, all other fields in the set will automatically be cleared.
427
449
  # @!attribute [rw] update_time
428
450
  # @return [::Google::Protobuf::Timestamp]
429
451
  # The update time of the entity that this mutation is being applied
430
452
  # to. If this does not match the current update time on the server, the
431
453
  # mutation conflicts.
454
+ #
455
+ # Note: The following fields are mutually exclusive: `update_time`, `base_version`. If a field in that set is populated, all other fields in the set will automatically be cleared.
432
456
  # @!attribute [rw] conflict_resolution_strategy
433
457
  # @return [::Google::Cloud::Datastore::V1::Mutation::ConflictResolutionStrategy]
434
458
  # The strategy to use when a conflict is detected. Defaults to
@@ -482,6 +506,8 @@ module Google
482
506
  # @!attribute [rw] set_to_server_value
483
507
  # @return [::Google::Cloud::Datastore::V1::PropertyTransform::ServerValue]
484
508
  # Sets the property to the given server value.
509
+ #
510
+ # Note: The following fields are mutually exclusive: `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared.
485
511
  # @!attribute [rw] increment
486
512
  # @return [::Google::Cloud::Datastore::V1::Value]
487
513
  # Adds the given value to the property's current value.
@@ -494,6 +520,8 @@ module Google
494
520
  # representation of double values follows IEEE 754 semantics.
495
521
  # If there is positive/negative integer overflow, the property is resolved
496
522
  # to the largest magnitude positive/negative integer.
523
+ #
524
+ # Note: The following fields are mutually exclusive: `increment`, `set_to_server_value`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared.
497
525
  # @!attribute [rw] maximum
498
526
  # @return [::Google::Cloud::Datastore::V1::Value]
499
527
  # Sets the property to the maximum of its current value and the given
@@ -509,6 +537,8 @@ module Google
509
537
  # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
510
538
  # zero input value is always the stored value.
511
539
  # The maximum of any numeric value x and NaN is NaN.
540
+ #
541
+ # Note: The following fields are mutually exclusive: `maximum`, `set_to_server_value`, `increment`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared.
512
542
  # @!attribute [rw] minimum
513
543
  # @return [::Google::Cloud::Datastore::V1::Value]
514
544
  # Sets the property to the minimum of its current value and the given
@@ -524,6 +554,8 @@ module Google
524
554
  # and -0.0 are all zero. The minimum of a zero stored value and zero input
525
555
  # value is always the stored value. The minimum of any numeric value x and
526
556
  # NaN is NaN.
557
+ #
558
+ # Note: The following fields are mutually exclusive: `minimum`, `set_to_server_value`, `increment`, `maximum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared.
527
559
  # @!attribute [rw] append_missing_elements
528
560
  # @return [::Google::Cloud::Datastore::V1::ArrayValue]
529
561
  # Appends the given elements in order if they are not already present in
@@ -538,6 +570,8 @@ module Google
538
570
  # be considered.
539
571
  #
540
572
  # The corresponding transform result will be the null value.
573
+ #
574
+ # Note: The following fields are mutually exclusive: `append_missing_elements`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared.
541
575
  # @!attribute [rw] remove_all_from_array
542
576
  # @return [::Google::Cloud::Datastore::V1::ArrayValue]
543
577
  # Removes all of the given elements from the array in the property.
@@ -550,6 +584,8 @@ module Google
550
584
  # This will remove all equivalent values if there are duplicates.
551
585
  #
552
586
  # The corresponding transform result will be the null value.
587
+ #
588
+ # Note: The following fields are mutually exclusive: `remove_all_from_array`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`. If a field in that set is populated, all other fields in the set will automatically be cleared.
553
589
  class PropertyTransform
554
590
  include ::Google::Protobuf::MessageExts
555
591
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -625,11 +661,15 @@ module Google
625
661
  # @!attribute [rw] read_consistency
626
662
  # @return [::Google::Cloud::Datastore::V1::ReadOptions::ReadConsistency]
627
663
  # The non-transactional read consistency to use.
664
+ #
665
+ # Note: The following fields are mutually exclusive: `read_consistency`, `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared.
628
666
  # @!attribute [rw] transaction
629
667
  # @return [::String]
630
668
  # The identifier of the transaction in which to read. A
631
669
  # transaction identifier is returned by a call to
632
670
  # {::Google::Cloud::Datastore::V1::Datastore::Client#begin_transaction Datastore.BeginTransaction}.
671
+ #
672
+ # Note: The following fields are mutually exclusive: `transaction`, `read_consistency`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared.
633
673
  # @!attribute [rw] new_transaction
634
674
  # @return [::Google::Cloud::Datastore::V1::TransactionOptions]
635
675
  # Options for beginning a new transaction for this request.
@@ -639,6 +679,8 @@ module Google
639
679
  # {::Google::Cloud::Datastore::V1::LookupResponse#transaction LookupResponse.transaction}
640
680
  # or
641
681
  # {::Google::Cloud::Datastore::V1::RunQueryResponse#transaction RunQueryResponse.transaction}.
682
+ #
683
+ # Note: The following fields are mutually exclusive: `new_transaction`, `read_consistency`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared.
642
684
  # @!attribute [rw] read_time
643
685
  # @return [::Google::Protobuf::Timestamp]
644
686
  # Reads entities as they were at the given time. This value is only
@@ -647,6 +689,8 @@ module Google
647
689
  # This must be a microsecond precision timestamp within the past one hour,
648
690
  # or if Point-in-Time Recovery is enabled, can additionally be a whole
649
691
  # minute timestamp within the past 7 days.
692
+ #
693
+ # Note: The following fields are mutually exclusive: `read_time`, `read_consistency`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared.
650
694
  class ReadOptions
651
695
  include ::Google::Protobuf::MessageExts
652
696
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -674,9 +718,13 @@ module Google
674
718
  # @!attribute [rw] read_write
675
719
  # @return [::Google::Cloud::Datastore::V1::TransactionOptions::ReadWrite]
676
720
  # The transaction should allow both reads and writes.
721
+ #
722
+ # Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared.
677
723
  # @!attribute [rw] read_only
678
724
  # @return [::Google::Cloud::Datastore::V1::TransactionOptions::ReadOnly]
679
725
  # The transaction should only allow reads.
726
+ #
727
+ # Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared.
680
728
  class TransactionOptions
681
729
  include ::Google::Protobuf::MessageExts
682
730
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -108,6 +108,8 @@ module Google
108
108
  #
109
109
  # Never equal to zero. Values less than zero are discouraged and may not
110
110
  # be supported in the future.
111
+ #
112
+ # Note: The following fields are mutually exclusive: `id`, `name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
111
113
  # @!attribute [rw] name
112
114
  # @return [::String]
113
115
  # The name of the entity.
@@ -119,6 +121,8 @@ module Google
119
121
  # Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
120
122
  # encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
121
123
  # bytes.
124
+ #
125
+ # Note: The following fields are mutually exclusive: `name`, `id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
122
126
  class PathElement
123
127
  include ::Google::Protobuf::MessageExts
124
128
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -141,37 +145,55 @@ module Google
141
145
  # @!attribute [rw] null_value
142
146
  # @return [::Google::Protobuf::NullValue]
143
147
  # A null value.
148
+ #
149
+ # Note: The following fields are mutually exclusive: `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
144
150
  # @!attribute [rw] boolean_value
145
151
  # @return [::Boolean]
146
152
  # A boolean value.
153
+ #
154
+ # Note: The following fields are mutually exclusive: `boolean_value`, `null_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
147
155
  # @!attribute [rw] integer_value
148
156
  # @return [::Integer]
149
157
  # An integer value.
158
+ #
159
+ # Note: The following fields are mutually exclusive: `integer_value`, `null_value`, `boolean_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
150
160
  # @!attribute [rw] double_value
151
161
  # @return [::Float]
152
162
  # A double value.
163
+ #
164
+ # Note: The following fields are mutually exclusive: `double_value`, `null_value`, `boolean_value`, `integer_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
153
165
  # @!attribute [rw] timestamp_value
154
166
  # @return [::Google::Protobuf::Timestamp]
155
167
  # A timestamp value.
156
168
  # When stored in the Datastore, precise only to microseconds;
157
169
  # any additional precision is rounded down.
170
+ #
171
+ # Note: The following fields are mutually exclusive: `timestamp_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
158
172
  # @!attribute [rw] key_value
159
173
  # @return [::Google::Cloud::Datastore::V1::Key]
160
174
  # A key value.
175
+ #
176
+ # Note: The following fields are mutually exclusive: `key_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
161
177
  # @!attribute [rw] string_value
162
178
  # @return [::String]
163
179
  # A UTF-8 encoded string value.
164
180
  # When `exclude_from_indexes` is false (it is indexed) , may have at most
165
181
  # 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
182
+ #
183
+ # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `blob_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
166
184
  # @!attribute [rw] blob_value
167
185
  # @return [::String]
168
186
  # A blob value.
169
187
  # May have at most 1,000,000 bytes.
170
188
  # When `exclude_from_indexes` is false, may have at most 1500 bytes.
171
189
  # In JSON requests, must be base64-encoded.
190
+ #
191
+ # Note: The following fields are mutually exclusive: `blob_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `geo_point_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
172
192
  # @!attribute [rw] geo_point_value
173
193
  # @return [::Google::Type::LatLng]
174
194
  # A geo point value representing a point on the surface of Earth.
195
+ #
196
+ # Note: The following fields are mutually exclusive: `geo_point_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `entity_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
175
197
  # @!attribute [rw] entity_value
176
198
  # @return [::Google::Cloud::Datastore::V1::Entity]
177
199
  # An entity value.
@@ -179,12 +201,16 @@ module Google
179
201
  # - May have no key.
180
202
  # - May have a key with an incomplete key path.
181
203
  # - May have a reserved/read-only key.
204
+ #
205
+ # Note: The following fields are mutually exclusive: `entity_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
182
206
  # @!attribute [rw] array_value
183
207
  # @return [::Google::Cloud::Datastore::V1::ArrayValue]
184
208
  # An array value.
185
209
  # Cannot contain another array value.
186
210
  # A `Value` instance that sets field `array_value` must not set fields
187
211
  # `meaning` or `exclude_from_indexes`.
212
+ #
213
+ # Note: The following fields are mutually exclusive: `array_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `key_value`, `string_value`, `blob_value`, `geo_point_value`, `entity_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
188
214
  # @!attribute [rw] meaning
189
215
  # @return [::Integer]
190
216
  # The `meaning` field should only be populated for backwards compatibility.
@@ -164,12 +164,18 @@ module Google
164
164
  # @!attribute [rw] count
165
165
  # @return [::Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Count]
166
166
  # Count aggregator.
167
+ #
168
+ # Note: The following fields are mutually exclusive: `count`, `sum`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared.
167
169
  # @!attribute [rw] sum
168
170
  # @return [::Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Sum]
169
171
  # Sum aggregator.
172
+ #
173
+ # Note: The following fields are mutually exclusive: `sum`, `count`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared.
170
174
  # @!attribute [rw] avg
171
175
  # @return [::Google::Cloud::Datastore::V1::AggregationQuery::Aggregation::Avg]
172
176
  # Average aggregator.
177
+ #
178
+ # Note: The following fields are mutually exclusive: `avg`, `count`, `sum`. If a field in that set is populated, all other fields in the set will automatically be cleared.
173
179
  # @!attribute [rw] alias
174
180
  # @return [::String]
175
181
  # Optional. Optional name of the property to store the result of the
@@ -353,9 +359,13 @@ module Google
353
359
  # @!attribute [rw] composite_filter
354
360
  # @return [::Google::Cloud::Datastore::V1::CompositeFilter]
355
361
  # A composite filter.
362
+ #
363
+ # Note: The following fields are mutually exclusive: `composite_filter`, `property_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared.
356
364
  # @!attribute [rw] property_filter
357
365
  # @return [::Google::Cloud::Datastore::V1::PropertyFilter]
358
366
  # A filter on a property.
367
+ #
368
+ # Note: The following fields are mutually exclusive: `property_filter`, `composite_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared.
359
369
  class Filter
360
370
  include ::Google::Protobuf::MessageExts
361
371
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -584,10 +594,14 @@ module Google
584
594
  # @!attribute [rw] value
585
595
  # @return [::Google::Cloud::Datastore::V1::Value]
586
596
  # A value parameter.
597
+ #
598
+ # Note: The following fields are mutually exclusive: `value`, `cursor`. If a field in that set is populated, all other fields in the set will automatically be cleared.
587
599
  # @!attribute [rw] cursor
588
600
  # @return [::String]
589
601
  # A query cursor. Query cursors are returned in query
590
602
  # result batches.
603
+ #
604
+ # Note: The following fields are mutually exclusive: `cursor`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
591
605
  class GqlQueryParameter
592
606
  include ::Google::Protobuf::MessageExts
593
607
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -53,21 +53,33 @@ module Google
53
53
  # @!attribute [rw] null_value
54
54
  # @return [::Google::Protobuf::NullValue]
55
55
  # Represents a null value.
56
+ #
57
+ # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
56
58
  # @!attribute [rw] number_value
57
59
  # @return [::Float]
58
60
  # Represents a double value.
61
+ #
62
+ # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
59
63
  # @!attribute [rw] string_value
60
64
  # @return [::String]
61
65
  # Represents a string value.
66
+ #
67
+ # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
62
68
  # @!attribute [rw] bool_value
63
69
  # @return [::Boolean]
64
70
  # Represents a boolean value.
71
+ #
72
+ # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
65
73
  # @!attribute [rw] struct_value
66
74
  # @return [::Google::Protobuf::Struct]
67
75
  # Represents a structured value.
76
+ #
77
+ # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
68
78
  # @!attribute [rw] list_value
69
79
  # @return [::Google::Protobuf::ListValue]
70
80
  # Represents a repeated `Value`.
81
+ #
82
+ # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
71
83
  class Value
72
84
  include ::Google::Protobuf::MessageExts
73
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-14 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gapic-common
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.1
18
+ version: 0.25.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.a
@@ -26,7 +25,7 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 0.21.1
28
+ version: 0.25.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: 2.a
@@ -93,7 +92,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
93
92
  licenses:
94
93
  - Apache-2.0
95
94
  metadata: {}
96
- post_install_message:
97
95
  rdoc_options: []
98
96
  require_paths:
99
97
  - lib
@@ -101,15 +99,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
99
  requirements:
102
100
  - - ">="
103
101
  - !ruby/object:Gem::Version
104
- version: '2.7'
102
+ version: '3.0'
105
103
  required_rubygems_version: !ruby/object:Gem::Requirement
106
104
  requirements:
107
105
  - - ">="
108
106
  - !ruby/object:Gem::Version
109
107
  version: '0'
110
108
  requirements: []
111
- rubygems_version: 3.5.22
112
- signing_key:
109
+ rubygems_version: 3.6.2
113
110
  specification_version: 4
114
111
  summary: Accesses the schemaless NoSQL database to provide fully managed, robust,
115
112
  scalable storage for your application.