google-cloud-datastore 1.7.3 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +2 -1
  3. data/CHANGELOG.md +47 -0
  4. data/TROUBLESHOOTING.md +2 -8
  5. data/lib/google-cloud-datastore.rb +13 -18
  6. data/lib/google/cloud/datastore.rb +12 -11
  7. data/lib/google/cloud/datastore/commit.rb +4 -4
  8. data/lib/google/cloud/datastore/convert.rb +4 -4
  9. data/lib/google/cloud/datastore/credentials.rb +2 -2
  10. data/lib/google/cloud/datastore/entity.rb +3 -3
  11. data/lib/google/cloud/datastore/gql_query.rb +5 -5
  12. data/lib/google/cloud/datastore/key.rb +5 -5
  13. data/lib/google/cloud/datastore/properties.rb +1 -1
  14. data/lib/google/cloud/datastore/query.rb +12 -12
  15. data/lib/google/cloud/datastore/service.rb +31 -86
  16. data/lib/google/cloud/datastore/version.rb +1 -1
  17. metadata +10 -65
  18. data/lib/google/cloud/datastore/v1.rb +0 -16
  19. data/lib/google/cloud/datastore/v1/credentials.rb +0 -39
  20. data/lib/google/cloud/datastore/v1/datastore_client.rb +0 -574
  21. data/lib/google/cloud/datastore/v1/datastore_client_config.json +0 -61
  22. data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/datastore.rb +0 -283
  23. data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/entity.rb +0 -189
  24. data/lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb +0 -297
  25. data/lib/google/cloud/datastore/v1/doc/google/protobuf/struct.rb +0 -74
  26. data/lib/google/cloud/datastore/v1/doc/google/protobuf/timestamp.rb +0 -109
  27. data/lib/google/cloud/datastore/v1/doc/google/protobuf/wrappers.rb +0 -26
  28. data/lib/google/cloud/datastore/v1/doc/google/type/latlng.rb +0 -65
  29. data/lib/google/datastore/v1/datastore_pb.rb +0 -147
  30. data/lib/google/datastore/v1/datastore_services_pb.rb +0 -65
  31. data/lib/google/datastore/v1/entity_pb.rb +0 -64
  32. data/lib/google/datastore/v1/query_pb.rb +0 -132
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f2ebaa4ef5f6df793ea6c9ce94ae2f3f0d4f6a130a89b57982fbdc783aad3ff
4
- data.tar.gz: e2f10484c3750fb62120887e7252866b105acc4849d7c32b50750bbe66a3d411
3
+ metadata.gz: e1693a80cce2df1bf3e9401267925ba11f25415d8c2e663b9b02b4e55cd8013d
4
+ data.tar.gz: e53167252c7be95bab289f37e40e5fd574399b4bb705451fda0f049c7631c195
5
5
  SHA512:
6
- metadata.gz: c3601afcabc92f1c253b121e7e9a0c8c4ce6344023c6ab7b605b1e810c514a169985bd26e92bdaeeb088b082dc5451abc04aa08f63e852066a20bdef236c77bc
7
- data.tar.gz: bb94e78fbfe0cad10d00e1f250747cc0d4c23862ee0f6d01d70fc936c6c2d92dfb9e60daebe87b1fc4d9415cbc25532ca1d97cf72705754266014f24ce90f2a8
6
+ metadata.gz: b2a060028ced5a5a5b7db06df824657f174110a046bbd45a4d8943d179f769feb3009a99e5d905edb6fb0e9233268dc916ff4a2ca7811133fdfd74382d10c3a4
7
+ data.tar.gz: b5ec1693a3838c0813a0f524f62f39995cb88c61dc5e7afa9525c2486d16489e85a1fae6525ada69dbdcef0e6db53c619b097225feb1ef9a402fcbc4c8b75a6c
@@ -76,7 +76,8 @@ The environment variables that google-cloud-datastore checks for project ID are:
76
76
  1. `DATASTORE_PROJECT`
77
77
  2. `GOOGLE_CLOUD_PROJECT`
78
78
 
79
- The environment variables that google-cloud-datastore checks for credentials are configured on {Google::Cloud::Datastore::V1::Credentials}:
79
+ The environment variables that google-cloud-datastore checks for credentials are configured on
80
+ {Google::Cloud::Datastore::Credentials}:
80
81
 
81
82
  1. `DATASTORE_CREDENTIALS` - Path to JSON file, or JSON contents
82
83
  2. `DATASTORE_KEYFILE` - Path to JSON file, or JSON contents
@@ -1,5 +1,52 @@
1
1
  # Release History
2
2
 
3
+ ### 2.1.0 / 2020-09-17
4
+
5
+ #### Features
6
+
7
+ * quota_project can be set via library configuration ([#7630](https://www.github.com/googleapis/google-cloud-ruby/issues/7630))
8
+
9
+ ### 2.0.0 / 2020-08-06
10
+
11
+ This is a major update that removes the "low-level" client interface code, and
12
+ instead adds the new `google-cloud-datastore-v1` gem as a dependency.
13
+ The new dependency is a rewritten low-level client, produced by a next-
14
+ generation client code generator, with improved performance and stability.
15
+
16
+ This change should have no effect on the high-level interface that most users
17
+ will use. The one exception is that the (mostly undocumented) `client_config`
18
+ argument, for adjusting low-level parameters such as RPC retry settings on
19
+ client objects, has been removed. If you need to adjust these parameters, use
20
+ the configuration interface in `google-cloud-datastore-v1`.
21
+
22
+ Substantial changes have been made in the low-level interfaces, however. If you
23
+ are using the low-level classes under the `Google::Cloud::Datastore::V1` module,
24
+ please review the docs for the new `google-cloud-datastore-v1` gem. In
25
+ particular:
26
+
27
+ * Some classes have been renamed, notably the client class itself.
28
+ * The client constructor takes a configuration block instead of configuration
29
+ keyword arguments.
30
+ * All RPC method arguments are now keyword arguments.
31
+
32
+ ### 1.8.2 / 2020-05-28
33
+
34
+ #### Documentation
35
+
36
+ * Fix a few broken links
37
+
38
+ ### 1.8.1 / 2020-05-19
39
+
40
+ #### Bug Fixes
41
+
42
+ * Adjusted some default timeout and retry settings
43
+
44
+ ### 1.8.0 / 2020-03-11
45
+
46
+ #### Features
47
+
48
+ * Support separate project setting for quota/billing
49
+
3
50
  ### 1.7.3 / 2020-01-23
4
51
 
5
52
  #### Documentation
@@ -24,14 +24,8 @@ improved, *please* create a new issue on GitHub so we can talk about it.
24
24
 
25
25
  - [New issue][gh-ruby]
26
26
 
27
- Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
28
- can use the "ruby" channel for general Ruby questions, or use the
29
- "google-cloud-ruby" channel if you have questions about this gem in particular.
30
-
31
27
  [so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+datastore
32
28
 
33
- [gh-search-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues?q=label%3A%22api%3A+datastore%22
34
-
35
- [gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
29
+ [gh-search-ruby]: https://github.com/googleapis/google-cloud-ruby/issues?q=label%3A%22api%3A+datastore%22
36
30
 
37
- [slack-ruby]: https://gcp-slack.appspot.com/
31
+ [gh-ruby]: https://github.com/googleapis/google-cloud-ruby/issues/new
@@ -42,8 +42,6 @@ module Google
42
42
  #
43
43
  # * `https://www.googleapis.com/auth/datastore`
44
44
  # @param [Integer] timeout Default timeout to use in requests. Optional.
45
- # @param [Hash] client_config A hash of values to override the default
46
- # behavior of the API client. See Google::Gax::CallSettings. Optional.
47
45
  #
48
46
  # @return [Google::Cloud::Datastore::Dataset]
49
47
  #
@@ -69,10 +67,9 @@ module Google
69
67
  # platform_scope = "https://www.googleapis.com/auth/cloud-platform"
70
68
  # datastore = gcloud.datastore scope: platform_scope
71
69
  #
72
- def datastore scope: nil, timeout: nil, client_config: nil
70
+ def datastore scope: nil, timeout: nil
73
71
  Google::Cloud.datastore @project, @keyfile,
74
- scope: scope, timeout: (timeout || @timeout),
75
- client_config: client_config
72
+ scope: scope, timeout: (timeout || @timeout)
76
73
  end
77
74
 
78
75
  ##
@@ -96,8 +93,6 @@ module Google
96
93
  #
97
94
  # * `https://www.googleapis.com/auth/datastore`
98
95
  # @param [Integer] timeout Default timeout to use in requests. Optional.
99
- # @param [Hash] client_config A hash of values to override the default
100
- # behavior of the API client. See Google::Gax::CallSettings. Optional.
101
96
  #
102
97
  # @return [Google::Cloud::Datastore::Dataset]
103
98
  #
@@ -117,12 +112,11 @@ module Google
117
112
  # datastore.save task
118
113
  #
119
114
  def self.datastore project_id = nil, credentials = nil, scope: nil,
120
- timeout: nil, client_config: nil
115
+ timeout: nil
121
116
  require "google/cloud/datastore"
122
117
  Google::Cloud::Datastore.new project_id: project_id,
123
118
  credentials: credentials,
124
- scope: scope, timeout: timeout,
125
- client_config: client_config
119
+ scope: scope, timeout: timeout
126
120
  end
127
121
  end
128
122
  end
@@ -141,17 +135,18 @@ Google::Cloud.configure.add_config! :datastore do |config|
141
135
  default_emulator = Google::Cloud::Config.deferred do
142
136
  ENV["DATASTORE_EMULATOR_HOST"]
143
137
  end
138
+ default_scopes = [
139
+ "https://www.googleapis.com/auth/cloud-platform",
140
+ "https://www.googleapis.com/auth/datastore"
141
+ ]
144
142
 
145
143
  config.add_field! :project_id, default_project, match: String, allow_nil: true
146
144
  config.add_alias! :project, :project_id
147
- config.add_field! :credentials, default_creds,
148
- match: [String, Hash, Google::Auth::Credentials],
149
- allow_nil: true
145
+ config.add_field! :credentials, default_creds, match: [String, Hash, Google::Auth::Credentials], allow_nil: true
150
146
  config.add_alias! :keyfile, :credentials
151
- config.add_field! :scope, nil, match: [String, Array]
147
+ config.add_field! :scope, default_scopes, match: [String, Array]
148
+ config.add_field! :quota_project, nil, match: String
152
149
  config.add_field! :timeout, nil, match: Integer
153
- config.add_field! :client_config, nil, match: Hash
154
- config.add_field! :emulator_host, default_emulator,
155
- match: String, allow_nil: true
156
- config.add_field! :endpoint, nil, match: String
150
+ config.add_field! :emulator_host, default_emulator, match: String, allow_nil: true
151
+ config.add_field! :endpoint, "datastore.googleapis.com", match: String
157
152
  end
@@ -70,8 +70,6 @@ module Google
70
70
  #
71
71
  # * `https://www.googleapis.com/auth/datastore`
72
72
  # @param [Integer] timeout Default timeout to use in requests. Optional.
73
- # @param [Hash] client_config A hash of values to override the default
74
- # behavior of the API client. See Google::Gax::CallSettings. Optional.
75
73
  # @param [String] endpoint Override of the endpoint host name. Optional.
76
74
  # If the param is nil, uses the default endpoint.
77
75
  # @param [String] emulator_host Datastore emulator host. Optional.
@@ -99,13 +97,17 @@ module Google
99
97
  #
100
98
  # datastore.save task
101
99
  #
102
- def self.new project_id: nil, credentials: nil, scope: nil, timeout: nil,
103
- client_config: nil, endpoint: nil, emulator_host: nil,
104
- project: nil, keyfile: nil
100
+ def self.new project_id: nil,
101
+ credentials: nil,
102
+ scope: nil,
103
+ timeout: nil,
104
+ endpoint: nil,
105
+ emulator_host: nil,
106
+ project: nil,
107
+ keyfile: nil
105
108
  project_id ||= (project || default_project_id)
106
109
  scope ||= configure.scope
107
110
  timeout ||= configure.timeout
108
- client_config ||= configure.client_config
109
111
  endpoint ||= configure.endpoint
110
112
  emulator_host ||= configure.emulator_host
111
113
 
@@ -116,8 +118,7 @@ module Google
116
118
  return Datastore::Dataset.new(
117
119
  Datastore::Service.new(
118
120
  project_id, :this_channel_is_insecure,
119
- host: emulator_host, timeout: timeout,
120
- client_config: client_config
121
+ host: emulator_host, timeout: timeout
121
122
  )
122
123
  )
123
124
  end
@@ -136,7 +137,7 @@ module Google
136
137
  Datastore::Dataset.new(
137
138
  Datastore::Service.new(
138
139
  project_id, credentials,
139
- host: endpoint, timeout: timeout, client_config: client_config
140
+ host: endpoint, timeout: timeout
140
141
  )
141
142
  )
142
143
  end
@@ -158,8 +159,6 @@ module Google
158
159
  # * `scope` - (String, Array<String>) The OAuth 2.0 scopes controlling
159
160
  # the set of resources and operations that the connection can access.
160
161
  # * `timeout` - (Integer) Default timeout to use in requests.
161
- # * `client_config` - (Hash) A hash of values to override the default
162
- # behavior of the API client.
163
162
  # * `endpoint` - (String) Override of the endpoint host name, or `nil`
164
163
  # to use the default endpoint.
165
164
  # * `emulator_host` - (String) Host name of the emulator. Defaults to
@@ -191,4 +190,6 @@ module Google
191
190
  end
192
191
  end
193
192
  end
193
+ ## Legacy generated client namespace
194
+ Datastore = Cloud::Datastore unless const_defined? :Datastore
194
195
  end
@@ -136,16 +136,16 @@ module Google
136
136
  def mutations
137
137
  mutations = []
138
138
  mutations += @shared_upserts.map do |entity|
139
- Google::Datastore::V1::Mutation.new upsert: entity.to_grpc
139
+ Google::Cloud::Datastore::V1::Mutation.new upsert: entity.to_grpc
140
140
  end
141
141
  mutations += @shared_inserts.map do |entity|
142
- Google::Datastore::V1::Mutation.new insert: entity.to_grpc
142
+ Google::Cloud::Datastore::V1::Mutation.new insert: entity.to_grpc
143
143
  end
144
144
  mutations += @shared_updates.map do |entity|
145
- Google::Datastore::V1::Mutation.new update: entity.to_grpc
145
+ Google::Cloud::Datastore::V1::Mutation.new update: entity.to_grpc
146
146
  end
147
147
  mutations += @shared_deletes.map do |key|
148
- Google::Datastore::V1::Mutation.new delete: key.to_grpc
148
+ Google::Cloud::Datastore::V1::Mutation.new delete: key.to_grpc
149
149
  end
150
150
  mutations
151
151
  end
@@ -77,7 +77,7 @@ module Google
77
77
  end
78
78
 
79
79
  ##
80
- # Gets an object from a Google::Datastore::V1::Value.
80
+ # Gets an object from a Google::Cloud::Datastore::V1::Value.
81
81
  def self.from_value grpc_value
82
82
  if grpc_value.value_type == :null_value
83
83
  return nil
@@ -110,9 +110,9 @@ module Google
110
110
  end
111
111
 
112
112
  ##
113
- # Stores an object into a Google::Datastore::V1::Value.
113
+ # Stores an object into a Google::Cloud::Datastore::V1::Value.
114
114
  def self.to_value value
115
- v = Google::Datastore::V1::Value.new
115
+ v = Google::Cloud::Datastore::V1::Value.new
116
116
  if NilClass === value
117
117
  v.null_value = :NULL_VALUE
118
118
  elsif TrueClass === value
@@ -133,7 +133,7 @@ module Google
133
133
  elsif String === value
134
134
  v.string_value = value
135
135
  elsif Array === value
136
- v.array_value = Google::Datastore::V1::ArrayValue.new(
136
+ v.array_value = Google::Cloud::Datastore::V1::ArrayValue.new(
137
137
  values: value.map { |val| to_value val }
138
138
  )
139
139
  elsif value.respond_to? :to_time
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
  require "googleauth"
17
- require "google/cloud/datastore/v1/credentials"
17
+ require "google/cloud/datastore/v1/datastore/credentials"
18
18
 
19
19
  module Google
20
20
  module Cloud
@@ -38,7 +38,7 @@ module Google
38
38
  #
39
39
  # datastore.project_id #=> "my-todo-project"
40
40
  #
41
- class Credentials < Google::Cloud::Datastore::V1::Credentials
41
+ class Credentials < Google::Cloud::Datastore::V1::Datastore::Credentials
42
42
  end
43
43
  end
44
44
  end
@@ -427,10 +427,10 @@ module Google
427
427
  end
428
428
 
429
429
  ##
430
- # @private Convert the Entity to a Google::Datastore::V1::Entity
430
+ # @private Convert the Entity to a Google::Cloud::Datastore::V1::Entity
431
431
  # object.
432
432
  def to_grpc
433
- grpc = Google::Datastore::V1::Entity.new(
433
+ grpc = Google::Cloud::Datastore::V1::Entity.new(
434
434
  properties: @properties.to_grpc
435
435
  )
436
436
  grpc.key = @key.to_grpc unless @key.nil?
@@ -439,7 +439,7 @@ module Google
439
439
  end
440
440
 
441
441
  ##
442
- # @private Create a new Entity from a Google::Datastore::V1::Key
442
+ # @private Create a new Entity from a Google::Cloud::Datastore::V1::Key
443
443
  # object.
444
444
  def self.from_grpc grpc
445
445
  entity = Entity.new
@@ -49,7 +49,7 @@ module Google
49
49
  # gql_query = Google::Cloud::Datastore::GqlQuery.new
50
50
  #
51
51
  def initialize
52
- @grpc = Google::Datastore::V1::GqlQuery.new
52
+ @grpc = Google::Cloud::Datastore::V1::GqlQuery.new
53
53
  end
54
54
 
55
55
  ##
@@ -159,12 +159,12 @@ module Google
159
159
  new_named_bindings.map do |name, value|
160
160
  if value.is_a? Google::Cloud::Datastore::Cursor
161
161
  @grpc.named_bindings[name.to_s] = \
162
- Google::Datastore::V1::GqlQueryParameter.new(
162
+ Google::Cloud::Datastore::V1::GqlQueryParameter.new(
163
163
  cursor: value.to_grpc
164
164
  )
165
165
  else
166
166
  @grpc.named_bindings[name.to_s] = \
167
- Google::Datastore::V1::GqlQueryParameter.new(
167
+ Google::Cloud::Datastore::V1::GqlQueryParameter.new(
168
168
  value: Convert.to_value(value)
169
169
  )
170
170
  end
@@ -210,12 +210,12 @@ module Google
210
210
  new_positional_bindings.map do |value|
211
211
  if value.is_a? Google::Cloud::Datastore::Cursor
212
212
  @grpc.positional_bindings << \
213
- Google::Datastore::V1::GqlQueryParameter.new(
213
+ Google::Cloud::Datastore::V1::GqlQueryParameter.new(
214
214
  cursor: value.to_grpc
215
215
  )
216
216
  else
217
217
  @grpc.positional_bindings << \
218
- Google::Datastore::V1::GqlQueryParameter.new(
218
+ Google::Cloud::Datastore::V1::GqlQueryParameter.new(
219
219
  value: Convert.to_value(value)
220
220
  )
221
221
  end
@@ -268,7 +268,7 @@ module Google
268
268
  end
269
269
 
270
270
  ##
271
- # @private Convert the Key to a Google::Datastore::V1::Key object.
271
+ # @private Convert the Key to a Google::Cloud::Datastore::V1::Key object.
272
272
  def to_grpc
273
273
  grpc_path = path.map do |pe_kind, pe_id_or_name|
274
274
  path_args = { kind: pe_kind }
@@ -277,11 +277,11 @@ module Google
277
277
  elsif pe_id_or_name.is_a? String
278
278
  path_args[:name] = pe_id_or_name unless pe_id_or_name.empty?
279
279
  end
280
- Google::Datastore::V1::Key::PathElement.new path_args
280
+ Google::Cloud::Datastore::V1::Key::PathElement.new path_args
281
281
  end
282
- grpc = Google::Datastore::V1::Key.new path: grpc_path
282
+ grpc = Google::Cloud::Datastore::V1::Key.new path: grpc_path
283
283
  if project || namespace
284
- grpc.partition_id = Google::Datastore::V1::PartitionId.new(
284
+ grpc.partition_id = Google::Cloud::Datastore::V1::PartitionId.new(
285
285
  project_id: project.to_s, namespace_id: namespace.to_s
286
286
  )
287
287
  end
@@ -289,7 +289,7 @@ module Google
289
289
  end
290
290
 
291
291
  ##
292
- # @private Create a new Key from a Google::Datastore::V1::Key
292
+ # @private Create a new Key from a Google::Cloud::Datastore::V1::Key
293
293
  # object.
294
294
  def self.from_grpc grpc
295
295
  return nil if grpc.nil?
@@ -73,7 +73,7 @@ module Google
73
73
  alias to_hash to_h
74
74
 
75
75
  def to_grpc
76
- # Convert to Hash with Google::Datastore::V1::Value values.
76
+ # Convert to Hash with Google::Cloud::Datastore::V1::Value values.
77
77
  Hash[@hash.map { |k, v| [k.to_s, Convert.to_value(v)] }]
78
78
  end
79
79
 
@@ -61,7 +61,7 @@ module Google
61
61
  # query = Google::Cloud::Datastore::Query.new
62
62
  #
63
63
  def initialize
64
- @grpc = Google::Datastore::V1::Query.new
64
+ @grpc = Google::Cloud::Datastore::V1::Query.new
65
65
  end
66
66
 
67
67
  ##
@@ -83,7 +83,7 @@ module Google
83
83
  #
84
84
  def kind *kinds
85
85
  kinds.each do |kind|
86
- grpc_kind = Google::Datastore::V1::KindExpression.new(
86
+ grpc_kind = Google::Cloud::Datastore::V1::KindExpression.new(
87
87
  name: kind
88
88
  )
89
89
  @grpc.kind << grpc_kind
@@ -177,15 +177,15 @@ module Google
177
177
  # tasks = datastore.run query
178
178
  #
179
179
  def where name, operator, value
180
- @grpc.filter ||= Google::Datastore::V1::Filter.new(
181
- composite_filter: Google::Datastore::V1::CompositeFilter.new(
180
+ @grpc.filter ||= Google::Cloud::Datastore::V1::Filter.new(
181
+ composite_filter: Google::Cloud::Datastore::V1::CompositeFilter.new(
182
182
  op: :AND
183
183
  )
184
184
  )
185
185
  @grpc.filter.composite_filter.filters << \
186
- Google::Datastore::V1::Filter.new(
187
- property_filter: Google::Datastore::V1::PropertyFilter.new(
188
- property: Google::Datastore::V1::PropertyReference.new(
186
+ Google::Cloud::Datastore::V1::Filter.new(
187
+ property_filter: Google::Cloud::Datastore::V1::PropertyFilter.new(
188
+ property: Google::Cloud::Datastore::V1::PropertyReference.new(
189
189
  name: name
190
190
  ),
191
191
  op: Convert.to_prop_filter_op(operator),
@@ -273,8 +273,8 @@ module Google
273
273
  # tasks = datastore.run query
274
274
  #
275
275
  def order name, direction = :asc
276
- @grpc.order << Google::Datastore::V1::PropertyOrder.new(
277
- property: Google::Datastore::V1::PropertyReference.new(
276
+ @grpc.order << Google::Cloud::Datastore::V1::PropertyOrder.new(
277
+ property: Google::Cloud::Datastore::V1::PropertyReference.new(
278
278
  name: name
279
279
  ),
280
280
  direction: prop_order_direction(direction)
@@ -384,8 +384,8 @@ module Google
384
384
  #
385
385
  def select *names
386
386
  names.each do |name|
387
- grpc_projection = Google::Datastore::V1::Projection.new(
388
- property: Google::Datastore::V1::PropertyReference.new(
387
+ grpc_projection = Google::Cloud::Datastore::V1::Projection.new(
388
+ property: Google::Cloud::Datastore::V1::PropertyReference.new(
389
389
  name: name
390
390
  )
391
391
  )
@@ -414,7 +414,7 @@ module Google
414
414
  #
415
415
  def group_by *names
416
416
  names.each do |name|
417
- grpc_property = Google::Datastore::V1::PropertyReference.new(
417
+ grpc_property = Google::Cloud::Datastore::V1::PropertyReference.new(
418
418
  name: name
419
419
  )
420
420
  @grpc.distinct_on << grpc_property