google-api-client 0.10.0 → 0.10.1

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.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/api_names.yaml +37747 -36512
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1016 -114
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +426 -22
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +481 -95
  9. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  10. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +27 -10
  11. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  12. data/generated/google/apis/admin_reports_v1.rb +2 -2
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analyticsreporting_v4.rb +4 -4
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +428 -428
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  19. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  20. data/generated/google/apis/androidenterprise_v1/classes.rb +60 -66
  21. data/generated/google/apis/androidenterprise_v1/service.rb +12 -11
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/androidpublisher_v2/classes.rb +7 -0
  24. data/generated/google/apis/androidpublisher_v2/representations.rb +1 -0
  25. data/generated/google/apis/androidpublisher_v2/service.rb +1 -1
  26. data/generated/google/apis/appsactivity_v1.rb +3 -3
  27. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +34 -8
  31. data/generated/google/apis/bigquery_v2/representations.rb +15 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/calendar_v3/classes.rb +3 -5
  34. data/generated/google/apis/classroom_v1.rb +25 -22
  35. data/generated/google/apis/classroom_v1/classes.rb +910 -1001
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1064 -1272
  38. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  39. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  40. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  41. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  42. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  43. data/generated/google/apis/cloudbuild_v1/classes.rb +238 -238
  44. data/generated/google/apis/cloudbuild_v1/representations.rb +48 -48
  45. data/generated/google/apis/cloudbuild_v1/service.rb +176 -176
  46. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  47. data/generated/google/apis/clouddebugger_v2/classes.rb +315 -315
  48. data/generated/google/apis/clouddebugger_v2/representations.rb +90 -90
  49. data/generated/google/apis/clouddebugger_v2/service.rb +152 -152
  50. data/generated/google/apis/cloudkms_v1.rb +35 -0
  51. data/generated/google/apis/cloudkms_v1/classes.rb +1039 -0
  52. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  53. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  54. data/generated/google/apis/cloudkms_v1beta1.rb +1 -1
  55. data/generated/google/apis/cloudkms_v1beta1/classes.rb +645 -605
  56. data/generated/google/apis/cloudkms_v1beta1/representations.rb +136 -136
  57. data/generated/google/apis/cloudkms_v1beta1/service.rb +258 -264
  58. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  59. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  60. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +677 -456
  61. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +154 -89
  62. data/generated/google/apis/cloudresourcemanager_v1/service.rb +380 -279
  63. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  64. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +247 -114
  65. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +72 -40
  66. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +202 -208
  67. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  68. data/generated/google/apis/cloudtrace_v1/classes.rb +39 -39
  69. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  70. data/generated/google/apis/cloudtrace_v1/service.rb +18 -18
  71. data/generated/google/apis/compute_beta.rb +1 -1
  72. data/generated/google/apis/compute_beta/classes.rb +813 -82
  73. data/generated/google/apis/compute_beta/representations.rb +305 -0
  74. data/generated/google/apis/compute_beta/service.rb +971 -180
  75. data/generated/google/apis/compute_v1.rb +1 -1
  76. data/generated/google/apis/compute_v1/classes.rb +147 -21
  77. data/generated/google/apis/compute_v1/representations.rb +38 -0
  78. data/generated/google/apis/compute_v1/service.rb +347 -65
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/classes.rb +2 -1
  81. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3/classes.rb +3352 -3110
  83. data/generated/google/apis/dataflow_v1b3/representations.rb +812 -730
  84. data/generated/google/apis/dataflow_v1b3/service.rb +264 -183
  85. data/generated/google/apis/dataproc_v1.rb +1 -1
  86. data/generated/google/apis/dataproc_v1/classes.rb +1200 -1164
  87. data/generated/google/apis/dataproc_v1/representations.rb +220 -204
  88. data/generated/google/apis/dataproc_v1/service.rb +299 -299
  89. data/generated/google/apis/datastore_v1.rb +4 -4
  90. data/generated/google/apis/datastore_v1/classes.rb +688 -688
  91. data/generated/google/apis/datastore_v1/representations.rb +167 -167
  92. data/generated/google/apis/datastore_v1/service.rb +68 -68
  93. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  94. data/generated/google/apis/deploymentmanager_v2/classes.rb +13 -3
  95. data/generated/google/apis/dns_v1.rb +1 -1
  96. data/generated/google/apis/dns_v2beta1.rb +1 -1
  97. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  98. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +1 -1
  99. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  100. data/generated/google/apis/drive_v2.rb +1 -1
  101. data/generated/google/apis/drive_v2/classes.rb +487 -15
  102. data/generated/google/apis/drive_v2/representations.rb +120 -0
  103. data/generated/google/apis/drive_v2/service.rb +355 -38
  104. data/generated/google/apis/drive_v3.rb +1 -1
  105. data/generated/google/apis/drive_v3/classes.rb +416 -14
  106. data/generated/google/apis/drive_v3/representations.rb +99 -0
  107. data/generated/google/apis/drive_v3/service.rb +315 -28
  108. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  109. data/generated/google/apis/games_management_v1management.rb +1 -1
  110. data/generated/google/apis/games_v1.rb +1 -1
  111. data/generated/google/apis/genomics_v1.rb +7 -7
  112. data/generated/google/apis/genomics_v1/classes.rb +2301 -2301
  113. data/generated/google/apis/genomics_v1/representations.rb +239 -239
  114. data/generated/google/apis/genomics_v1/service.rb +599 -599
  115. data/generated/google/apis/gmail_v1.rb +2 -2
  116. data/generated/google/apis/gmail_v1/service.rb +18 -1
  117. data/generated/google/apis/groupssettings_v1.rb +1 -1
  118. data/generated/google/apis/iam_v1.rb +1 -1
  119. data/generated/google/apis/iam_v1/classes.rb +440 -440
  120. data/generated/google/apis/iam_v1/representations.rb +96 -96
  121. data/generated/google/apis/iam_v1/service.rb +150 -150
  122. data/generated/google/apis/kgsearch_v1/service.rb +13 -13
  123. data/generated/google/apis/language_v1beta1.rb +1 -1
  124. data/generated/google/apis/language_v1beta1/classes.rb +235 -235
  125. data/generated/google/apis/language_v1beta1/representations.rb +73 -73
  126. data/generated/google/apis/language_v1beta1/service.rb +49 -49
  127. data/generated/google/apis/licensing_v1.rb +1 -1
  128. data/generated/google/apis/logging_v2beta1.rb +1 -1
  129. data/generated/google/apis/logging_v2beta1/classes.rb +888 -879
  130. data/generated/google/apis/logging_v2beta1/representations.rb +129 -129
  131. data/generated/google/apis/logging_v2beta1/service.rb +315 -316
  132. data/generated/google/apis/manufacturers_v1/classes.rb +139 -139
  133. data/generated/google/apis/manufacturers_v1/representations.rb +30 -30
  134. data/generated/google/apis/manufacturers_v1/service.rb +32 -32
  135. data/generated/google/apis/monitoring_v3.rb +4 -4
  136. data/generated/google/apis/monitoring_v3/classes.rb +229 -229
  137. data/generated/google/apis/monitoring_v3/representations.rb +45 -45
  138. data/generated/google/apis/monitoring_v3/service.rb +141 -141
  139. data/generated/google/apis/partners_v2.rb +3 -3
  140. data/generated/google/apis/partners_v2/classes.rb +1837 -483
  141. data/generated/google/apis/partners_v2/representations.rb +614 -157
  142. data/generated/google/apis/partners_v2/service.rb +881 -150
  143. data/generated/google/apis/people_v1.rb +1 -1
  144. data/generated/google/apis/people_v1/classes.rb +517 -465
  145. data/generated/google/apis/people_v1/representations.rb +138 -107
  146. data/generated/google/apis/people_v1/service.rb +56 -49
  147. data/generated/google/apis/plus_domains_v1.rb +1 -1
  148. data/generated/google/apis/plus_v1.rb +1 -1
  149. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  150. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +529 -458
  151. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +98 -97
  152. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +494 -370
  153. data/generated/google/apis/pubsub_v1.rb +4 -4
  154. data/generated/google/apis/pubsub_v1/classes.rb +203 -203
  155. data/generated/google/apis/pubsub_v1/representations.rb +65 -65
  156. data/generated/google/apis/pubsub_v1/service.rb +226 -217
  157. data/generated/google/apis/reseller_v1.rb +1 -1
  158. data/generated/google/apis/reseller_v1/classes.rb +213 -61
  159. data/generated/google/apis/reseller_v1/representations.rb +27 -0
  160. data/generated/google/apis/reseller_v1/service.rb +240 -47
  161. data/generated/google/apis/script_v1.rb +14 -14
  162. data/generated/google/apis/script_v1/classes.rb +95 -95
  163. data/generated/google/apis/script_v1/representations.rb +25 -25
  164. data/generated/google/apis/sheets_v4.rb +1 -1
  165. data/generated/google/apis/sheets_v4/classes.rb +4346 -4300
  166. data/generated/google/apis/sheets_v4/representations.rb +853 -837
  167. data/generated/google/apis/sheets_v4/service.rb +32 -32
  168. data/generated/google/apis/slides_v1.rb +1 -1
  169. data/generated/google/apis/slides_v1/classes.rb +804 -748
  170. data/generated/google/apis/slides_v1/representations.rb +204 -187
  171. data/generated/google/apis/slides_v1/service.rb +16 -16
  172. data/generated/google/apis/speech_v1beta1.rb +1 -1
  173. data/generated/google/apis/speech_v1beta1/classes.rb +57 -57
  174. data/generated/google/apis/speech_v1beta1/representations.rb +19 -19
  175. data/generated/google/apis/speech_v1beta1/service.rb +66 -66
  176. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  177. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -7
  178. data/generated/google/apis/sqladmin_v1beta4/representations.rb +16 -0
  179. data/generated/google/apis/sqladmin_v1beta4/service.rb +9 -2
  180. data/generated/google/apis/storage_v1.rb +1 -1
  181. data/generated/google/apis/storage_v1/service.rb +10 -7
  182. data/generated/google/apis/vision_v1.rb +1 -1
  183. data/generated/google/apis/vision_v1/classes.rb +1393 -865
  184. data/generated/google/apis/vision_v1/representations.rb +367 -102
  185. data/generated/google/apis/vision_v1/service.rb +4 -4
  186. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  187. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  188. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  189. data/generated/google/apis/youtubereporting_v1/classes.rb +93 -93
  190. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  191. data/generated/google/apis/youtubereporting_v1/service.rb +108 -108
  192. data/lib/google/apis/version.rb +1 -1
  193. metadata +34 -30
@@ -26,13 +26,13 @@ module Google
26
26
  # @see https://cloud.google.com/datastore/
27
27
  module DatastoreV1
28
28
  VERSION = 'V1'
29
- REVISION = '20170206'
30
-
31
- # View and manage your Google Cloud Datastore data
32
- AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
29
+ REVISION = '20170123'
33
30
 
34
31
  # View and manage your data across Google Cloud Platform services
35
32
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
33
+
34
+ # View and manage your Google Cloud Datastore data
35
+ AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
36
36
  end
37
37
  end
38
38
  end
@@ -22,215 +22,18 @@ module Google
22
22
  module Apis
23
23
  module DatastoreV1
24
24
 
25
- # The response for Datastore.AllocateIds.
26
- class AllocateIdsResponse
27
- include Google::Apis::Core::Hashable
28
-
29
- # The keys specified in the request (in the same order), each with
30
- # its key path completed with a newly allocated ID.
31
- # Corresponds to the JSON property `keys`
32
- # @return [Array<Google::Apis::DatastoreV1::Key>]
33
- attr_accessor :keys
34
-
35
- def initialize(**args)
36
- update!(**args)
37
- end
38
-
39
- # Update properties of this object
40
- def update!(**args)
41
- @keys = args[:keys] if args.key?(:keys)
42
- end
43
- end
44
-
45
- # A query for entities.
46
- class Query
47
- include Google::Apis::Core::Hashable
48
-
49
- # The number of results to skip. Applies before limit, but after all other
50
- # constraints. Optional. Must be >= 0 if specified.
51
- # Corresponds to the JSON property `offset`
52
- # @return [Fixnum]
53
- attr_accessor :offset
54
-
55
- # A starting point for the query results. Query cursors are
56
- # returned in query result batches and
57
- # [can only be used to continue the same query](https://cloud.google.com/
58
- # datastore/docs/concepts/queries#cursors_limits_and_offsets).
59
- # Corresponds to the JSON property `startCursor`
60
- # @return [String]
61
- attr_accessor :start_cursor
62
-
63
- # The kinds to query (if empty, returns entities of all kinds).
64
- # Currently at most 1 kind may be specified.
65
- # Corresponds to the JSON property `kind`
66
- # @return [Array<Google::Apis::DatastoreV1::KindExpression>]
67
- attr_accessor :kind
68
-
69
- # The properties to make distinct. The query results will contain the first
70
- # result for each distinct combination of values for the given properties
71
- # (if empty, all results are returned).
72
- # Corresponds to the JSON property `distinctOn`
73
- # @return [Array<Google::Apis::DatastoreV1::PropertyReference>]
74
- attr_accessor :distinct_on
75
-
76
- # The order to apply to the query results (if empty, order is unspecified).
77
- # Corresponds to the JSON property `order`
78
- # @return [Array<Google::Apis::DatastoreV1::PropertyOrder>]
79
- attr_accessor :order
80
-
81
- # The projection to return. Defaults to returning all properties.
82
- # Corresponds to the JSON property `projection`
83
- # @return [Array<Google::Apis::DatastoreV1::Projection>]
84
- attr_accessor :projection
85
-
86
- # An ending point for the query results. Query cursors are
87
- # returned in query result batches and
88
- # [can only be used to limit the same query](https://cloud.google.com/datastore/
89
- # docs/concepts/queries#cursors_limits_and_offsets).
90
- # Corresponds to the JSON property `endCursor`
91
- # @return [String]
92
- attr_accessor :end_cursor
93
-
94
- # The maximum number of results to return. Applies after all other
95
- # constraints. Optional.
96
- # Unspecified is interpreted as no limit.
97
- # Must be >= 0 if specified.
98
- # Corresponds to the JSON property `limit`
99
- # @return [Fixnum]
100
- attr_accessor :limit
101
-
102
- # A holder for any type of filter.
103
- # Corresponds to the JSON property `filter`
104
- # @return [Google::Apis::DatastoreV1::Filter]
105
- attr_accessor :filter
106
-
107
- def initialize(**args)
108
- update!(**args)
109
- end
110
-
111
- # Update properties of this object
112
- def update!(**args)
113
- @offset = args[:offset] if args.key?(:offset)
114
- @start_cursor = args[:start_cursor] if args.key?(:start_cursor)
115
- @kind = args[:kind] if args.key?(:kind)
116
- @distinct_on = args[:distinct_on] if args.key?(:distinct_on)
117
- @order = args[:order] if args.key?(:order)
118
- @projection = args[:projection] if args.key?(:projection)
119
- @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
120
- @limit = args[:limit] if args.key?(:limit)
121
- @filter = args[:filter] if args.key?(:filter)
122
- end
123
- end
124
-
125
- # A filter on a specific property.
126
- class PropertyFilter
127
- include Google::Apis::Core::Hashable
128
-
129
- # A message that can hold any of the supported value types and associated
130
- # metadata.
131
- # Corresponds to the JSON property `value`
132
- # @return [Google::Apis::DatastoreV1::Value]
133
- attr_accessor :value
134
-
135
- # A reference to a property relative to the kind expressions.
136
- # Corresponds to the JSON property `property`
137
- # @return [Google::Apis::DatastoreV1::PropertyReference]
138
- attr_accessor :property
139
-
140
- # The operator to filter by.
141
- # Corresponds to the JSON property `op`
142
- # @return [String]
143
- attr_accessor :op
144
-
145
- def initialize(**args)
146
- update!(**args)
147
- end
148
-
149
- # Update properties of this object
150
- def update!(**args)
151
- @value = args[:value] if args.key?(:value)
152
- @property = args[:property] if args.key?(:property)
153
- @op = args[:op] if args.key?(:op)
154
- end
155
- end
156
-
157
- # The result of fetching an entity from Datastore.
158
- class EntityResult
159
- include Google::Apis::Core::Hashable
160
-
161
- # A cursor that points to the position after the result entity.
162
- # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
163
- # Corresponds to the JSON property `cursor`
164
- # @return [String]
165
- attr_accessor :cursor
166
-
167
- # The version of the entity, a strictly positive number that monotonically
168
- # increases with changes to the entity.
169
- # This field is set for `FULL` entity
170
- # results.
171
- # For missing entities in `LookupResponse`, this
172
- # is the version of the snapshot that was used to look up the entity, and it
173
- # is always set except for eventually consistent reads.
174
- # Corresponds to the JSON property `version`
175
- # @return [String]
176
- attr_accessor :version
177
-
178
- # A Datastore data object.
179
- # An entity is limited to 1 megabyte when stored. That _roughly_
180
- # corresponds to a limit of 1 megabyte for the serialized form of this
181
- # message.
182
- # Corresponds to the JSON property `entity`
183
- # @return [Google::Apis::DatastoreV1::Entity]
184
- attr_accessor :entity
185
-
186
- def initialize(**args)
187
- update!(**args)
188
- end
189
-
190
- # Update properties of this object
191
- def update!(**args)
192
- @cursor = args[:cursor] if args.key?(:cursor)
193
- @version = args[:version] if args.key?(:version)
194
- @entity = args[:entity] if args.key?(:entity)
195
- end
196
- end
197
-
198
- # The response for Datastore.Commit.
199
- class CommitResponse
200
- include Google::Apis::Core::Hashable
201
-
202
- # The number of index entries updated during the commit, or zero if none were
203
- # updated.
204
- # Corresponds to the JSON property `indexUpdates`
205
- # @return [Fixnum]
206
- attr_accessor :index_updates
207
-
208
- # The result of performing the mutations.
209
- # The i-th mutation result corresponds to the i-th mutation in the request.
210
- # Corresponds to the JSON property `mutationResults`
211
- # @return [Array<Google::Apis::DatastoreV1::MutationResult>]
212
- attr_accessor :mutation_results
213
-
214
- def initialize(**args)
215
- update!(**args)
216
- end
217
-
218
- # Update properties of this object
219
- def update!(**args)
220
- @index_updates = args[:index_updates] if args.key?(:index_updates)
221
- @mutation_results = args[:mutation_results] if args.key?(:mutation_results)
222
- end
223
- end
224
-
225
25
  # A message that can hold any of the supported value types and associated
226
26
  # metadata.
227
27
  class Value
228
28
  include Google::Apis::Core::Hashable
229
29
 
230
- # The `meaning` field should only be populated for backwards compatibility.
231
- # Corresponds to the JSON property `meaning`
232
- # @return [Fixnum]
233
- attr_accessor :meaning
30
+ # A UTF-8 encoded string value.
31
+ # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500
32
+ # bytes.
33
+ # Otherwise, may be set to at least 1,000,000 bytes.
34
+ # Corresponds to the JSON property `stringValue`
35
+ # @return [String]
36
+ attr_accessor :string_value
234
37
 
235
38
  # An array value.
236
39
  # Corresponds to the JSON property `arrayValue`
@@ -245,6 +48,29 @@ module Google
245
48
  # @return [Google::Apis::DatastoreV1::Entity]
246
49
  attr_accessor :entity_value
247
50
 
51
+ # The `meaning` field should only be populated for backwards compatibility.
52
+ # Corresponds to the JSON property `meaning`
53
+ # @return [Fixnum]
54
+ attr_accessor :meaning
55
+
56
+ # An integer value.
57
+ # Corresponds to the JSON property `integerValue`
58
+ # @return [String]
59
+ attr_accessor :integer_value
60
+
61
+ # A double value.
62
+ # Corresponds to the JSON property `doubleValue`
63
+ # @return [Float]
64
+ attr_accessor :double_value
65
+
66
+ # A blob value.
67
+ # May have at most 1,000,000 bytes.
68
+ # When `exclude_from_indexes` is false, may have at most 1500 bytes.
69
+ # In JSON requests, must be base64-encoded.
70
+ # Corresponds to the JSON property `blobValue`
71
+ # @return [String]
72
+ attr_accessor :blob_value
73
+
248
74
  # An object representing a latitude/longitude pair. This is expressed as a pair
249
75
  # of doubles representing degrees latitude and degrees longitude. Unless
250
76
  # specified otherwise, this must conform to the
@@ -286,6 +112,17 @@ module Google
286
112
  # @return [Google::Apis::DatastoreV1::LatLng]
287
113
  attr_accessor :geo_point_value
288
114
 
115
+ # A null value.
116
+ # Corresponds to the JSON property `nullValue`
117
+ # @return [String]
118
+ attr_accessor :null_value
119
+
120
+ # A boolean value.
121
+ # Corresponds to the JSON property `booleanValue`
122
+ # @return [Boolean]
123
+ attr_accessor :boolean_value
124
+ alias_method :boolean_value?, :boolean_value
125
+
289
126
  # A unique identifier for an entity.
290
127
  # If a key's partition ID or any of its path kinds or names are
291
128
  # reserved/read-only, the key is reserved/read-only.
@@ -294,19 +131,6 @@ module Google
294
131
  # @return [Google::Apis::DatastoreV1::Key]
295
132
  attr_accessor :key_value
296
133
 
297
- # An integer value.
298
- # Corresponds to the JSON property `integerValue`
299
- # @return [String]
300
- attr_accessor :integer_value
301
-
302
- # A UTF-8 encoded string value.
303
- # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500
304
- # bytes.
305
- # Otherwise, may be set to at least 1,000,000 bytes.
306
- # Corresponds to the JSON property `stringValue`
307
- # @return [String]
308
- attr_accessor :string_value
309
-
310
134
  # If the value should be excluded from all indexes including those defined
311
135
  # explicitly.
312
136
  # Corresponds to the JSON property `excludeFromIndexes`
@@ -314,11 +138,6 @@ module Google
314
138
  attr_accessor :exclude_from_indexes
315
139
  alias_method :exclude_from_indexes?, :exclude_from_indexes
316
140
 
317
- # A double value.
318
- # Corresponds to the JSON property `doubleValue`
319
- # @return [Float]
320
- attr_accessor :double_value
321
-
322
141
  # A timestamp value.
323
142
  # When stored in the Datastore, precise only to microseconds;
324
143
  # any additional precision is rounded down.
@@ -326,75 +145,44 @@ module Google
326
145
  # @return [String]
327
146
  attr_accessor :timestamp_value
328
147
 
329
- # A boolean value.
330
- # Corresponds to the JSON property `booleanValue`
331
- # @return [Boolean]
332
- attr_accessor :boolean_value
333
- alias_method :boolean_value?, :boolean_value
334
-
335
- # A null value.
336
- # Corresponds to the JSON property `nullValue`
337
- # @return [String]
338
- attr_accessor :null_value
339
-
340
- # A blob value.
341
- # May have at most 1,000,000 bytes.
342
- # When `exclude_from_indexes` is false, may have at most 1500 bytes.
343
- # In JSON requests, must be base64-encoded.
344
- # Corresponds to the JSON property `blobValue`
345
- # @return [String]
346
- attr_accessor :blob_value
347
-
348
148
  def initialize(**args)
349
149
  update!(**args)
350
150
  end
351
151
 
352
152
  # Update properties of this object
353
153
  def update!(**args)
354
- @meaning = args[:meaning] if args.key?(:meaning)
154
+ @string_value = args[:string_value] if args.key?(:string_value)
355
155
  @array_value = args[:array_value] if args.key?(:array_value)
356
156
  @entity_value = args[:entity_value] if args.key?(:entity_value)
157
+ @meaning = args[:meaning] if args.key?(:meaning)
158
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
159
+ @double_value = args[:double_value] if args.key?(:double_value)
160
+ @blob_value = args[:blob_value] if args.key?(:blob_value)
357
161
  @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value)
162
+ @null_value = args[:null_value] if args.key?(:null_value)
163
+ @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
358
164
  @key_value = args[:key_value] if args.key?(:key_value)
359
- @integer_value = args[:integer_value] if args.key?(:integer_value)
360
- @string_value = args[:string_value] if args.key?(:string_value)
361
165
  @exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes)
362
- @double_value = args[:double_value] if args.key?(:double_value)
363
166
  @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value)
364
- @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
365
- @null_value = args[:null_value] if args.key?(:null_value)
366
- @blob_value = args[:blob_value] if args.key?(:blob_value)
367
167
  end
368
168
  end
369
169
 
370
- # A partition ID identifies a grouping of entities. The grouping is always
371
- # by project and namespace, however the namespace ID may be empty.
372
- # A partition ID contains several dimensions:
373
- # project ID and namespace ID.
374
- # Partition dimensions:
375
- # - May be `""`.
376
- # - Must be valid UTF-8 bytes.
377
- # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
378
- # If the value of any dimension matches regex `__.*__`, the partition is
379
- # reserved/read-only.
380
- # A reserved/read-only partition ID is forbidden in certain documented
381
- # contexts.
382
- # Foreign partition IDs (in which the project ID does
383
- # not match the context project ID ) are discouraged.
384
- # Reads and writes of foreign partition IDs may fail if the project is not in an
385
- # active state.
386
- class PartitionId
170
+ # The options shared by read requests.
171
+ class ReadOptions
387
172
  include Google::Apis::Core::Hashable
388
173
 
389
- # The ID of the project to which the entities belong.
390
- # Corresponds to the JSON property `projectId`
174
+ # The identifier of the transaction in which to read. A
175
+ # transaction identifier is returned by a call to
176
+ # Datastore.BeginTransaction.
177
+ # Corresponds to the JSON property `transaction`
391
178
  # @return [String]
392
- attr_accessor :project_id
179
+ attr_accessor :transaction
393
180
 
394
- # If not empty, the ID of the namespace to which the entities belong.
395
- # Corresponds to the JSON property `namespaceId`
181
+ # The non-transactional read consistency to use.
182
+ # Cannot be set to `STRONG` for global queries.
183
+ # Corresponds to the JSON property `readConsistency`
396
184
  # @return [String]
397
- attr_accessor :namespace_id
185
+ attr_accessor :read_consistency
398
186
 
399
187
  def initialize(**args)
400
188
  update!(**args)
@@ -402,35 +190,24 @@ module Google
402
190
 
403
191
  # Update properties of this object
404
192
  def update!(**args)
405
- @project_id = args[:project_id] if args.key?(:project_id)
406
- @namespace_id = args[:namespace_id] if args.key?(:namespace_id)
193
+ @transaction = args[:transaction] if args.key?(:transaction)
194
+ @read_consistency = args[:read_consistency] if args.key?(:read_consistency)
407
195
  end
408
196
  end
409
197
 
410
- # A Datastore data object.
411
- # An entity is limited to 1 megabyte when stored. That _roughly_
412
- # corresponds to a limit of 1 megabyte for the serialized form of this
413
- # message.
414
- class Entity
198
+ # The desired order for a specific property.
199
+ class PropertyOrder
415
200
  include Google::Apis::Core::Hashable
416
201
 
417
- # A unique identifier for an entity.
418
- # If a key's partition ID or any of its path kinds or names are
419
- # reserved/read-only, the key is reserved/read-only.
420
- # A reserved/read-only key is forbidden in certain documented contexts.
421
- # Corresponds to the JSON property `key`
422
- # @return [Google::Apis::DatastoreV1::Key]
423
- attr_accessor :key
202
+ # The direction to order by. Defaults to `ASCENDING`.
203
+ # Corresponds to the JSON property `direction`
204
+ # @return [String]
205
+ attr_accessor :direction
424
206
 
425
- # The entity's properties.
426
- # The map's keys are property names.
427
- # A property name matching regex `__.*__` is reserved.
428
- # A reserved property name is forbidden in certain documented contexts.
429
- # The name must not contain more than 500 characters.
430
- # The name cannot be `""`.
431
- # Corresponds to the JSON property `properties`
432
- # @return [Hash<String,Google::Apis::DatastoreV1::Value>]
433
- attr_accessor :properties
207
+ # A reference to a property relative to the kind expressions.
208
+ # Corresponds to the JSON property `property`
209
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
210
+ attr_accessor :property
434
211
 
435
212
  def initialize(**args)
436
213
  update!(**args)
@@ -438,24 +215,40 @@ module Google
438
215
 
439
216
  # Update properties of this object
440
217
  def update!(**args)
441
- @key = args[:key] if args.key?(:key)
442
- @properties = args[:properties] if args.key?(:properties)
218
+ @direction = args[:direction] if args.key?(:direction)
219
+ @property = args[:property] if args.key?(:property)
443
220
  end
444
221
  end
445
222
 
446
- # The request for Datastore.Lookup.
447
- class LookupRequest
223
+ # The request for Datastore.Commit.
224
+ class CommitRequest
448
225
  include Google::Apis::Core::Hashable
449
226
 
450
- # The options shared by read requests.
451
- # Corresponds to the JSON property `readOptions`
452
- # @return [Google::Apis::DatastoreV1::ReadOptions]
453
- attr_accessor :read_options
227
+ # The identifier of the transaction associated with the commit. A
228
+ # transaction identifier is returned by a call to
229
+ # Datastore.BeginTransaction.
230
+ # Corresponds to the JSON property `transaction`
231
+ # @return [String]
232
+ attr_accessor :transaction
454
233
 
455
- # Keys of entities to look up.
456
- # Corresponds to the JSON property `keys`
457
- # @return [Array<Google::Apis::DatastoreV1::Key>]
458
- attr_accessor :keys
234
+ # The type of commit to perform. Defaults to `TRANSACTIONAL`.
235
+ # Corresponds to the JSON property `mode`
236
+ # @return [String]
237
+ attr_accessor :mode
238
+
239
+ # The mutations to perform.
240
+ # When mode is `TRANSACTIONAL`, mutations affecting a single entity are
241
+ # applied in order. The following sequences of mutations affecting a single
242
+ # entity are not permitted in a single `Commit` request:
243
+ # - `insert` followed by `insert`
244
+ # - `update` followed by `insert`
245
+ # - `upsert` followed by `insert`
246
+ # - `delete` followed by `update`
247
+ # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
248
+ # entity.
249
+ # Corresponds to the JSON property `mutations`
250
+ # @return [Array<Google::Apis::DatastoreV1::Mutation>]
251
+ attr_accessor :mutations
459
252
 
460
253
  def initialize(**args)
461
254
  update!(**args)
@@ -463,57 +256,73 @@ module Google
463
256
 
464
257
  # Update properties of this object
465
258
  def update!(**args)
466
- @read_options = args[:read_options] if args.key?(:read_options)
467
- @keys = args[:keys] if args.key?(:keys)
259
+ @transaction = args[:transaction] if args.key?(:transaction)
260
+ @mode = args[:mode] if args.key?(:mode)
261
+ @mutations = args[:mutations] if args.key?(:mutations)
468
262
  end
469
263
  end
470
264
 
471
- # A batch of results produced by a query.
472
- class QueryResultBatch
265
+ # A query for entities.
266
+ class Query
473
267
  include Google::Apis::Core::Hashable
474
268
 
475
- # The state of the query after the current batch.
476
- # Corresponds to the JSON property `moreResults`
477
- # @return [String]
478
- attr_accessor :more_results
269
+ # The maximum number of results to return. Applies after all other
270
+ # constraints. Optional.
271
+ # Unspecified is interpreted as no limit.
272
+ # Must be >= 0 if specified.
273
+ # Corresponds to the JSON property `limit`
274
+ # @return [Fixnum]
275
+ attr_accessor :limit
479
276
 
480
- # A cursor that points to the position after the last result in the batch.
277
+ # A holder for any type of filter.
278
+ # Corresponds to the JSON property `filter`
279
+ # @return [Google::Apis::DatastoreV1::Filter]
280
+ attr_accessor :filter
281
+
282
+ # An ending point for the query results. Query cursors are
283
+ # returned in query result batches and
284
+ # [can only be used to limit the same query](https://cloud.google.com/datastore/
285
+ # docs/concepts/queries#cursors_limits_and_offsets).
481
286
  # Corresponds to the JSON property `endCursor`
482
287
  # @return [String]
483
288
  attr_accessor :end_cursor
484
289
 
485
- # The version number of the snapshot this batch was returned from.
486
- # This applies to the range of results from the query's `start_cursor` (or
487
- # the beginning of the query if no cursor was given) to this batch's
488
- # `end_cursor` (not the query's `end_cursor`).
489
- # In a single transaction, subsequent query result batches for the same query
490
- # can have a greater snapshot version number. Each batch's snapshot version
491
- # is valid for all preceding batches.
492
- # The value will be zero for eventually consistent queries.
493
- # Corresponds to the JSON property `snapshotVersion`
494
- # @return [String]
495
- attr_accessor :snapshot_version
496
-
497
- # A cursor that points to the position after the last skipped result.
498
- # Will be set when `skipped_results` != 0.
499
- # Corresponds to the JSON property `skippedCursor`
500
- # @return [String]
501
- attr_accessor :skipped_cursor
290
+ # The properties to make distinct. The query results will contain the first
291
+ # result for each distinct combination of values for the given properties
292
+ # (if empty, all results are returned).
293
+ # Corresponds to the JSON property `distinctOn`
294
+ # @return [Array<Google::Apis::DatastoreV1::PropertyReference>]
295
+ attr_accessor :distinct_on
502
296
 
503
- # The number of results skipped, typically because of an offset.
504
- # Corresponds to the JSON property `skippedResults`
297
+ # The number of results to skip. Applies before limit, but after all other
298
+ # constraints. Optional. Must be >= 0 if specified.
299
+ # Corresponds to the JSON property `offset`
505
300
  # @return [Fixnum]
506
- attr_accessor :skipped_results
301
+ attr_accessor :offset
507
302
 
508
- # The result type for every entity in `entity_results`.
509
- # Corresponds to the JSON property `entityResultType`
303
+ # The projection to return. Defaults to returning all properties.
304
+ # Corresponds to the JSON property `projection`
305
+ # @return [Array<Google::Apis::DatastoreV1::Projection>]
306
+ attr_accessor :projection
307
+
308
+ # The order to apply to the query results (if empty, order is unspecified).
309
+ # Corresponds to the JSON property `order`
310
+ # @return [Array<Google::Apis::DatastoreV1::PropertyOrder>]
311
+ attr_accessor :order
312
+
313
+ # A starting point for the query results. Query cursors are
314
+ # returned in query result batches and
315
+ # [can only be used to continue the same query](https://cloud.google.com/
316
+ # datastore/docs/concepts/queries#cursors_limits_and_offsets).
317
+ # Corresponds to the JSON property `startCursor`
510
318
  # @return [String]
511
- attr_accessor :entity_result_type
319
+ attr_accessor :start_cursor
512
320
 
513
- # The results for this batch.
514
- # Corresponds to the JSON property `entityResults`
515
- # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
516
- attr_accessor :entity_results
321
+ # The kinds to query (if empty, returns entities of all kinds).
322
+ # Currently at most 1 kind may be specified.
323
+ # Corresponds to the JSON property `kind`
324
+ # @return [Array<Google::Apis::DatastoreV1::KindExpression>]
325
+ attr_accessor :kind
517
326
 
518
327
  def initialize(**args)
519
328
  update!(**args)
@@ -521,44 +330,27 @@ module Google
521
330
 
522
331
  # Update properties of this object
523
332
  def update!(**args)
524
- @more_results = args[:more_results] if args.key?(:more_results)
333
+ @limit = args[:limit] if args.key?(:limit)
334
+ @filter = args[:filter] if args.key?(:filter)
525
335
  @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
526
- @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
527
- @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
528
- @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
529
- @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
530
- @entity_results = args[:entity_results] if args.key?(:entity_results)
336
+ @distinct_on = args[:distinct_on] if args.key?(:distinct_on)
337
+ @offset = args[:offset] if args.key?(:offset)
338
+ @projection = args[:projection] if args.key?(:projection)
339
+ @order = args[:order] if args.key?(:order)
340
+ @start_cursor = args[:start_cursor] if args.key?(:start_cursor)
341
+ @kind = args[:kind] if args.key?(:kind)
531
342
  end
532
343
  end
533
344
 
534
- # A (kind, ID/name) pair used to construct a key path.
535
- # If either name or ID is set, the element is complete.
536
- # If neither is set, the element is incomplete.
537
- class PathElement
345
+ # The request for Datastore.Rollback.
346
+ class RollbackRequest
538
347
  include Google::Apis::Core::Hashable
539
348
 
540
- # The auto-allocated ID of the entity.
541
- # Never equal to zero. Values less than zero are discouraged and may not
542
- # be supported in the future.
543
- # Corresponds to the JSON property `id`
544
- # @return [String]
545
- attr_accessor :id
546
-
547
- # The name of the entity.
548
- # A name matching regex `__.*__` is reserved/read-only.
549
- # A name must not be more than 1500 bytes when UTF-8 encoded.
550
- # Cannot be `""`.
551
- # Corresponds to the JSON property `name`
552
- # @return [String]
553
- attr_accessor :name
554
-
555
- # The kind of the entity.
556
- # A kind matching regex `__.*__` is reserved/read-only.
557
- # A kind must not contain more than 1500 bytes when UTF-8 encoded.
558
- # Cannot be `""`.
559
- # Corresponds to the JSON property `kind`
349
+ # The transaction identifier, returned by a call to
350
+ # Datastore.BeginTransaction.
351
+ # Corresponds to the JSON property `transaction`
560
352
  # @return [String]
561
- attr_accessor :kind
353
+ attr_accessor :transaction
562
354
 
563
355
  def initialize(**args)
564
356
  update!(**args)
@@ -566,27 +358,38 @@ module Google
566
358
 
567
359
  # Update properties of this object
568
360
  def update!(**args)
569
- @id = args[:id] if args.key?(:id)
570
- @name = args[:name] if args.key?(:name)
571
- @kind = args[:kind] if args.key?(:kind)
361
+ @transaction = args[:transaction] if args.key?(:transaction)
572
362
  end
573
363
  end
574
364
 
575
- # A binding parameter for a GQL query.
576
- class GqlQueryParameter
365
+ # The result of fetching an entity from Datastore.
366
+ class EntityResult
577
367
  include Google::Apis::Core::Hashable
578
368
 
579
- # A query cursor. Query cursors are returned in query
580
- # result batches.
369
+ # A cursor that points to the position after the result entity.
370
+ # Set only when the `EntityResult` is part of a `QueryResultBatch` message.
581
371
  # Corresponds to the JSON property `cursor`
582
372
  # @return [String]
583
373
  attr_accessor :cursor
584
374
 
585
- # A message that can hold any of the supported value types and associated
586
- # metadata.
587
- # Corresponds to the JSON property `value`
588
- # @return [Google::Apis::DatastoreV1::Value]
589
- attr_accessor :value
375
+ # A Datastore data object.
376
+ # An entity is limited to 1 megabyte when stored. That _roughly_
377
+ # corresponds to a limit of 1 megabyte for the serialized form of this
378
+ # message.
379
+ # Corresponds to the JSON property `entity`
380
+ # @return [Google::Apis::DatastoreV1::Entity]
381
+ attr_accessor :entity
382
+
383
+ # The version of the entity, a strictly positive number that monotonically
384
+ # increases with changes to the entity.
385
+ # This field is set for `FULL` entity
386
+ # results.
387
+ # For missing entities in `LookupResponse`, this
388
+ # is the version of the snapshot that was used to look up the entity, and it
389
+ # is always set except for eventually consistent reads.
390
+ # Corresponds to the JSON property `version`
391
+ # @return [String]
392
+ attr_accessor :version
590
393
 
591
394
  def initialize(**args)
592
395
  update!(**args)
@@ -595,18 +398,26 @@ module Google
595
398
  # Update properties of this object
596
399
  def update!(**args)
597
400
  @cursor = args[:cursor] if args.key?(:cursor)
598
- @value = args[:value] if args.key?(:value)
401
+ @entity = args[:entity] if args.key?(:entity)
402
+ @version = args[:version] if args.key?(:version)
599
403
  end
600
404
  end
601
405
 
602
- # The response for Datastore.BeginTransaction.
603
- class BeginTransactionResponse
406
+ # A binding parameter for a GQL query.
407
+ class GqlQueryParameter
604
408
  include Google::Apis::Core::Hashable
605
409
 
606
- # The transaction identifier (always present).
607
- # Corresponds to the JSON property `transaction`
410
+ # A message that can hold any of the supported value types and associated
411
+ # metadata.
412
+ # Corresponds to the JSON property `value`
413
+ # @return [Google::Apis::DatastoreV1::Value]
414
+ attr_accessor :value
415
+
416
+ # A query cursor. Query cursors are returned in query
417
+ # result batches.
418
+ # Corresponds to the JSON property `cursor`
608
419
  # @return [String]
609
- attr_accessor :transaction
420
+ attr_accessor :cursor
610
421
 
611
422
  def initialize(**args)
612
423
  update!(**args)
@@ -614,19 +425,21 @@ module Google
614
425
 
615
426
  # Update properties of this object
616
427
  def update!(**args)
617
- @transaction = args[:transaction] if args.key?(:transaction)
428
+ @value = args[:value] if args.key?(:value)
429
+ @cursor = args[:cursor] if args.key?(:cursor)
618
430
  end
619
431
  end
620
432
 
621
- # The request for Datastore.AllocateIds.
622
- class AllocateIdsRequest
433
+ # An array value.
434
+ class ArrayValue
623
435
  include Google::Apis::Core::Hashable
624
436
 
625
- # A list of keys with incomplete key paths for which to allocate IDs.
626
- # No key may be reserved/read-only.
627
- # Corresponds to the JSON property `keys`
628
- # @return [Array<Google::Apis::DatastoreV1::Key>]
629
- attr_accessor :keys
437
+ # Values in the array.
438
+ # The order of this array may not be preserved if it contains a mix of
439
+ # indexed and unindexed values.
440
+ # Corresponds to the JSON property `values`
441
+ # @return [Array<Google::Apis::DatastoreV1::Value>]
442
+ attr_accessor :values
630
443
 
631
444
  def initialize(**args)
632
445
  update!(**args)
@@ -634,34 +447,23 @@ module Google
634
447
 
635
448
  # Update properties of this object
636
449
  def update!(**args)
637
- @keys = args[:keys] if args.key?(:keys)
450
+ @values = args[:values] if args.key?(:values)
638
451
  end
639
452
  end
640
453
 
641
- # The response for Datastore.Lookup.
642
- class LookupResponse
454
+ # A holder for any type of filter.
455
+ class Filter
643
456
  include Google::Apis::Core::Hashable
644
457
 
645
- # Entities found as `ResultType.FULL` entities. The order of results in this
646
- # field is undefined and has no relation to the order of the keys in the
647
- # input.
648
- # Corresponds to the JSON property `found`
649
- # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
650
- attr_accessor :found
651
-
652
- # Entities not found as `ResultType.KEY_ONLY` entities. The order of results
653
- # in this field is undefined and has no relation to the order of the keys
654
- # in the input.
655
- # Corresponds to the JSON property `missing`
656
- # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
657
- attr_accessor :missing
458
+ # A filter on a specific property.
459
+ # Corresponds to the JSON property `propertyFilter`
460
+ # @return [Google::Apis::DatastoreV1::PropertyFilter]
461
+ attr_accessor :property_filter
658
462
 
659
- # A list of keys that were not looked up due to resource constraints. The
660
- # order of results in this field is undefined and has no relation to the
661
- # order of the keys in the input.
662
- # Corresponds to the JSON property `deferred`
663
- # @return [Array<Google::Apis::DatastoreV1::Key>]
664
- attr_accessor :deferred
463
+ # A filter that merges multiple other filters using the given operator.
464
+ # Corresponds to the JSON property `compositeFilter`
465
+ # @return [Google::Apis::DatastoreV1::CompositeFilter]
466
+ attr_accessor :composite_filter
665
467
 
666
468
  def initialize(**args)
667
469
  update!(**args)
@@ -669,25 +471,19 @@ module Google
669
471
 
670
472
  # Update properties of this object
671
473
  def update!(**args)
672
- @found = args[:found] if args.key?(:found)
673
- @missing = args[:missing] if args.key?(:missing)
674
- @deferred = args[:deferred] if args.key?(:deferred)
474
+ @property_filter = args[:property_filter] if args.key?(:property_filter)
475
+ @composite_filter = args[:composite_filter] if args.key?(:composite_filter)
675
476
  end
676
477
  end
677
478
 
678
- # The response for Datastore.RunQuery.
679
- class RunQueryResponse
479
+ # The response for Datastore.BeginTransaction.
480
+ class BeginTransactionResponse
680
481
  include Google::Apis::Core::Hashable
681
482
 
682
- # A batch of results produced by a query.
683
- # Corresponds to the JSON property `batch`
684
- # @return [Google::Apis::DatastoreV1::QueryResultBatch]
685
- attr_accessor :batch
686
-
687
- # A query for entities.
688
- # Corresponds to the JSON property `query`
689
- # @return [Google::Apis::DatastoreV1::Query]
690
- attr_accessor :query
483
+ # The transaction identifier (always present).
484
+ # Corresponds to the JSON property `transaction`
485
+ # @return [String]
486
+ attr_accessor :transaction
691
487
 
692
488
  def initialize(**args)
693
489
  update!(**args)
@@ -695,40 +491,38 @@ module Google
695
491
 
696
492
  # Update properties of this object
697
493
  def update!(**args)
698
- @batch = args[:batch] if args.key?(:batch)
699
- @query = args[:query] if args.key?(:query)
494
+ @transaction = args[:transaction] if args.key?(:transaction)
700
495
  end
701
496
  end
702
497
 
703
- # The request for Datastore.Commit.
704
- class CommitRequest
498
+ # A partition ID identifies a grouping of entities. The grouping is always
499
+ # by project and namespace, however the namespace ID may be empty.
500
+ # A partition ID contains several dimensions:
501
+ # project ID and namespace ID.
502
+ # Partition dimensions:
503
+ # - May be `""`.
504
+ # - Must be valid UTF-8 bytes.
505
+ # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
506
+ # If the value of any dimension matches regex `__.*__`, the partition is
507
+ # reserved/read-only.
508
+ # A reserved/read-only partition ID is forbidden in certain documented
509
+ # contexts.
510
+ # Foreign partition IDs (in which the project ID does
511
+ # not match the context project ID ) are discouraged.
512
+ # Reads and writes of foreign partition IDs may fail if the project is not in an
513
+ # active state.
514
+ class PartitionId
705
515
  include Google::Apis::Core::Hashable
706
516
 
707
- # The identifier of the transaction associated with the commit. A
708
- # transaction identifier is returned by a call to
709
- # Datastore.BeginTransaction.
710
- # Corresponds to the JSON property `transaction`
517
+ # If not empty, the ID of the namespace to which the entities belong.
518
+ # Corresponds to the JSON property `namespaceId`
711
519
  # @return [String]
712
- attr_accessor :transaction
520
+ attr_accessor :namespace_id
713
521
 
714
- # The type of commit to perform. Defaults to `TRANSACTIONAL`.
715
- # Corresponds to the JSON property `mode`
522
+ # The ID of the project to which the entities belong.
523
+ # Corresponds to the JSON property `projectId`
716
524
  # @return [String]
717
- attr_accessor :mode
718
-
719
- # The mutations to perform.
720
- # When mode is `TRANSACTIONAL`, mutations affecting a single entity are
721
- # applied in order. The following sequences of mutations affecting a single
722
- # entity are not permitted in a single `Commit` request:
723
- # - `insert` followed by `insert`
724
- # - `update` followed by `insert`
725
- # - `upsert` followed by `insert`
726
- # - `delete` followed by `update`
727
- # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single
728
- # entity.
729
- # Corresponds to the JSON property `mutations`
730
- # @return [Array<Google::Apis::DatastoreV1::Mutation>]
731
- attr_accessor :mutations
525
+ attr_accessor :project_id
732
526
 
733
527
  def initialize(**args)
734
528
  update!(**args)
@@ -736,38 +530,83 @@ module Google
736
530
 
737
531
  # Update properties of this object
738
532
  def update!(**args)
739
- @transaction = args[:transaction] if args.key?(:transaction)
740
- @mode = args[:mode] if args.key?(:mode)
741
- @mutations = args[:mutations] if args.key?(:mutations)
533
+ @namespace_id = args[:namespace_id] if args.key?(:namespace_id)
534
+ @project_id = args[:project_id] if args.key?(:project_id)
742
535
  end
743
536
  end
744
537
 
745
- # The request for Datastore.BeginTransaction.
746
- class BeginTransactionRequest
538
+ # A batch of results produced by a query.
539
+ class QueryResultBatch
747
540
  include Google::Apis::Core::Hashable
748
541
 
542
+ # The version number of the snapshot this batch was returned from.
543
+ # This applies to the range of results from the query's `start_cursor` (or
544
+ # the beginning of the query if no cursor was given) to this batch's
545
+ # `end_cursor` (not the query's `end_cursor`).
546
+ # In a single transaction, subsequent query result batches for the same query
547
+ # can have a greater snapshot version number. Each batch's snapshot version
548
+ # is valid for all preceding batches.
549
+ # The value will be zero for eventually consistent queries.
550
+ # Corresponds to the JSON property `snapshotVersion`
551
+ # @return [String]
552
+ attr_accessor :snapshot_version
553
+
554
+ # A cursor that points to the position after the last result in the batch.
555
+ # Corresponds to the JSON property `endCursor`
556
+ # @return [String]
557
+ attr_accessor :end_cursor
558
+
559
+ # A cursor that points to the position after the last skipped result.
560
+ # Will be set when `skipped_results` != 0.
561
+ # Corresponds to the JSON property `skippedCursor`
562
+ # @return [String]
563
+ attr_accessor :skipped_cursor
564
+
565
+ # The result type for every entity in `entity_results`.
566
+ # Corresponds to the JSON property `entityResultType`
567
+ # @return [String]
568
+ attr_accessor :entity_result_type
569
+
570
+ # The state of the query after the current batch.
571
+ # Corresponds to the JSON property `moreResults`
572
+ # @return [String]
573
+ attr_accessor :more_results
574
+
575
+ # The results for this batch.
576
+ # Corresponds to the JSON property `entityResults`
577
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
578
+ attr_accessor :entity_results
579
+
580
+ # The number of results skipped, typically because of an offset.
581
+ # Corresponds to the JSON property `skippedResults`
582
+ # @return [Fixnum]
583
+ attr_accessor :skipped_results
584
+
749
585
  def initialize(**args)
750
586
  update!(**args)
751
587
  end
752
588
 
753
589
  # Update properties of this object
754
590
  def update!(**args)
591
+ @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
592
+ @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
593
+ @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
594
+ @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
595
+ @more_results = args[:more_results] if args.key?(:more_results)
596
+ @entity_results = args[:entity_results] if args.key?(:entity_results)
597
+ @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
755
598
  end
756
599
  end
757
600
 
758
- # The desired order for a specific property.
759
- class PropertyOrder
601
+ # The request for Datastore.AllocateIds.
602
+ class AllocateIdsRequest
760
603
  include Google::Apis::Core::Hashable
761
604
 
762
- # A reference to a property relative to the kind expressions.
763
- # Corresponds to the JSON property `property`
764
- # @return [Google::Apis::DatastoreV1::PropertyReference]
765
- attr_accessor :property
766
-
767
- # The direction to order by. Defaults to `ASCENDING`.
768
- # Corresponds to the JSON property `direction`
769
- # @return [String]
770
- attr_accessor :direction
605
+ # A list of keys with incomplete key paths for which to allocate IDs.
606
+ # No key may be reserved/read-only.
607
+ # Corresponds to the JSON property `keys`
608
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
609
+ attr_accessor :keys
771
610
 
772
611
  def initialize(**args)
773
612
  update!(**args)
@@ -775,8 +614,7 @@ module Google
775
614
 
776
615
  # Update properties of this object
777
616
  def update!(**args)
778
- @property = args[:property] if args.key?(:property)
779
- @direction = args[:direction] if args.key?(:direction)
617
+ @keys = args[:keys] if args.key?(:keys)
780
618
  end
781
619
  end
782
620
 
@@ -799,55 +637,66 @@ module Google
799
637
  end
800
638
  end
801
639
 
802
- # An object representing a latitude/longitude pair. This is expressed as a pair
803
- # of doubles representing degrees latitude and degrees longitude. Unless
804
- # specified otherwise, this must conform to the
805
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
806
- # standard</a>. Values must be within normalized ranges.
807
- # Example of normalization code in Python:
808
- # def NormalizeLongitude(longitude):
809
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
810
- # q, r = divmod(longitude, 360.0)
811
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
812
- # return r - 360.0
813
- # return r
814
- # def NormalizeLatLng(latitude, longitude):
815
- # """Wraps decimal degrees latitude and longitude to
816
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
817
- # r = latitude % 360.0
818
- # if r <= 90.0:
819
- # return r, NormalizeLongitude(longitude)
820
- # elif r >= 270.0:
821
- # return r - 360, NormalizeLongitude(longitude)
822
- # else:
823
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
824
- # assert 180.0 == NormalizeLongitude(180.0)
825
- # assert -180.0 == NormalizeLongitude(-180.0)
826
- # assert -179.0 == NormalizeLongitude(181.0)
827
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
828
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
829
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
830
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
831
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
832
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
833
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
834
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
835
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
836
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
837
- # The code in logs/storage/validator/logs_validator_traits.cc treats this type
838
- # as if it were annotated as ST_LOCATION.
839
- class LatLng
640
+ # A filter on a specific property.
641
+ class PropertyFilter
642
+ include Google::Apis::Core::Hashable
643
+
644
+ # A message that can hold any of the supported value types and associated
645
+ # metadata.
646
+ # Corresponds to the JSON property `value`
647
+ # @return [Google::Apis::DatastoreV1::Value]
648
+ attr_accessor :value
649
+
650
+ # The operator to filter by.
651
+ # Corresponds to the JSON property `op`
652
+ # @return [String]
653
+ attr_accessor :op
654
+
655
+ # A reference to a property relative to the kind expressions.
656
+ # Corresponds to the JSON property `property`
657
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
658
+ attr_accessor :property
659
+
660
+ def initialize(**args)
661
+ update!(**args)
662
+ end
663
+
664
+ # Update properties of this object
665
+ def update!(**args)
666
+ @value = args[:value] if args.key?(:value)
667
+ @op = args[:op] if args.key?(:op)
668
+ @property = args[:property] if args.key?(:property)
669
+ end
670
+ end
671
+
672
+ # A (kind, ID/name) pair used to construct a key path.
673
+ # If either name or ID is set, the element is complete.
674
+ # If neither is set, the element is incomplete.
675
+ class PathElement
840
676
  include Google::Apis::Core::Hashable
841
677
 
842
- # The longitude in degrees. It must be in the range [-180.0, +180.0].
843
- # Corresponds to the JSON property `longitude`
844
- # @return [Float]
845
- attr_accessor :longitude
678
+ # The kind of the entity.
679
+ # A kind matching regex `__.*__` is reserved/read-only.
680
+ # A kind must not contain more than 1500 bytes when UTF-8 encoded.
681
+ # Cannot be `""`.
682
+ # Corresponds to the JSON property `kind`
683
+ # @return [String]
684
+ attr_accessor :kind
846
685
 
847
- # The latitude in degrees. It must be in the range [-90.0, +90.0].
848
- # Corresponds to the JSON property `latitude`
849
- # @return [Float]
850
- attr_accessor :latitude
686
+ # The auto-allocated ID of the entity.
687
+ # Never equal to zero. Values less than zero are discouraged and may not
688
+ # be supported in the future.
689
+ # Corresponds to the JSON property `id`
690
+ # @return [String]
691
+ attr_accessor :id
692
+
693
+ # The name of the entity.
694
+ # A name matching regex `__.*__` is reserved/read-only.
695
+ # A name must not be more than 1500 bytes when UTF-8 encoded.
696
+ # Cannot be `""`.
697
+ # Corresponds to the JSON property `name`
698
+ # @return [String]
699
+ attr_accessor :name
851
700
 
852
701
  def initialize(**args)
853
702
  update!(**args)
@@ -855,64 +704,23 @@ module Google
855
704
 
856
705
  # Update properties of this object
857
706
  def update!(**args)
858
- @longitude = args[:longitude] if args.key?(:longitude)
859
- @latitude = args[:latitude] if args.key?(:latitude)
707
+ @kind = args[:kind] if args.key?(:kind)
708
+ @id = args[:id] if args.key?(:id)
709
+ @name = args[:name] if args.key?(:name)
860
710
  end
861
711
  end
862
712
 
863
- # A unique identifier for an entity.
864
- # If a key's partition ID or any of its path kinds or names are
865
- # reserved/read-only, the key is reserved/read-only.
866
- # A reserved/read-only key is forbidden in certain documented contexts.
867
- class Key
713
+ # The response for Datastore.Rollback.
714
+ # (an empty message).
715
+ class RollbackResponse
868
716
  include Google::Apis::Core::Hashable
869
717
 
870
- # A partition ID identifies a grouping of entities. The grouping is always
871
- # by project and namespace, however the namespace ID may be empty.
872
- # A partition ID contains several dimensions:
873
- # project ID and namespace ID.
874
- # Partition dimensions:
875
- # - May be `""`.
876
- # - Must be valid UTF-8 bytes.
877
- # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
878
- # If the value of any dimension matches regex `__.*__`, the partition is
879
- # reserved/read-only.
880
- # A reserved/read-only partition ID is forbidden in certain documented
881
- # contexts.
882
- # Foreign partition IDs (in which the project ID does
883
- # not match the context project ID ) are discouraged.
884
- # Reads and writes of foreign partition IDs may fail if the project is not in an
885
- # active state.
886
- # Corresponds to the JSON property `partitionId`
887
- # @return [Google::Apis::DatastoreV1::PartitionId]
888
- attr_accessor :partition_id
889
-
890
- # The entity path.
891
- # An entity path consists of one or more elements composed of a kind and a
892
- # string or numerical identifier, which identify entities. The first
893
- # element identifies a _root entity_, the second element identifies
894
- # a _child_ of the root entity, the third element identifies a child of the
895
- # second entity, and so forth. The entities identified by all prefixes of
896
- # the path are called the element's _ancestors_.
897
- # An entity path is always fully complete: *all* of the entity's ancestors
898
- # are required to be in the path along with the entity identifier itself.
899
- # The only exception is that in some documented cases, the identifier in the
900
- # last path element (for the entity) itself may be omitted. For example,
901
- # the last path element of the key of `Mutation.insert` may have no
902
- # identifier.
903
- # A path can never be empty, and a path can have at most 100 elements.
904
- # Corresponds to the JSON property `path`
905
- # @return [Array<Google::Apis::DatastoreV1::PathElement>]
906
- attr_accessor :path
907
-
908
718
  def initialize(**args)
909
719
  update!(**args)
910
720
  end
911
721
 
912
722
  # Update properties of this object
913
723
  def update!(**args)
914
- @partition_id = args[:partition_id] if args.key?(:partition_id)
915
- @path = args[:path] if args.key?(:path)
916
724
  end
917
725
  end
918
726
 
@@ -955,16 +763,33 @@ module Google
955
763
  end
956
764
  end
957
765
 
958
- # An array value.
959
- class ArrayValue
766
+ # The result of applying a mutation.
767
+ class MutationResult
960
768
  include Google::Apis::Core::Hashable
961
769
 
962
- # Values in the array.
963
- # The order of this array may not be preserved if it contains a mix of
964
- # indexed and unindexed values.
965
- # Corresponds to the JSON property `values`
966
- # @return [Array<Google::Apis::DatastoreV1::Value>]
967
- attr_accessor :values
770
+ # Whether a conflict was detected for this mutation. Always false when a
771
+ # conflict detection strategy field is not set in the mutation.
772
+ # Corresponds to the JSON property `conflictDetected`
773
+ # @return [Boolean]
774
+ attr_accessor :conflict_detected
775
+ alias_method :conflict_detected?, :conflict_detected
776
+
777
+ # A unique identifier for an entity.
778
+ # If a key's partition ID or any of its path kinds or names are
779
+ # reserved/read-only, the key is reserved/read-only.
780
+ # A reserved/read-only key is forbidden in certain documented contexts.
781
+ # Corresponds to the JSON property `key`
782
+ # @return [Google::Apis::DatastoreV1::Key]
783
+ attr_accessor :key
784
+
785
+ # The version of the entity on the server after processing the mutation. If
786
+ # the mutation doesn't change anything on the server, then the version will
787
+ # be the version of the current entity or, if no entity is present, a version
788
+ # that is strictly greater than the version of any previous entity and less
789
+ # than the version of any possible future entity.
790
+ # Corresponds to the JSON property `version`
791
+ # @return [String]
792
+ attr_accessor :version
968
793
 
969
794
  def initialize(**args)
970
795
  update!(**args)
@@ -972,51 +797,56 @@ module Google
972
797
 
973
798
  # Update properties of this object
974
799
  def update!(**args)
975
- @values = args[:values] if args.key?(:values)
800
+ @conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
801
+ @key = args[:key] if args.key?(:key)
802
+ @version = args[:version] if args.key?(:version)
976
803
  end
977
804
  end
978
805
 
979
- # A mutation to apply to an entity.
980
- class Mutation
806
+ # The response for Datastore.AllocateIds.
807
+ class AllocateIdsResponse
981
808
  include Google::Apis::Core::Hashable
982
809
 
983
- # A unique identifier for an entity.
984
- # If a key's partition ID or any of its path kinds or names are
985
- # reserved/read-only, the key is reserved/read-only.
986
- # A reserved/read-only key is forbidden in certain documented contexts.
987
- # Corresponds to the JSON property `delete`
988
- # @return [Google::Apis::DatastoreV1::Key]
989
- attr_accessor :delete
810
+ # The keys specified in the request (in the same order), each with
811
+ # its key path completed with a newly allocated ID.
812
+ # Corresponds to the JSON property `keys`
813
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
814
+ attr_accessor :keys
990
815
 
991
- # A Datastore data object.
992
- # An entity is limited to 1 megabyte when stored. That _roughly_
993
- # corresponds to a limit of 1 megabyte for the serialized form of this
994
- # message.
995
- # Corresponds to the JSON property `insert`
996
- # @return [Google::Apis::DatastoreV1::Entity]
997
- attr_accessor :insert
816
+ def initialize(**args)
817
+ update!(**args)
818
+ end
998
819
 
999
- # The version of the entity that this mutation is being applied to. If this
1000
- # does not match the current version on the server, the mutation conflicts.
1001
- # Corresponds to the JSON property `baseVersion`
1002
- # @return [String]
1003
- attr_accessor :base_version
820
+ # Update properties of this object
821
+ def update!(**args)
822
+ @keys = args[:keys] if args.key?(:keys)
823
+ end
824
+ end
1004
825
 
1005
- # A Datastore data object.
1006
- # An entity is limited to 1 megabyte when stored. That _roughly_
1007
- # corresponds to a limit of 1 megabyte for the serialized form of this
1008
- # message.
1009
- # Corresponds to the JSON property `update`
1010
- # @return [Google::Apis::DatastoreV1::Entity]
1011
- attr_accessor :update
826
+ # The response for Datastore.Lookup.
827
+ class LookupResponse
828
+ include Google::Apis::Core::Hashable
1012
829
 
1013
- # A Datastore data object.
1014
- # An entity is limited to 1 megabyte when stored. That _roughly_
1015
- # corresponds to a limit of 1 megabyte for the serialized form of this
1016
- # message.
1017
- # Corresponds to the JSON property `upsert`
1018
- # @return [Google::Apis::DatastoreV1::Entity]
1019
- attr_accessor :upsert
830
+ # Entities found as `ResultType.FULL` entities. The order of results in this
831
+ # field is undefined and has no relation to the order of the keys in the
832
+ # input.
833
+ # Corresponds to the JSON property `found`
834
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
835
+ attr_accessor :found
836
+
837
+ # Entities not found as `ResultType.KEY_ONLY` entities. The order of results
838
+ # in this field is undefined and has no relation to the order of the keys
839
+ # in the input.
840
+ # Corresponds to the JSON property `missing`
841
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
842
+ attr_accessor :missing
843
+
844
+ # A list of keys that were not looked up due to resource constraints. The
845
+ # order of results in this field is undefined and has no relation to the
846
+ # order of the keys in the input.
847
+ # Corresponds to the JSON property `deferred`
848
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
849
+ attr_accessor :deferred
1020
850
 
1021
851
  def initialize(**args)
1022
852
  update!(**args)
@@ -1024,30 +854,69 @@ module Google
1024
854
 
1025
855
  # Update properties of this object
1026
856
  def update!(**args)
1027
- @delete = args[:delete] if args.key?(:delete)
1028
- @insert = args[:insert] if args.key?(:insert)
1029
- @base_version = args[:base_version] if args.key?(:base_version)
1030
- @update = args[:update] if args.key?(:update)
1031
- @upsert = args[:upsert] if args.key?(:upsert)
857
+ @found = args[:found] if args.key?(:found)
858
+ @missing = args[:missing] if args.key?(:missing)
859
+ @deferred = args[:deferred] if args.key?(:deferred)
1032
860
  end
1033
861
  end
1034
862
 
1035
- # The options shared by read requests.
1036
- class ReadOptions
863
+ # The request for Datastore.BeginTransaction.
864
+ class BeginTransactionRequest
1037
865
  include Google::Apis::Core::Hashable
1038
866
 
1039
- # The non-transactional read consistency to use.
1040
- # Cannot be set to `STRONG` for global queries.
1041
- # Corresponds to the JSON property `readConsistency`
1042
- # @return [String]
1043
- attr_accessor :read_consistency
867
+ def initialize(**args)
868
+ update!(**args)
869
+ end
1044
870
 
1045
- # The identifier of the transaction in which to read. A
1046
- # transaction identifier is returned by a call to
1047
- # Datastore.BeginTransaction.
1048
- # Corresponds to the JSON property `transaction`
1049
- # @return [String]
1050
- attr_accessor :transaction
871
+ # Update properties of this object
872
+ def update!(**args)
873
+ end
874
+ end
875
+
876
+ # A unique identifier for an entity.
877
+ # If a key's partition ID or any of its path kinds or names are
878
+ # reserved/read-only, the key is reserved/read-only.
879
+ # A reserved/read-only key is forbidden in certain documented contexts.
880
+ class Key
881
+ include Google::Apis::Core::Hashable
882
+
883
+ # A partition ID identifies a grouping of entities. The grouping is always
884
+ # by project and namespace, however the namespace ID may be empty.
885
+ # A partition ID contains several dimensions:
886
+ # project ID and namespace ID.
887
+ # Partition dimensions:
888
+ # - May be `""`.
889
+ # - Must be valid UTF-8 bytes.
890
+ # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
891
+ # If the value of any dimension matches regex `__.*__`, the partition is
892
+ # reserved/read-only.
893
+ # A reserved/read-only partition ID is forbidden in certain documented
894
+ # contexts.
895
+ # Foreign partition IDs (in which the project ID does
896
+ # not match the context project ID ) are discouraged.
897
+ # Reads and writes of foreign partition IDs may fail if the project is not in an
898
+ # active state.
899
+ # Corresponds to the JSON property `partitionId`
900
+ # @return [Google::Apis::DatastoreV1::PartitionId]
901
+ attr_accessor :partition_id
902
+
903
+ # The entity path.
904
+ # An entity path consists of one or more elements composed of a kind and a
905
+ # string or numerical identifier, which identify entities. The first
906
+ # element identifies a _root entity_, the second element identifies
907
+ # a _child_ of the root entity, the third element identifies a child of the
908
+ # second entity, and so forth. The entities identified by all prefixes of
909
+ # the path are called the element's _ancestors_.
910
+ # An entity path is always fully complete: *all* of the entity's ancestors
911
+ # are required to be in the path along with the entity identifier itself.
912
+ # The only exception is that in some documented cases, the identifier in the
913
+ # last path element (for the entity) itself may be omitted. For example,
914
+ # the last path element of the key of `Mutation.insert` may have no
915
+ # identifier.
916
+ # A path can never be empty, and a path can have at most 100 elements.
917
+ # Corresponds to the JSON property `path`
918
+ # @return [Array<Google::Apis::DatastoreV1::PathElement>]
919
+ attr_accessor :path
1051
920
 
1052
921
  def initialize(**args)
1053
922
  update!(**args)
@@ -1055,29 +924,53 @@ module Google
1055
924
 
1056
925
  # Update properties of this object
1057
926
  def update!(**args)
1058
- @read_consistency = args[:read_consistency] if args.key?(:read_consistency)
1059
- @transaction = args[:transaction] if args.key?(:transaction)
927
+ @partition_id = args[:partition_id] if args.key?(:partition_id)
928
+ @path = args[:path] if args.key?(:path)
1060
929
  end
1061
930
  end
1062
931
 
1063
- # The response for Datastore.Rollback.
1064
- # (an empty message).
1065
- class RollbackResponse
932
+ # The response for Datastore.RunQuery.
933
+ class RunQueryResponse
1066
934
  include Google::Apis::Core::Hashable
1067
935
 
936
+ # A batch of results produced by a query.
937
+ # Corresponds to the JSON property `batch`
938
+ # @return [Google::Apis::DatastoreV1::QueryResultBatch]
939
+ attr_accessor :batch
940
+
941
+ # A query for entities.
942
+ # Corresponds to the JSON property `query`
943
+ # @return [Google::Apis::DatastoreV1::Query]
944
+ attr_accessor :query
945
+
1068
946
  def initialize(**args)
1069
947
  update!(**args)
1070
948
  end
1071
949
 
1072
950
  # Update properties of this object
1073
951
  def update!(**args)
952
+ @batch = args[:batch] if args.key?(:batch)
953
+ @query = args[:query] if args.key?(:query)
1074
954
  end
1075
955
  end
1076
956
 
1077
- # The result of applying a mutation.
1078
- class MutationResult
957
+ # A Datastore data object.
958
+ # An entity is limited to 1 megabyte when stored. That _roughly_
959
+ # corresponds to a limit of 1 megabyte for the serialized form of this
960
+ # message.
961
+ class Entity
1079
962
  include Google::Apis::Core::Hashable
1080
963
 
964
+ # The entity's properties.
965
+ # The map's keys are property names.
966
+ # A property name matching regex `__.*__` is reserved.
967
+ # A reserved property name is forbidden in certain documented contexts.
968
+ # The name must not contain more than 500 characters.
969
+ # The name cannot be `""`.
970
+ # Corresponds to the JSON property `properties`
971
+ # @return [Hash<String,Google::Apis::DatastoreV1::Value>]
972
+ attr_accessor :properties
973
+
1081
974
  # A unique identifier for an entity.
1082
975
  # If a key's partition ID or any of its path kinds or names are
1083
976
  # reserved/read-only, the key is reserved/read-only.
@@ -1086,31 +979,14 @@ module Google
1086
979
  # @return [Google::Apis::DatastoreV1::Key]
1087
980
  attr_accessor :key
1088
981
 
1089
- # The version of the entity on the server after processing the mutation. If
1090
- # the mutation doesn't change anything on the server, then the version will
1091
- # be the version of the current entity or, if no entity is present, a version
1092
- # that is strictly greater than the version of any previous entity and less
1093
- # than the version of any possible future entity.
1094
- # Corresponds to the JSON property `version`
1095
- # @return [String]
1096
- attr_accessor :version
1097
-
1098
- # Whether a conflict was detected for this mutation. Always false when a
1099
- # conflict detection strategy field is not set in the mutation.
1100
- # Corresponds to the JSON property `conflictDetected`
1101
- # @return [Boolean]
1102
- attr_accessor :conflict_detected
1103
- alias_method :conflict_detected?, :conflict_detected
1104
-
1105
982
  def initialize(**args)
1106
983
  update!(**args)
1107
984
  end
1108
985
 
1109
986
  # Update properties of this object
1110
987
  def update!(**args)
988
+ @properties = args[:properties] if args.key?(:properties)
1111
989
  @key = args[:key] if args.key?(:key)
1112
- @version = args[:version] if args.key?(:version)
1113
- @conflict_detected = args[:conflict_detected] if args.key?(:conflict_detected)
1114
990
  end
1115
991
  end
1116
992
 
@@ -1124,6 +1000,14 @@ module Google
1124
1000
  # @return [String]
1125
1001
  attr_accessor :query_string
1126
1002
 
1003
+ # For each non-reserved named binding site in the query string, there must be
1004
+ # a named parameter with that name, but not necessarily the inverse.
1005
+ # Key must match regex `A-Za-z_$*`, must not match regex
1006
+ # `__.*__`, and must not be `""`.
1007
+ # Corresponds to the JSON property `namedBindings`
1008
+ # @return [Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter>]
1009
+ attr_accessor :named_bindings
1010
+
1127
1011
  # When false, the query string must not contain any literals and instead must
1128
1012
  # bind all values. For example,
1129
1013
  # `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while
@@ -1133,14 +1017,6 @@ module Google
1133
1017
  attr_accessor :allow_literals
1134
1018
  alias_method :allow_literals?, :allow_literals
1135
1019
 
1136
- # For each non-reserved named binding site in the query string, there must be
1137
- # a named parameter with that name, but not necessarily the inverse.
1138
- # Key must match regex `A-Za-z_$*`, must not match regex
1139
- # `__.*__`, and must not be `""`.
1140
- # Corresponds to the JSON property `namedBindings`
1141
- # @return [Hash<String,Google::Apis::DatastoreV1::GqlQueryParameter>]
1142
- attr_accessor :named_bindings
1143
-
1144
1020
  # Numbered binding site @1 references the first numbered parameter,
1145
1021
  # effectively using 1-based indexing, rather than the usual 0.
1146
1022
  # For each binding site numbered i in `query_string`, there must be an i-th
@@ -1156,25 +1032,53 @@ module Google
1156
1032
  # Update properties of this object
1157
1033
  def update!(**args)
1158
1034
  @query_string = args[:query_string] if args.key?(:query_string)
1159
- @allow_literals = args[:allow_literals] if args.key?(:allow_literals)
1160
1035
  @named_bindings = args[:named_bindings] if args.key?(:named_bindings)
1036
+ @allow_literals = args[:allow_literals] if args.key?(:allow_literals)
1161
1037
  @positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings)
1162
1038
  end
1163
1039
  end
1164
1040
 
1165
- # A holder for any type of filter.
1166
- class Filter
1041
+ # A mutation to apply to an entity.
1042
+ class Mutation
1167
1043
  include Google::Apis::Core::Hashable
1168
1044
 
1169
- # A filter on a specific property.
1170
- # Corresponds to the JSON property `propertyFilter`
1171
- # @return [Google::Apis::DatastoreV1::PropertyFilter]
1172
- attr_accessor :property_filter
1045
+ # A Datastore data object.
1046
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1047
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1048
+ # message.
1049
+ # Corresponds to the JSON property `insert`
1050
+ # @return [Google::Apis::DatastoreV1::Entity]
1051
+ attr_accessor :insert
1173
1052
 
1174
- # A filter that merges multiple other filters using the given operator.
1175
- # Corresponds to the JSON property `compositeFilter`
1176
- # @return [Google::Apis::DatastoreV1::CompositeFilter]
1177
- attr_accessor :composite_filter
1053
+ # A Datastore data object.
1054
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1055
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1056
+ # message.
1057
+ # Corresponds to the JSON property `update`
1058
+ # @return [Google::Apis::DatastoreV1::Entity]
1059
+ attr_accessor :update
1060
+
1061
+ # The version of the entity that this mutation is being applied to. If this
1062
+ # does not match the current version on the server, the mutation conflicts.
1063
+ # Corresponds to the JSON property `baseVersion`
1064
+ # @return [String]
1065
+ attr_accessor :base_version
1066
+
1067
+ # A Datastore data object.
1068
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1069
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1070
+ # message.
1071
+ # Corresponds to the JSON property `upsert`
1072
+ # @return [Google::Apis::DatastoreV1::Entity]
1073
+ attr_accessor :upsert
1074
+
1075
+ # A unique identifier for an entity.
1076
+ # If a key's partition ID or any of its path kinds or names are
1077
+ # reserved/read-only, the key is reserved/read-only.
1078
+ # A reserved/read-only key is forbidden in certain documented contexts.
1079
+ # Corresponds to the JSON property `delete`
1080
+ # @return [Google::Apis::DatastoreV1::Key]
1081
+ attr_accessor :delete
1178
1082
 
1179
1083
  def initialize(**args)
1180
1084
  update!(**args)
@@ -1182,8 +1086,38 @@ module Google
1182
1086
 
1183
1087
  # Update properties of this object
1184
1088
  def update!(**args)
1185
- @property_filter = args[:property_filter] if args.key?(:property_filter)
1186
- @composite_filter = args[:composite_filter] if args.key?(:composite_filter)
1089
+ @insert = args[:insert] if args.key?(:insert)
1090
+ @update = args[:update] if args.key?(:update)
1091
+ @base_version = args[:base_version] if args.key?(:base_version)
1092
+ @upsert = args[:upsert] if args.key?(:upsert)
1093
+ @delete = args[:delete] if args.key?(:delete)
1094
+ end
1095
+ end
1096
+
1097
+ # The response for Datastore.Commit.
1098
+ class CommitResponse
1099
+ include Google::Apis::Core::Hashable
1100
+
1101
+ # The result of performing the mutations.
1102
+ # The i-th mutation result corresponds to the i-th mutation in the request.
1103
+ # Corresponds to the JSON property `mutationResults`
1104
+ # @return [Array<Google::Apis::DatastoreV1::MutationResult>]
1105
+ attr_accessor :mutation_results
1106
+
1107
+ # The number of index entries updated during the commit, or zero if none were
1108
+ # updated.
1109
+ # Corresponds to the JSON property `indexUpdates`
1110
+ # @return [Fixnum]
1111
+ attr_accessor :index_updates
1112
+
1113
+ def initialize(**args)
1114
+ update!(**args)
1115
+ end
1116
+
1117
+ # Update properties of this object
1118
+ def update!(**args)
1119
+ @mutation_results = args[:mutation_results] if args.key?(:mutation_results)
1120
+ @index_updates = args[:index_updates] if args.key?(:index_updates)
1187
1121
  end
1188
1122
  end
1189
1123
 
@@ -1239,15 +1173,19 @@ module Google
1239
1173
  end
1240
1174
  end
1241
1175
 
1242
- # The request for Datastore.Rollback.
1243
- class RollbackRequest
1176
+ # The request for Datastore.Lookup.
1177
+ class LookupRequest
1244
1178
  include Google::Apis::Core::Hashable
1245
1179
 
1246
- # The transaction identifier, returned by a call to
1247
- # Datastore.BeginTransaction.
1248
- # Corresponds to the JSON property `transaction`
1249
- # @return [String]
1250
- attr_accessor :transaction
1180
+ # The options shared by read requests.
1181
+ # Corresponds to the JSON property `readOptions`
1182
+ # @return [Google::Apis::DatastoreV1::ReadOptions]
1183
+ attr_accessor :read_options
1184
+
1185
+ # Keys of entities to look up.
1186
+ # Corresponds to the JSON property `keys`
1187
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
1188
+ attr_accessor :keys
1251
1189
 
1252
1190
  def initialize(**args)
1253
1191
  update!(**args)
@@ -1255,7 +1193,69 @@ module Google
1255
1193
 
1256
1194
  # Update properties of this object
1257
1195
  def update!(**args)
1258
- @transaction = args[:transaction] if args.key?(:transaction)
1196
+ @read_options = args[:read_options] if args.key?(:read_options)
1197
+ @keys = args[:keys] if args.key?(:keys)
1198
+ end
1199
+ end
1200
+
1201
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1202
+ # of doubles representing degrees latitude and degrees longitude. Unless
1203
+ # specified otherwise, this must conform to the
1204
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1205
+ # standard</a>. Values must be within normalized ranges.
1206
+ # Example of normalization code in Python:
1207
+ # def NormalizeLongitude(longitude):
1208
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1209
+ # q, r = divmod(longitude, 360.0)
1210
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
1211
+ # return r - 360.0
1212
+ # return r
1213
+ # def NormalizeLatLng(latitude, longitude):
1214
+ # """Wraps decimal degrees latitude and longitude to
1215
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1216
+ # r = latitude % 360.0
1217
+ # if r <= 90.0:
1218
+ # return r, NormalizeLongitude(longitude)
1219
+ # elif r >= 270.0:
1220
+ # return r - 360, NormalizeLongitude(longitude)
1221
+ # else:
1222
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
1223
+ # assert 180.0 == NormalizeLongitude(180.0)
1224
+ # assert -180.0 == NormalizeLongitude(-180.0)
1225
+ # assert -179.0 == NormalizeLongitude(181.0)
1226
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1227
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1228
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1229
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1230
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1231
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1232
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1233
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1234
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1235
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1236
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1237
+ # as if it were annotated as ST_LOCATION.
1238
+ class LatLng
1239
+ include Google::Apis::Core::Hashable
1240
+
1241
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1242
+ # Corresponds to the JSON property `latitude`
1243
+ # @return [Float]
1244
+ attr_accessor :latitude
1245
+
1246
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1247
+ # Corresponds to the JSON property `longitude`
1248
+ # @return [Float]
1249
+ attr_accessor :longitude
1250
+
1251
+ def initialize(**args)
1252
+ update!(**args)
1253
+ end
1254
+
1255
+ # Update properties of this object
1256
+ def update!(**args)
1257
+ @latitude = args[:latitude] if args.key?(:latitude)
1258
+ @longitude = args[:longitude] if args.key?(:longitude)
1259
1259
  end
1260
1260
  end
1261
1261