google-api-client 0.10.2 → 0.10.3

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