google-api-client 0.9.8 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -0,0 +1,38 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/datastore_v1/service.rb'
16
+ require 'google/apis/datastore_v1/classes.rb'
17
+ require 'google/apis/datastore_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Datastore API
22
+ #
23
+ # Accesses the schemaless NoSQL database to provide fully managed, robust,
24
+ # scalable storage for your application.
25
+ #
26
+ # @see https://cloud.google.com/datastore/
27
+ module DatastoreV1
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'
33
+
34
+ # View and manage your Google Cloud Datastore data
35
+ AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore'
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,1289 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DatastoreV1
24
+
25
+ # A message that can hold any of the supported value types and associated
26
+ # metadata.
27
+ class Value
28
+ include Google::Apis::Core::Hashable
29
+
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
125
+
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
133
+
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
140
+
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
147
+
148
+ def initialize(**args)
149
+ update!(**args)
150
+ end
151
+
152
+ # Update properties of this object
153
+ 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)
167
+ end
168
+ end
169
+
170
+ # The options shared by read requests.
171
+ class ReadOptions
172
+ include Google::Apis::Core::Hashable
173
+
174
+ # The identifier of the transaction in which to read. A
175
+ # transaction identifier is returned by a call to
176
+ # Datastore.BeginTransaction.
177
+ # Corresponds to the JSON property `transaction`
178
+ # @return [String]
179
+ attr_accessor :transaction
180
+
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
+ def initialize(**args)
188
+ update!(**args)
189
+ end
190
+
191
+ # Update properties of this object
192
+ def update!(**args)
193
+ @transaction = args[:transaction] if args.key?(:transaction)
194
+ @read_consistency = args[:read_consistency] if args.key?(:read_consistency)
195
+ end
196
+ end
197
+
198
+ # The desired order for a specific property.
199
+ class PropertyOrder
200
+ include Google::Apis::Core::Hashable
201
+
202
+ # The direction to order by. Defaults to `ASCENDING`.
203
+ # Corresponds to the JSON property `direction`
204
+ # @return [String]
205
+ attr_accessor :direction
206
+
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
211
+
212
+ def initialize(**args)
213
+ update!(**args)
214
+ end
215
+
216
+ # Update properties of this object
217
+ def update!(**args)
218
+ @direction = args[:direction] if args.key?(:direction)
219
+ @property = args[:property] if args.key?(:property)
220
+ end
221
+ end
222
+
223
+ # The request for Datastore.Commit.
224
+ class CommitRequest
225
+ include Google::Apis::Core::Hashable
226
+
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
252
+
253
+ def initialize(**args)
254
+ update!(**args)
255
+ end
256
+
257
+ # Update properties of this object
258
+ 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)
262
+ end
263
+ end
264
+
265
+ # A query for entities.
266
+ class Query
267
+ include Google::Apis::Core::Hashable
268
+
269
+ # The maximum number of results to return. Applies after all other
270
+ # constraints. Optional.
271
+ # Unspecified is interpreted as no limit.
272
+ # Must be >= 0 if specified.
273
+ # Corresponds to the JSON property `limit`
274
+ # @return [Fixnum]
275
+ attr_accessor :limit
276
+
277
+ # A holder for any type of filter.
278
+ # Corresponds to the JSON property `filter`
279
+ # @return [Google::Apis::DatastoreV1::Filter]
280
+ attr_accessor :filter
281
+
282
+ # An ending point for the query results. Query cursors are
283
+ # returned in query result batches and
284
+ # [can only be used to limit the same query](https://cloud.google.com/datastore/
285
+ # docs/concepts/queries#cursors_limits_and_offsets).
286
+ # Corresponds to the JSON property `endCursor`
287
+ # @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
296
+
297
+ # The number of results to skip. Applies before limit, but after all other
298
+ # constraints. Optional. Must be >= 0 if specified.
299
+ # Corresponds to the JSON property `offset`
300
+ # @return [Fixnum]
301
+ attr_accessor :offset
302
+
303
+ # The projection to return. Defaults to returning all properties.
304
+ # Corresponds to the JSON property `projection`
305
+ # @return [Array<Google::Apis::DatastoreV1::Projection>]
306
+ attr_accessor :projection
307
+
308
+ # The order to apply to the query results (if empty, order is unspecified).
309
+ # Corresponds to the JSON property `order`
310
+ # @return [Array<Google::Apis::DatastoreV1::PropertyOrder>]
311
+ attr_accessor :order
312
+
313
+ # A starting point for the query results. Query cursors are
314
+ # returned in query result batches and
315
+ # [can only be used to continue the same query](https://cloud.google.com/
316
+ # datastore/docs/concepts/queries#cursors_limits_and_offsets).
317
+ # Corresponds to the JSON property `startCursor`
318
+ # @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
326
+
327
+ def initialize(**args)
328
+ update!(**args)
329
+ end
330
+
331
+ # Update properties of this object
332
+ def update!(**args)
333
+ @limit = args[:limit] if args.key?(:limit)
334
+ @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
+ @start_cursor = args[:start_cursor] if args.key?(:start_cursor)
341
+ @kind = args[:kind] if args.key?(:kind)
342
+ end
343
+ end
344
+
345
+ # The request for Datastore.Rollback.
346
+ class RollbackRequest
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # The transaction identifier, returned by a call to
350
+ # Datastore.BeginTransaction.
351
+ # Corresponds to the JSON property `transaction`
352
+ # @return [String]
353
+ attr_accessor :transaction
354
+
355
+ def initialize(**args)
356
+ update!(**args)
357
+ end
358
+
359
+ # Update properties of this object
360
+ def update!(**args)
361
+ @transaction = args[:transaction] if args.key?(:transaction)
362
+ end
363
+ end
364
+
365
+ # The result of fetching an entity from Datastore.
366
+ class EntityResult
367
+ include Google::Apis::Core::Hashable
368
+
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`
372
+ # @return [String]
373
+ attr_accessor :cursor
374
+
375
+ # A Datastore data object.
376
+ # An entity is limited to 1 megabyte when stored. That _roughly_
377
+ # corresponds to a limit of 1 megabyte for the serialized form of this
378
+ # message.
379
+ # Corresponds to the JSON property `entity`
380
+ # @return [Google::Apis::DatastoreV1::Entity]
381
+ attr_accessor :entity
382
+
383
+ # The version of the entity, a strictly positive number that monotonically
384
+ # increases with changes to the entity.
385
+ # This field is set for `FULL` entity
386
+ # results.
387
+ # For missing entities in `LookupResponse`, this
388
+ # is the version of the snapshot that was used to look up the entity, and it
389
+ # is always set except for eventually consistent reads.
390
+ # Corresponds to the JSON property `version`
391
+ # @return [String]
392
+ attr_accessor :version
393
+
394
+ def initialize(**args)
395
+ update!(**args)
396
+ end
397
+
398
+ # Update properties of this object
399
+ def update!(**args)
400
+ @cursor = args[:cursor] if args.key?(:cursor)
401
+ @entity = args[:entity] if args.key?(:entity)
402
+ @version = args[:version] if args.key?(:version)
403
+ end
404
+ end
405
+
406
+ # A binding parameter for a GQL query.
407
+ class GqlQueryParameter
408
+ include Google::Apis::Core::Hashable
409
+
410
+ # A message that can hold any of the supported value types and associated
411
+ # metadata.
412
+ # Corresponds to the JSON property `value`
413
+ # @return [Google::Apis::DatastoreV1::Value]
414
+ attr_accessor :value
415
+
416
+ # A query cursor. Query cursors are returned in query
417
+ # result batches.
418
+ # Corresponds to the JSON property `cursor`
419
+ # @return [String]
420
+ attr_accessor :cursor
421
+
422
+ def initialize(**args)
423
+ update!(**args)
424
+ end
425
+
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
432
+
433
+ # An array value.
434
+ class ArrayValue
435
+ include Google::Apis::Core::Hashable
436
+
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
443
+
444
+ def initialize(**args)
445
+ update!(**args)
446
+ end
447
+
448
+ # Update properties of this object
449
+ def update!(**args)
450
+ @values = args[:values] if args.key?(:values)
451
+ end
452
+ end
453
+
454
+ # A holder for any type of filter.
455
+ class Filter
456
+ include Google::Apis::Core::Hashable
457
+
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
462
+
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
467
+
468
+ def initialize(**args)
469
+ update!(**args)
470
+ end
471
+
472
+ # Update properties of this object
473
+ 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)
476
+ end
477
+ end
478
+
479
+ # The response for Datastore.BeginTransaction.
480
+ class BeginTransactionResponse
481
+ include Google::Apis::Core::Hashable
482
+
483
+ # The transaction identifier (always present).
484
+ # Corresponds to the JSON property `transaction`
485
+ # @return [String]
486
+ attr_accessor :transaction
487
+
488
+ def initialize(**args)
489
+ update!(**args)
490
+ end
491
+
492
+ # Update properties of this object
493
+ def update!(**args)
494
+ @transaction = args[:transaction] if args.key?(:transaction)
495
+ end
496
+ end
497
+
498
+ # A partition ID identifies a grouping of entities. The grouping is always
499
+ # by project and namespace, however the namespace ID may be empty.
500
+ # A partition ID contains several dimensions:
501
+ # project ID and namespace ID.
502
+ # Partition dimensions:
503
+ # - May be `""`.
504
+ # - Must be valid UTF-8 bytes.
505
+ # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
506
+ # If the value of any dimension matches regex `__.*__`, the partition is
507
+ # reserved/read-only.
508
+ # A reserved/read-only partition ID is forbidden in certain documented
509
+ # contexts.
510
+ # Foreign partition IDs (in which the project ID does
511
+ # not match the context project ID ) are discouraged.
512
+ # Reads and writes of foreign partition IDs may fail if the project is not in an
513
+ # active state.
514
+ class PartitionId
515
+ include Google::Apis::Core::Hashable
516
+
517
+ # If not empty, the ID of the namespace to which the entities belong.
518
+ # Corresponds to the JSON property `namespaceId`
519
+ # @return [String]
520
+ attr_accessor :namespace_id
521
+
522
+ # The ID of the project to which the entities belong.
523
+ # Corresponds to the JSON property `projectId`
524
+ # @return [String]
525
+ attr_accessor :project_id
526
+
527
+ def initialize(**args)
528
+ update!(**args)
529
+ end
530
+
531
+ # Update properties of this object
532
+ 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)
535
+ end
536
+ end
537
+
538
+ # A batch of results produced by a query.
539
+ class QueryResultBatch
540
+ include Google::Apis::Core::Hashable
541
+
542
+ # The version number of the snapshot this batch was returned from.
543
+ # This applies to the range of results from the query's `start_cursor` (or
544
+ # the beginning of the query if no cursor was given) to this batch's
545
+ # `end_cursor` (not the query's `end_cursor`).
546
+ # In a single transaction, subsequent query result batches for the same query
547
+ # can have a greater snapshot version number. Each batch's snapshot version
548
+ # is valid for all preceding batches.
549
+ # The value will be zero for eventually consistent queries.
550
+ # Corresponds to the JSON property `snapshotVersion`
551
+ # @return [String]
552
+ attr_accessor :snapshot_version
553
+
554
+ # A cursor that points to the position after the last result in the batch.
555
+ # Corresponds to the JSON property `endCursor`
556
+ # @return [String]
557
+ attr_accessor :end_cursor
558
+
559
+ # A cursor that points to the position after the last skipped result.
560
+ # Will be set when `skipped_results` != 0.
561
+ # Corresponds to the JSON property `skippedCursor`
562
+ # @return [String]
563
+ attr_accessor :skipped_cursor
564
+
565
+ # The result type for every entity in `entity_results`.
566
+ # Corresponds to the JSON property `entityResultType`
567
+ # @return [String]
568
+ attr_accessor :entity_result_type
569
+
570
+ # The state of the query after the current batch.
571
+ # Corresponds to the JSON property `moreResults`
572
+ # @return [String]
573
+ attr_accessor :more_results
574
+
575
+ # The results for this batch.
576
+ # Corresponds to the JSON property `entityResults`
577
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
578
+ attr_accessor :entity_results
579
+
580
+ # The number of results skipped, typically because of an offset.
581
+ # Corresponds to the JSON property `skippedResults`
582
+ # @return [Fixnum]
583
+ attr_accessor :skipped_results
584
+
585
+ def initialize(**args)
586
+ update!(**args)
587
+ end
588
+
589
+ # Update properties of this object
590
+ def update!(**args)
591
+ @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version)
592
+ @end_cursor = args[:end_cursor] if args.key?(:end_cursor)
593
+ @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor)
594
+ @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type)
595
+ @more_results = args[:more_results] if args.key?(:more_results)
596
+ @entity_results = args[:entity_results] if args.key?(:entity_results)
597
+ @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
598
+ end
599
+ end
600
+
601
+ # The request for Datastore.AllocateIds.
602
+ class AllocateIdsRequest
603
+ include Google::Apis::Core::Hashable
604
+
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
624
+
625
+ # The name of the kind.
626
+ # Corresponds to the JSON property `name`
627
+ # @return [String]
628
+ attr_accessor :name
629
+
630
+ def initialize(**args)
631
+ update!(**args)
632
+ end
633
+
634
+ # Update properties of this object
635
+ def update!(**args)
636
+ @name = args[:name] if args.key?(:name)
637
+ end
638
+ end
639
+
640
+ # A filter on a specific property.
641
+ class PropertyFilter
642
+ include Google::Apis::Core::Hashable
643
+
644
+ # A message that can hold any of the supported value types and associated
645
+ # metadata.
646
+ # Corresponds to the JSON property `value`
647
+ # @return [Google::Apis::DatastoreV1::Value]
648
+ attr_accessor :value
649
+
650
+ # The operator to filter by.
651
+ # Corresponds to the JSON property `op`
652
+ # @return [String]
653
+ attr_accessor :op
654
+
655
+ # A reference to a property relative to the kind expressions.
656
+ # Corresponds to the JSON property `property`
657
+ # @return [Google::Apis::DatastoreV1::PropertyReference]
658
+ attr_accessor :property
659
+
660
+ def initialize(**args)
661
+ update!(**args)
662
+ end
663
+
664
+ # Update properties of this object
665
+ def update!(**args)
666
+ @value = args[:value] if args.key?(:value)
667
+ @op = args[:op] if args.key?(:op)
668
+ @property = args[:property] if args.key?(:property)
669
+ end
670
+ end
671
+
672
+ # A (kind, ID/name) pair used to construct a key path.
673
+ # If either name or ID is set, the element is complete.
674
+ # If neither is set, the element is incomplete.
675
+ class PathElement
676
+ include Google::Apis::Core::Hashable
677
+
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`
698
+ # @return [String]
699
+ attr_accessor :name
700
+
701
+ def initialize(**args)
702
+ update!(**args)
703
+ end
704
+
705
+ # Update properties of this object
706
+ 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)
710
+ end
711
+ end
712
+
713
+ # The response for Datastore.Rollback.
714
+ # (an empty message).
715
+ class RollbackResponse
716
+ include Google::Apis::Core::Hashable
717
+
718
+ def initialize(**args)
719
+ update!(**args)
720
+ end
721
+
722
+ # Update properties of this object
723
+ def update!(**args)
724
+ end
725
+ end
726
+
727
+ # A reference to a property relative to the kind expressions.
728
+ class PropertyReference
729
+ include Google::Apis::Core::Hashable
730
+
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
736
+
737
+ def initialize(**args)
738
+ update!(**args)
739
+ end
740
+
741
+ # Update properties of this object
742
+ def update!(**args)
743
+ @name = args[:name] if args.key?(:name)
744
+ end
745
+ end
746
+
747
+ # A representation of a property in a projection.
748
+ class Projection
749
+ include Google::Apis::Core::Hashable
750
+
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
755
+
756
+ def initialize(**args)
757
+ update!(**args)
758
+ end
759
+
760
+ # Update properties of this object
761
+ def update!(**args)
762
+ @property = args[:property] if args.key?(:property)
763
+ end
764
+ end
765
+
766
+ # The result of applying a mutation.
767
+ class MutationResult
768
+ include Google::Apis::Core::Hashable
769
+
770
+ # Whether a conflict was detected for this mutation. Always false when a
771
+ # conflict detection strategy field is not set in the mutation.
772
+ # Corresponds to the JSON property `conflictDetected`
773
+ # @return [Boolean]
774
+ attr_accessor :conflict_detected
775
+ alias_method :conflict_detected?, :conflict_detected
776
+
777
+ # A unique identifier for an entity.
778
+ # If a key's partition ID or any of its path kinds or names are
779
+ # reserved/read-only, the key is reserved/read-only.
780
+ # A reserved/read-only key is forbidden in certain documented contexts.
781
+ # Corresponds to the JSON property `key`
782
+ # @return [Google::Apis::DatastoreV1::Key]
783
+ attr_accessor :key
784
+
785
+ # The version of the entity on the server after processing the mutation. If
786
+ # the mutation doesn't change anything on the server, then the version will
787
+ # be the version of the current entity or, if no entity is present, a version
788
+ # that is strictly greater than the version of any previous entity and less
789
+ # than the version of any possible future entity.
790
+ # Corresponds to the JSON property `version`
791
+ # @return [String]
792
+ attr_accessor :version
793
+
794
+ def initialize(**args)
795
+ update!(**args)
796
+ end
797
+
798
+ # Update properties of this object
799
+ 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)
803
+ end
804
+ end
805
+
806
+ # The response for Datastore.AllocateIds.
807
+ class AllocateIdsResponse
808
+ include Google::Apis::Core::Hashable
809
+
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
815
+
816
+ def initialize(**args)
817
+ update!(**args)
818
+ end
819
+
820
+ # Update properties of this object
821
+ def update!(**args)
822
+ @keys = args[:keys] if args.key?(:keys)
823
+ end
824
+ end
825
+
826
+ # The response for Datastore.Lookup.
827
+ class LookupResponse
828
+ include Google::Apis::Core::Hashable
829
+
830
+ # Entities found as `ResultType.FULL` entities. The order of results in this
831
+ # field is undefined and has no relation to the order of the keys in the
832
+ # input.
833
+ # Corresponds to the JSON property `found`
834
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
835
+ attr_accessor :found
836
+
837
+ # Entities not found as `ResultType.KEY_ONLY` entities. The order of results
838
+ # in this field is undefined and has no relation to the order of the keys
839
+ # in the input.
840
+ # Corresponds to the JSON property `missing`
841
+ # @return [Array<Google::Apis::DatastoreV1::EntityResult>]
842
+ attr_accessor :missing
843
+
844
+ # A list of keys that were not looked up due to resource constraints. The
845
+ # order of results in this field is undefined and has no relation to the
846
+ # order of the keys in the input.
847
+ # Corresponds to the JSON property `deferred`
848
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
849
+ attr_accessor :deferred
850
+
851
+ def initialize(**args)
852
+ update!(**args)
853
+ end
854
+
855
+ # Update properties of this object
856
+ 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)
860
+ end
861
+ end
862
+
863
+ # The request for Datastore.BeginTransaction.
864
+ class BeginTransactionRequest
865
+ include Google::Apis::Core::Hashable
866
+
867
+ def initialize(**args)
868
+ update!(**args)
869
+ end
870
+
871
+ # Update properties of this object
872
+ def update!(**args)
873
+ end
874
+ end
875
+
876
+ # A unique identifier for an entity.
877
+ # If a key's partition ID or any of its path kinds or names are
878
+ # reserved/read-only, the key is reserved/read-only.
879
+ # A reserved/read-only key is forbidden in certain documented contexts.
880
+ class Key
881
+ include Google::Apis::Core::Hashable
882
+
883
+ # A partition ID identifies a grouping of entities. The grouping is always
884
+ # by project and namespace, however the namespace ID may be empty.
885
+ # A partition ID contains several dimensions:
886
+ # project ID and namespace ID.
887
+ # Partition dimensions:
888
+ # - May be `""`.
889
+ # - Must be valid UTF-8 bytes.
890
+ # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100``
891
+ # If the value of any dimension matches regex `__.*__`, the partition is
892
+ # reserved/read-only.
893
+ # A reserved/read-only partition ID is forbidden in certain documented
894
+ # contexts.
895
+ # Foreign partition IDs (in which the project ID does
896
+ # not match the context project ID ) are discouraged.
897
+ # Reads and writes of foreign partition IDs may fail if the project is not in an
898
+ # active state.
899
+ # Corresponds to the JSON property `partitionId`
900
+ # @return [Google::Apis::DatastoreV1::PartitionId]
901
+ attr_accessor :partition_id
902
+
903
+ # The entity path.
904
+ # An entity path consists of one or more elements composed of a kind and a
905
+ # string or numerical identifier, which identify entities. The first
906
+ # element identifies a _root entity_, the second element identifies
907
+ # a _child_ of the root entity, the third element identifies a child of the
908
+ # second entity, and so forth. The entities identified by all prefixes of
909
+ # the path are called the element's _ancestors_.
910
+ # An entity path is always fully complete: *all* of the entity's ancestors
911
+ # are required to be in the path along with the entity identifier itself.
912
+ # The only exception is that in some documented cases, the identifier in the
913
+ # last path element (for the entity) itself may be omitted. For example,
914
+ # the last path element of the key of `Mutation.insert` may have no
915
+ # identifier.
916
+ # A path can never be empty, and a path can have at most 100 elements.
917
+ # Corresponds to the JSON property `path`
918
+ # @return [Array<Google::Apis::DatastoreV1::PathElement>]
919
+ attr_accessor :path
920
+
921
+ def initialize(**args)
922
+ update!(**args)
923
+ end
924
+
925
+ # Update properties of this object
926
+ def update!(**args)
927
+ @partition_id = args[:partition_id] if args.key?(:partition_id)
928
+ @path = args[:path] if args.key?(:path)
929
+ end
930
+ end
931
+
932
+ # The response for Datastore.RunQuery.
933
+ class RunQueryResponse
934
+ include Google::Apis::Core::Hashable
935
+
936
+ # A batch of results produced by a query.
937
+ # Corresponds to the JSON property `batch`
938
+ # @return [Google::Apis::DatastoreV1::QueryResultBatch]
939
+ attr_accessor :batch
940
+
941
+ # A query for entities.
942
+ # Corresponds to the JSON property `query`
943
+ # @return [Google::Apis::DatastoreV1::Query]
944
+ attr_accessor :query
945
+
946
+ def initialize(**args)
947
+ update!(**args)
948
+ end
949
+
950
+ # Update properties of this object
951
+ def update!(**args)
952
+ @batch = args[:batch] if args.key?(:batch)
953
+ @query = args[:query] if args.key?(:query)
954
+ end
955
+ end
956
+
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
962
+ include Google::Apis::Core::Hashable
963
+
964
+ # The entity's properties.
965
+ # The map's keys are property names.
966
+ # A property name matching regex `__.*__` is reserved.
967
+ # A reserved property name is forbidden in certain documented contexts.
968
+ # The name must not contain more than 500 characters.
969
+ # The name cannot be `""`.
970
+ # Corresponds to the JSON property `properties`
971
+ # @return [Hash<String,Google::Apis::DatastoreV1::Value>]
972
+ attr_accessor :properties
973
+
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
981
+
982
+ def initialize(**args)
983
+ update!(**args)
984
+ end
985
+
986
+ # Update properties of this object
987
+ def update!(**args)
988
+ @properties = args[:properties] if args.key?(:properties)
989
+ @key = args[:key] if args.key?(:key)
990
+ end
991
+ end
992
+
993
+ # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
994
+ class GqlQuery
995
+ include Google::Apis::Core::Hashable
996
+
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
1027
+
1028
+ def initialize(**args)
1029
+ update!(**args)
1030
+ end
1031
+
1032
+ # 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)
1038
+ end
1039
+ end
1040
+
1041
+ # A mutation to apply to an entity.
1042
+ class Mutation
1043
+ include Google::Apis::Core::Hashable
1044
+
1045
+ # A Datastore data object.
1046
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1047
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1048
+ # message.
1049
+ # Corresponds to the JSON property `insert`
1050
+ # @return [Google::Apis::DatastoreV1::Entity]
1051
+ attr_accessor :insert
1052
+
1053
+ # A Datastore data object.
1054
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1055
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1056
+ # message.
1057
+ # Corresponds to the JSON property `update`
1058
+ # @return [Google::Apis::DatastoreV1::Entity]
1059
+ attr_accessor :update
1060
+
1061
+ # The version of the entity that this mutation is being applied to. If this
1062
+ # does not match the current version on the server, the mutation conflicts.
1063
+ # Corresponds to the JSON property `baseVersion`
1064
+ # @return [String]
1065
+ attr_accessor :base_version
1066
+
1067
+ # A Datastore data object.
1068
+ # An entity is limited to 1 megabyte when stored. That _roughly_
1069
+ # corresponds to a limit of 1 megabyte for the serialized form of this
1070
+ # message.
1071
+ # Corresponds to the JSON property `upsert`
1072
+ # @return [Google::Apis::DatastoreV1::Entity]
1073
+ attr_accessor :upsert
1074
+
1075
+ # A unique identifier for an entity.
1076
+ # If a key's partition ID or any of its path kinds or names are
1077
+ # reserved/read-only, the key is reserved/read-only.
1078
+ # A reserved/read-only key is forbidden in certain documented contexts.
1079
+ # Corresponds to the JSON property `delete`
1080
+ # @return [Google::Apis::DatastoreV1::Key]
1081
+ attr_accessor :delete
1082
+
1083
+ def initialize(**args)
1084
+ update!(**args)
1085
+ end
1086
+
1087
+ # Update properties of this object
1088
+ 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
+ @upsert = args[:upsert] if args.key?(:upsert)
1093
+ @delete = args[:delete] if args.key?(:delete)
1094
+ end
1095
+ end
1096
+
1097
+ # The response for Datastore.Commit.
1098
+ class CommitResponse
1099
+ include Google::Apis::Core::Hashable
1100
+
1101
+ # The result of performing the mutations.
1102
+ # The i-th mutation result corresponds to the i-th mutation in the request.
1103
+ # Corresponds to the JSON property `mutationResults`
1104
+ # @return [Array<Google::Apis::DatastoreV1::MutationResult>]
1105
+ attr_accessor :mutation_results
1106
+
1107
+ # The number of index entries updated during the commit, or zero if none were
1108
+ # updated.
1109
+ # Corresponds to the JSON property `indexUpdates`
1110
+ # @return [Fixnum]
1111
+ attr_accessor :index_updates
1112
+
1113
+ def initialize(**args)
1114
+ update!(**args)
1115
+ end
1116
+
1117
+ # Update properties of this object
1118
+ def update!(**args)
1119
+ @mutation_results = args[:mutation_results] if args.key?(:mutation_results)
1120
+ @index_updates = args[:index_updates] if args.key?(:index_updates)
1121
+ end
1122
+ end
1123
+
1124
+ # The request for Datastore.RunQuery.
1125
+ class RunQueryRequest
1126
+ include Google::Apis::Core::Hashable
1127
+
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
+ def initialize(**args)
1164
+ update!(**args)
1165
+ end
1166
+
1167
+ # Update properties of this object
1168
+ 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
+ end
1174
+ end
1175
+
1176
+ # The request for Datastore.Lookup.
1177
+ class LookupRequest
1178
+ include Google::Apis::Core::Hashable
1179
+
1180
+ # The options shared by read requests.
1181
+ # Corresponds to the JSON property `readOptions`
1182
+ # @return [Google::Apis::DatastoreV1::ReadOptions]
1183
+ attr_accessor :read_options
1184
+
1185
+ # Keys of entities to look up.
1186
+ # Corresponds to the JSON property `keys`
1187
+ # @return [Array<Google::Apis::DatastoreV1::Key>]
1188
+ attr_accessor :keys
1189
+
1190
+ def initialize(**args)
1191
+ update!(**args)
1192
+ end
1193
+
1194
+ # Update properties of this object
1195
+ def update!(**args)
1196
+ @read_options = args[:read_options] if args.key?(:read_options)
1197
+ @keys = args[:keys] if args.key?(:keys)
1198
+ end
1199
+ end
1200
+
1201
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1202
+ # of doubles representing degrees latitude and degrees longitude. Unless
1203
+ # specified otherwise, this must conform to the
1204
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1205
+ # standard</a>. Values must be within normalized ranges.
1206
+ # Example of normalization code in Python:
1207
+ # def NormalizeLongitude(longitude):
1208
+ # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1209
+ # q, r = divmod(longitude, 360.0)
1210
+ # if r > 180.0 or (r == 180.0 and q <= -1.0):
1211
+ # return r - 360.0
1212
+ # return r
1213
+ # def NormalizeLatLng(latitude, longitude):
1214
+ # """Wraps decimal degrees latitude and longitude to
1215
+ # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1216
+ # r = latitude % 360.0
1217
+ # if r <= 90.0:
1218
+ # return r, NormalizeLongitude(longitude)
1219
+ # elif r >= 270.0:
1220
+ # return r - 360, NormalizeLongitude(longitude)
1221
+ # else:
1222
+ # return 180 - r, NormalizeLongitude(longitude + 180.0)
1223
+ # assert 180.0 == NormalizeLongitude(180.0)
1224
+ # assert -180.0 == NormalizeLongitude(-180.0)
1225
+ # assert -179.0 == NormalizeLongitude(181.0)
1226
+ # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1227
+ # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1228
+ # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1229
+ # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1230
+ # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1231
+ # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1232
+ # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1233
+ # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1234
+ # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1235
+ # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1236
+ # The code in logs/storage/validator/logs_validator_traits.cc treats this type
1237
+ # as if it were annotated as ST_LOCATION.
1238
+ class LatLng
1239
+ include Google::Apis::Core::Hashable
1240
+
1241
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1242
+ # Corresponds to the JSON property `latitude`
1243
+ # @return [Float]
1244
+ attr_accessor :latitude
1245
+
1246
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1247
+ # Corresponds to the JSON property `longitude`
1248
+ # @return [Float]
1249
+ attr_accessor :longitude
1250
+
1251
+ def initialize(**args)
1252
+ update!(**args)
1253
+ end
1254
+
1255
+ # Update properties of this object
1256
+ def update!(**args)
1257
+ @latitude = args[:latitude] if args.key?(:latitude)
1258
+ @longitude = args[:longitude] if args.key?(:longitude)
1259
+ end
1260
+ end
1261
+
1262
+ # A filter that merges multiple other filters using the given operator.
1263
+ class CompositeFilter
1264
+ include Google::Apis::Core::Hashable
1265
+
1266
+ # The operator for combining multiple filters.
1267
+ # Corresponds to the JSON property `op`
1268
+ # @return [String]
1269
+ attr_accessor :op
1270
+
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
1276
+
1277
+ def initialize(**args)
1278
+ update!(**args)
1279
+ end
1280
+
1281
+ # Update properties of this object
1282
+ def update!(**args)
1283
+ @op = args[:op] if args.key?(:op)
1284
+ @filters = args[:filters] if args.key?(:filters)
1285
+ end
1286
+ end
1287
+ end
1288
+ end
1289
+ end