google-api-client 0.9.pre3 → 0.9.pre4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +14 -2
  4. data/Gemfile +4 -0
  5. data/MIGRATING.md +1 -1
  6. data/README.md +17 -3
  7. data/api_names.yaml +127 -14
  8. data/api_names_out.yaml +5442 -710
  9. data/bin/generate-api +16 -14
  10. data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +213 -2
  12. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +71 -0
  13. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +21 -42
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +15 -29
  16. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  17. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  18. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  19. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  20. data/generated/google/apis/admin_directory_v1.rb +25 -1
  21. data/generated/google/apis/admin_directory_v1/classes.rb +718 -0
  22. data/generated/google/apis/admin_directory_v1/representations.rb +244 -0
  23. data/generated/google/apis/admin_directory_v1/service.rb +1522 -509
  24. data/generated/google/apis/admin_reports_v1.rb +1 -1
  25. data/generated/google/apis/admin_reports_v1/service.rb +5 -10
  26. data/generated/google/apis/adsense_v1_4.rb +1 -1
  27. data/generated/google/apis/adsense_v1_4/classes.rb +6 -0
  28. data/generated/google/apis/adsense_v1_4/representations.rb +1 -0
  29. data/generated/google/apis/adsense_v1_4/service.rb +40 -78
  30. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  31. data/generated/google/apis/adsensehost_v4_1/service.rb +26 -52
  32. data/generated/google/apis/analytics_v3.rb +1 -1
  33. data/generated/google/apis/analytics_v3/classes.rb +11 -13
  34. data/generated/google/apis/analytics_v3/service.rb +84 -158
  35. data/generated/google/apis/androidenterprise_v1.rb +2 -2
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +276 -8
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +106 -0
  38. data/generated/google/apis/androidenterprise_v1/service.rb +715 -97
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +2 -2
  41. data/generated/google/apis/androidpublisher_v2/service.rb +55 -107
  42. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  43. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  44. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  45. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  46. data/generated/google/apis/appsactivity_v1.rb +1 -1
  47. data/generated/google/apis/appsactivity_v1/service.rb +1 -2
  48. data/generated/google/apis/appstate_v1.rb +1 -1
  49. data/generated/google/apis/appstate_v1/service.rb +6 -11
  50. data/generated/google/apis/autoscaler_v1beta2/service.rb +10 -20
  51. data/generated/google/apis/bigquery_v2.rb +4 -1
  52. data/generated/google/apis/bigquery_v2/classes.rb +231 -16
  53. data/generated/google/apis/bigquery_v2/representations.rb +62 -0
  54. data/generated/google/apis/bigquery_v2/service.rb +24 -45
  55. data/generated/google/apis/blogger_v3/service.rb +33 -66
  56. data/generated/google/apis/books_v1.rb +1 -1
  57. data/generated/google/apis/books_v1/classes.rb +441 -0
  58. data/generated/google/apis/books_v1/representations.rb +177 -0
  59. data/generated/google/apis/books_v1/service.rb +210 -90
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +34 -18
  62. data/generated/google/apis/calendar_v3/service.rb +118 -103
  63. data/generated/google/apis/civicinfo_v2.rb +1 -1
  64. data/generated/google/apis/civicinfo_v2/classes.rb +12 -3
  65. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +5 -10
  67. data/generated/google/apis/classroom_v1.rb +49 -0
  68. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  69. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  70. data/generated/google/apis/classroom_v1/service.rb +970 -0
  71. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  74. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  75. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  76. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  77. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  78. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  79. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  80. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +6 -12
  81. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +5 -2
  82. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +173 -249
  83. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +36 -68
  84. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +293 -80
  85. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  86. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  87. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  88. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  89. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  90. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  91. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  92. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  93. data/generated/google/apis/compute_beta.rb +49 -0
  94. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  95. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  96. data/generated/google/apis/compute_beta/service.rb +10154 -0
  97. data/generated/google/apis/compute_v1.rb +1 -1
  98. data/generated/google/apis/compute_v1/classes.rb +1305 -520
  99. data/generated/google/apis/compute_v1/representations.rb +122 -15
  100. data/generated/google/apis/compute_v1/service.rb +2202 -1085
  101. data/generated/google/apis/container_v1.rb +1 -1
  102. data/generated/google/apis/container_v1/classes.rb +56 -31
  103. data/generated/google/apis/container_v1/representations.rb +12 -0
  104. data/generated/google/apis/container_v1/service.rb +62 -41
  105. data/generated/google/apis/content_v2.rb +2 -2
  106. data/generated/google/apis/content_v2/classes.rb +2252 -56
  107. data/generated/google/apis/content_v2/representations.rb +917 -87
  108. data/generated/google/apis/content_v2/service.rb +680 -85
  109. data/generated/google/apis/coordinate_v1.rb +1 -1
  110. data/generated/google/apis/coordinate_v1/service.rb +16 -25
  111. data/generated/google/apis/customsearch_v1/service.rb +1 -2
  112. data/generated/google/apis/datastore_v1beta2.rb +1 -1
  113. data/generated/google/apis/datastore_v1beta2/service.rb +12 -18
  114. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  115. data/generated/google/apis/deploymentmanager_v2/classes.rb +1089 -0
  116. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  117. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2.rb +5 -2
  119. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +22 -3
  120. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +3 -0
  121. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +14 -27
  122. data/generated/google/apis/dfareporting_v2_1.rb +1 -1
  123. data/generated/google/apis/dfareporting_v2_1/classes.rb +29 -14
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +196 -389
  125. data/generated/google/apis/discovery_v1/classes.rb +7 -0
  126. data/generated/google/apis/discovery_v1/representations.rb +1 -0
  127. data/generated/google/apis/discovery_v1/service.rb +2 -4
  128. data/generated/google/apis/dns_v1.rb +4 -1
  129. data/generated/google/apis/dns_v1/service.rb +9 -18
  130. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  131. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +9 -2
  132. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +1 -0
  133. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +8 -16
  134. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  135. data/generated/google/apis/doubleclicksearch_v2/classes.rb +15 -6
  136. data/generated/google/apis/doubleclicksearch_v2/representations.rb +1 -0
  137. data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -23
  138. data/generated/google/apis/drive_v2.rb +1 -1
  139. data/generated/google/apis/drive_v2/classes.rb +73 -30
  140. data/generated/google/apis/drive_v2/representations.rb +14 -0
  141. data/generated/google/apis/drive_v2/service.rb +139 -135
  142. data/generated/google/apis/drive_v3.rb +55 -0
  143. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  144. data/generated/google/apis/drive_v3/representations.rb +497 -0
  145. data/generated/google/apis/drive_v3/service.rb +1541 -0
  146. data/generated/google/apis/fitness_v1.rb +1 -1
  147. data/generated/google/apis/fitness_v1/service.rb +14 -27
  148. data/generated/google/apis/fusiontables_v2/service.rb +40 -73
  149. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  150. data/generated/google/apis/games_configuration_v1configuration/service.rb +14 -27
  151. data/generated/google/apis/games_management_v1management.rb +37 -0
  152. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  153. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  154. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  155. data/generated/google/apis/games_v1.rb +1 -1
  156. data/generated/google/apis/games_v1/classes.rb +39 -0
  157. data/generated/google/apis/games_v1/representations.rb +14 -0
  158. data/generated/google/apis/games_v1/service.rb +93 -109
  159. data/generated/google/apis/gan_v1beta1/service.rb +10 -20
  160. data/generated/google/apis/genomics_v1.rb +5 -3
  161. data/generated/google/apis/genomics_v1/classes.rb +519 -200
  162. data/generated/google/apis/genomics_v1/representations.rb +126 -13
  163. data/generated/google/apis/genomics_v1/service.rb +392 -236
  164. data/generated/google/apis/gmail_v1.rb +4 -1
  165. data/generated/google/apis/gmail_v1/service.rb +39 -71
  166. data/generated/google/apis/groupsmigration_v1/service.rb +2 -3
  167. data/generated/google/apis/groupssettings_v1/service.rb +3 -6
  168. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  169. data/generated/google/apis/identitytoolkit_v3/classes.rb +125 -0
  170. data/generated/google/apis/identitytoolkit_v3/representations.rb +37 -0
  171. data/generated/google/apis/identitytoolkit_v3/service.rb +44 -24
  172. data/generated/google/apis/kgsearch_v1.rb +32 -0
  173. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  174. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  175. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  176. data/generated/google/apis/licensing_v1.rb +1 -1
  177. data/generated/google/apis/licensing_v1/service.rb +7 -14
  178. data/generated/google/apis/logging_v1beta3.rb +16 -4
  179. data/generated/google/apis/logging_v1beta3/classes.rb +620 -46
  180. data/generated/google/apis/logging_v1beta3/representations.rb +144 -0
  181. data/generated/google/apis/logging_v1beta3/service.rb +435 -104
  182. data/generated/google/apis/manager_v1beta2.rb +3 -0
  183. data/generated/google/apis/manager_v1beta2/service.rb +8 -16
  184. data/generated/google/apis/mapsengine_v1.rb +1 -1
  185. data/generated/google/apis/mapsengine_v1/service.rb +85 -162
  186. data/generated/google/apis/mirror_v1.rb +1 -1
  187. data/generated/google/apis/mirror_v1/service.rb +28 -52
  188. data/generated/google/apis/oauth2_v2.rb +1 -1
  189. data/generated/google/apis/oauth2_v2/service.rb +4 -8
  190. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -2
  191. data/generated/google/apis/partners_v2.rb +32 -0
  192. data/generated/google/apis/partners_v2/classes.rb +942 -0
  193. data/generated/google/apis/partners_v2/representations.rb +402 -0
  194. data/generated/google/apis/partners_v2/service.rb +400 -0
  195. data/generated/google/apis/plus_domains_v1.rb +1 -1
  196. data/generated/google/apis/plus_domains_v1/classes.rb +207 -0
  197. data/generated/google/apis/plus_domains_v1/representations.rb +114 -0
  198. data/generated/google/apis/plus_domains_v1/service.rb +21 -41
  199. data/generated/google/apis/plus_v1.rb +1 -1
  200. data/generated/google/apis/plus_v1/classes.rb +207 -0
  201. data/generated/google/apis/plus_v1/representations.rb +114 -0
  202. data/generated/google/apis/plus_v1/service.rb +11 -56
  203. data/generated/google/apis/prediction_v1_6.rb +1 -1
  204. data/generated/google/apis/prediction_v1_6/service.rb +8 -16
  205. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  206. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  207. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  208. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  209. data/generated/google/apis/pubsub_v1.rb +37 -0
  210. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  211. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  212. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  213. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  214. data/generated/google/apis/pubsub_v1beta2/classes.rb +78 -283
  215. data/generated/google/apis/pubsub_v1beta2/representations.rb +1 -85
  216. data/generated/google/apis/pubsub_v1beta2/service.rb +79 -87
  217. data/generated/google/apis/qpx_express_v1/service.rb +1 -2
  218. data/generated/google/apis/replicapool_v1beta2.rb +3 -0
  219. data/generated/google/apis/replicapool_v1beta2/service.rb +12 -24
  220. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -1
  221. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +46 -2
  222. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +16 -0
  223. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +58 -18
  224. data/generated/google/apis/reseller_v1.rb +1 -1
  225. data/generated/google/apis/reseller_v1/classes.rb +19 -1
  226. data/generated/google/apis/reseller_v1/representations.rb +1 -0
  227. data/generated/google/apis/reseller_v1/service.rb +16 -30
  228. data/generated/google/apis/resourceviews_v1beta2.rb +3 -0
  229. data/generated/google/apis/resourceviews_v1beta2/service.rb +16 -27
  230. data/generated/google/apis/script_v1.rb +61 -0
  231. data/generated/google/apis/script_v1/classes.rb +259 -0
  232. data/generated/google/apis/script_v1/representations.rb +106 -0
  233. data/generated/google/apis/script_v1/service.rb +98 -0
  234. data/generated/google/apis/site_verification_v1.rb +1 -1
  235. data/generated/google/apis/site_verification_v1/service.rb +8 -15
  236. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  237. data/generated/google/apis/sqladmin_v1beta4/classes.rb +186 -2
  238. data/generated/google/apis/sqladmin_v1beta4/representations.rb +70 -0
  239. data/generated/google/apis/sqladmin_v1beta4/service.rb +166 -75
  240. data/generated/google/apis/storage_v1.rb +5 -2
  241. data/generated/google/apis/storage_v1/classes.rb +47 -4
  242. data/generated/google/apis/storage_v1/representations.rb +18 -0
  243. data/generated/google/apis/storage_v1/service.rb +77 -94
  244. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  245. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  246. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  247. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  248. data/generated/google/apis/tagmanager_v1.rb +1 -1
  249. data/generated/google/apis/tagmanager_v1/classes.rb +189 -31
  250. data/generated/google/apis/tagmanager_v1/representations.rb +69 -15
  251. data/generated/google/apis/tagmanager_v1/service.rb +114 -275
  252. data/generated/google/apis/taskqueue_v1beta2/service.rb +8 -16
  253. data/generated/google/apis/tasks_v1/service.rb +14 -28
  254. data/generated/google/apis/translate_v2/service.rb +3 -6
  255. data/generated/google/apis/urlshortener_v1/service.rb +3 -6
  256. data/generated/google/apis/webmasters_v3.rb +3 -3
  257. data/generated/google/apis/webmasters_v3/classes.rb +4 -4
  258. data/generated/google/apis/webmasters_v3/service.rb +16 -30
  259. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  260. data/generated/google/apis/youtube_analytics_v1/classes.rb +6 -0
  261. data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -0
  262. data/generated/google/apis/youtube_analytics_v1/service.rb +16 -21
  263. data/generated/google/apis/youtube_v3.rb +1 -1
  264. data/generated/google/apis/youtube_v3/classes.rb +111 -78
  265. data/generated/google/apis/youtube_v3/representations.rb +2 -0
  266. data/generated/google/apis/youtube_v3/service.rb +78 -246
  267. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  268. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  269. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  270. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  271. data/google-api-client.gemspec +3 -3
  272. data/lib/google/api_client/auth/installed_app.rb +2 -2
  273. data/lib/google/api_client/auth/key_utils.rb +1 -0
  274. data/lib/google/api_client/auth/storage.rb +1 -0
  275. data/lib/google/api_client/auth/storages/file_store.rb +1 -0
  276. data/lib/google/api_client/auth/storages/redis_store.rb +1 -0
  277. data/lib/google/api_client/client_secrets.rb +4 -5
  278. data/lib/google/apis/core/api_command.rb +2 -2
  279. data/lib/google/apis/core/base_service.rb +1 -0
  280. data/lib/google/apis/core/batch.rb +25 -8
  281. data/lib/google/apis/core/download.rb +1 -1
  282. data/lib/google/apis/core/http_command.rb +24 -12
  283. data/lib/google/apis/core/multipart.rb +20 -6
  284. data/lib/google/apis/core/upload.rb +11 -4
  285. data/lib/google/apis/generator/annotator.rb +29 -10
  286. data/lib/google/apis/generator/helpers.rb +1 -1
  287. data/lib/google/apis/generator/templates/_method.tmpl +5 -6
  288. data/lib/google/apis/options.rb +7 -3
  289. data/lib/google/apis/version.rb +1 -1
  290. data/samples/calendar/calendar.rb +1 -1
  291. data/samples/drive/drive.rb +9 -2
  292. data/samples/pubsub/pubsub.rb +5 -6
  293. data/samples/translate/translate.rb +1 -5
  294. data/script/generate +20 -5
  295. data/spec/fixtures/files/child/.gitignore +0 -0
  296. data/spec/fixtures/files/invalid.json +1 -0
  297. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  298. data/spec/google/apis/core/batch_spec.rb +22 -8
  299. data/spec/google/apis/core/download_spec.rb +13 -0
  300. data/spec/google/apis/core/http_command_spec.rb +26 -9
  301. data/spec/google/apis/core/upload_spec.rb +65 -17
  302. data/spec/google/apis/options_spec.rb +8 -0
  303. data/spec/integration_tests/adsense_spec.rb +28 -0
  304. data/spec/integration_tests/pubsub_spec.rb +3 -3
  305. data/spec/spec_helper.rb +5 -1
  306. data/third_party/hurley_patches.rb +103 -0
  307. metadata +87 -7
@@ -0,0 +1,274 @@
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 ProximitybeaconV1beta1
24
+
25
+ class Beacon
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+ end
28
+
29
+ class AdvertisedId
30
+ class Representation < Google::Apis::Core::JsonRepresentation; end
31
+ end
32
+
33
+ class LatLng
34
+ class Representation < Google::Apis::Core::JsonRepresentation; end
35
+ end
36
+
37
+ class IndoorLevel
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+ end
40
+
41
+ class Empty
42
+ class Representation < Google::Apis::Core::JsonRepresentation; end
43
+ end
44
+
45
+ class ListBeaconsResponse
46
+ class Representation < Google::Apis::Core::JsonRepresentation; end
47
+ end
48
+
49
+ class BeaconAttachment
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+ end
52
+
53
+ class ListBeaconAttachmentsResponse
54
+ class Representation < Google::Apis::Core::JsonRepresentation; end
55
+ end
56
+
57
+ class DeleteAttachmentsResponse
58
+ class Representation < Google::Apis::Core::JsonRepresentation; end
59
+ end
60
+
61
+ class ListNamespacesResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+ end
64
+
65
+ class Namespace
66
+ class Representation < Google::Apis::Core::JsonRepresentation; end
67
+ end
68
+
69
+ class ListDiagnosticsResponse
70
+ class Representation < Google::Apis::Core::JsonRepresentation; end
71
+ end
72
+
73
+ class Diagnostics
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class Date
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class GetInfoForObservedBeaconsRequest
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class Observation
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+ end
88
+
89
+ class GetInfoForObservedBeaconsResponse
90
+ class Representation < Google::Apis::Core::JsonRepresentation; end
91
+ end
92
+
93
+ class BeaconInfo
94
+ class Representation < Google::Apis::Core::JsonRepresentation; end
95
+ end
96
+
97
+ class AttachmentInfo
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+ end
100
+
101
+ class Beacon
102
+ # @private
103
+ class Representation < Google::Apis::Core::JsonRepresentation
104
+ property :beacon_name, as: 'beaconName'
105
+ property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation
106
+
107
+ property :status, as: 'status'
108
+ property :place_id, as: 'placeId'
109
+ property :lat_lng, as: 'latLng', class: Google::Apis::ProximitybeaconV1beta1::LatLng, decorator: Google::Apis::ProximitybeaconV1beta1::LatLng::Representation
110
+
111
+ property :indoor_level, as: 'indoorLevel', class: Google::Apis::ProximitybeaconV1beta1::IndoorLevel, decorator: Google::Apis::ProximitybeaconV1beta1::IndoorLevel::Representation
112
+
113
+ property :expected_stability, as: 'expectedStability'
114
+ property :description, as: 'description'
115
+ hash :properties, as: 'properties'
116
+ end
117
+ end
118
+
119
+ class AdvertisedId
120
+ # @private
121
+ class Representation < Google::Apis::Core::JsonRepresentation
122
+ property :type, as: 'type'
123
+ property :id, :base64 => true, as: 'id'
124
+ end
125
+ end
126
+
127
+ class LatLng
128
+ # @private
129
+ class Representation < Google::Apis::Core::JsonRepresentation
130
+ property :latitude, as: 'latitude'
131
+ property :longitude, as: 'longitude'
132
+ end
133
+ end
134
+
135
+ class IndoorLevel
136
+ # @private
137
+ class Representation < Google::Apis::Core::JsonRepresentation
138
+ property :name, as: 'name'
139
+ end
140
+ end
141
+
142
+ class Empty
143
+ # @private
144
+ class Representation < Google::Apis::Core::JsonRepresentation
145
+ end
146
+ end
147
+
148
+ class ListBeaconsResponse
149
+ # @private
150
+ class Representation < Google::Apis::Core::JsonRepresentation
151
+ collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::Beacon, decorator: Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
152
+
153
+ property :next_page_token, as: 'nextPageToken'
154
+ property :total_count, as: 'totalCount'
155
+ end
156
+ end
157
+
158
+ class BeaconAttachment
159
+ # @private
160
+ class Representation < Google::Apis::Core::JsonRepresentation
161
+ property :attachment_name, as: 'attachmentName'
162
+ property :namespaced_type, as: 'namespacedType'
163
+ property :data, :base64 => true, as: 'data'
164
+ end
165
+ end
166
+
167
+ class ListBeaconAttachmentsResponse
168
+ # @private
169
+ class Representation < Google::Apis::Core::JsonRepresentation
170
+ collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::BeaconAttachment, decorator: Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation
171
+
172
+ end
173
+ end
174
+
175
+ class DeleteAttachmentsResponse
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ property :num_deleted, as: 'numDeleted'
179
+ end
180
+ end
181
+
182
+ class ListNamespacesResponse
183
+ # @private
184
+ class Representation < Google::Apis::Core::JsonRepresentation
185
+ collection :namespaces, as: 'namespaces', class: Google::Apis::ProximitybeaconV1beta1::Namespace, decorator: Google::Apis::ProximitybeaconV1beta1::Namespace::Representation
186
+
187
+ end
188
+ end
189
+
190
+ class Namespace
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ property :namespace_name, as: 'namespaceName'
194
+ property :serving_visibility, as: 'servingVisibility'
195
+ end
196
+ end
197
+
198
+ class ListDiagnosticsResponse
199
+ # @private
200
+ class Representation < Google::Apis::Core::JsonRepresentation
201
+ collection :diagnostics, as: 'diagnostics', class: Google::Apis::ProximitybeaconV1beta1::Diagnostics, decorator: Google::Apis::ProximitybeaconV1beta1::Diagnostics::Representation
202
+
203
+ property :next_page_token, as: 'nextPageToken'
204
+ end
205
+ end
206
+
207
+ class Diagnostics
208
+ # @private
209
+ class Representation < Google::Apis::Core::JsonRepresentation
210
+ property :beacon_name, as: 'beaconName'
211
+ property :estimated_low_battery_date, as: 'estimatedLowBatteryDate', class: Google::Apis::ProximitybeaconV1beta1::Date, decorator: Google::Apis::ProximitybeaconV1beta1::Date::Representation
212
+
213
+ collection :alerts, as: 'alerts'
214
+ end
215
+ end
216
+
217
+ class Date
218
+ # @private
219
+ class Representation < Google::Apis::Core::JsonRepresentation
220
+ property :year, as: 'year'
221
+ property :month, as: 'month'
222
+ property :day, as: 'day'
223
+ end
224
+ end
225
+
226
+ class GetInfoForObservedBeaconsRequest
227
+ # @private
228
+ class Representation < Google::Apis::Core::JsonRepresentation
229
+ collection :observations, as: 'observations', class: Google::Apis::ProximitybeaconV1beta1::Observation, decorator: Google::Apis::ProximitybeaconV1beta1::Observation::Representation
230
+
231
+ collection :namespaced_types, as: 'namespacedTypes'
232
+ end
233
+ end
234
+
235
+ class Observation
236
+ # @private
237
+ class Representation < Google::Apis::Core::JsonRepresentation
238
+ property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation
239
+
240
+ property :telemetry, :base64 => true, as: 'telemetry'
241
+ property :timestamp_ms, as: 'timestampMs'
242
+ end
243
+ end
244
+
245
+ class GetInfoForObservedBeaconsResponse
246
+ # @private
247
+ class Representation < Google::Apis::Core::JsonRepresentation
248
+ collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::BeaconInfo, decorator: Google::Apis::ProximitybeaconV1beta1::BeaconInfo::Representation
249
+
250
+ end
251
+ end
252
+
253
+ class BeaconInfo
254
+ # @private
255
+ class Representation < Google::Apis::Core::JsonRepresentation
256
+ property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation
257
+
258
+ property :beacon_name, as: 'beaconName'
259
+ property :description, as: 'description'
260
+ collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo, decorator: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo::Representation
261
+
262
+ end
263
+ end
264
+
265
+ class AttachmentInfo
266
+ # @private
267
+ class Representation < Google::Apis::Core::JsonRepresentation
268
+ property :namespaced_type, as: 'namespacedType'
269
+ property :data, :base64 => true, as: 'data'
270
+ end
271
+ end
272
+ end
273
+ end
274
+ end
@@ -0,0 +1,591 @@
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module ProximitybeaconV1beta1
23
+ # Google Proximity Beacon API
24
+ #
25
+ # This API provides services to register, manage, index, and search beacons.
26
+ #
27
+ # @example
28
+ # require 'google/apis/proximitybeacon_v1beta1'
29
+ #
30
+ # Proximitybeacon = Google::Apis::ProximitybeaconV1beta1 # Alias the module
31
+ # service = Proximitybeacon::ProximitybeaconService.new
32
+ #
33
+ # @see https://developers.google.com/beacons/proximity/
34
+ class ProximitybeaconService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://proximitybeacon.googleapis.com/', '')
47
+ end
48
+
49
+ # Registers a previously unregistered beacon given its `advertisedId`. These IDs
50
+ # are unique within the system. An ID can be registered only once.
51
+ # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object
52
+ # @param [String] fields
53
+ # Selector specifying which fields to include in a partial response.
54
+ # @param [String] quota_user
55
+ # Available to use for quota purposes for server-side applications. Can be any
56
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
57
+ # @param [Google::Apis::RequestOptions] options
58
+ # Request-specific options
59
+ #
60
+ # @yield [result, err] Result & error if block supplied
61
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object
62
+ # @yieldparam err [StandardError] error object if request failed
63
+ #
64
+ # @return [Google::Apis::ProximitybeaconV1beta1::Beacon]
65
+ #
66
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
67
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
68
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
69
+ def register_beacon(beacon_object = nil, fields: nil, quota_user: nil, options: nil, &block)
70
+ command = make_simple_command(:post, 'v1beta1/beacons:register', options)
71
+ command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
72
+ command.request_object = beacon_object
73
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
74
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon
75
+ command.query['fields'] = fields unless fields.nil?
76
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
77
+ execute_or_queue_command(command, &block)
78
+ end
79
+
80
+ # Decommissions the specified beacon in the service. This beacon will no longer
81
+ # be returned from `beaconinfo.getforobserved`. This operation is permanent --
82
+ # you will not be able to re-register a beacon with this ID again.
83
+ # @param [String] beacon_name
84
+ # Beacon that should be decommissioned. Required.
85
+ # @param [String] fields
86
+ # Selector specifying which fields to include in a partial response.
87
+ # @param [String] quota_user
88
+ # Available to use for quota purposes for server-side applications. Can be any
89
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
90
+ # @param [Google::Apis::RequestOptions] options
91
+ # Request-specific options
92
+ #
93
+ # @yield [result, err] Result & error if block supplied
94
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object
95
+ # @yieldparam err [StandardError] error object if request failed
96
+ #
97
+ # @return [Google::Apis::ProximitybeaconV1beta1::Empty]
98
+ #
99
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
100
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
101
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
102
+ def decommission_beacon(beacon_name, fields: nil, quota_user: nil, options: nil, &block)
103
+ command = make_simple_command(:post, 'v1beta1/{+beaconName}:decommission', options)
104
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation
105
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty
106
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
107
+ command.query['fields'] = fields unless fields.nil?
108
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
109
+ execute_or_queue_command(command, &block)
110
+ end
111
+
112
+ # Returns detailed information about the specified beacon.
113
+ # @param [String] beacon_name
114
+ # Beacon that is requested.
115
+ # @param [String] fields
116
+ # Selector specifying which fields to include in a partial response.
117
+ # @param [String] quota_user
118
+ # Available to use for quota purposes for server-side applications. Can be any
119
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
120
+ # @param [Google::Apis::RequestOptions] options
121
+ # Request-specific options
122
+ #
123
+ # @yield [result, err] Result & error if block supplied
124
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object
125
+ # @yieldparam err [StandardError] error object if request failed
126
+ #
127
+ # @return [Google::Apis::ProximitybeaconV1beta1::Beacon]
128
+ #
129
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
130
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
131
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
132
+ def get_beacon(beacon_name, fields: nil, quota_user: nil, options: nil, &block)
133
+ command = make_simple_command(:get, 'v1beta1/{+beaconName}', options)
134
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
135
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon
136
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
137
+ command.query['fields'] = fields unless fields.nil?
138
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
139
+ execute_or_queue_command(command, &block)
140
+ end
141
+
142
+ # Searches the beacon registry for beacons that match the given search criteria.
143
+ # Only those beacons that the client has permission to list will be returned.
144
+ # @param [String] q
145
+ # Filter query string that supports the following field filters: * `description:"
146
+ # "` For example: `description:"Room 3"` Returns beacons whose description
147
+ # matches tokens in the string "Room 3" (not necessarily that exact string). The
148
+ # string must be double-quoted. * `status:` For example: `status:active` Returns
149
+ # beacons whose status matches the given value. Values must be one of the Beacon.
150
+ # Status enum values (case insensitive). Accepts multiple filters which will be
151
+ # combined with OR logic. * `stability:` For example: `stability:mobile` Returns
152
+ # beacons whose expected stability matches the given value. Values must be one
153
+ # of the Beacon.Stability enum values (case insensitive). Accepts multiple
154
+ # filters which will be combined with OR logic. * `place_id:""` For example: `
155
+ # place_id:"ChIJVSZzVR8FdkgRXGmmm6SslKw="` Returns beacons explicitly registered
156
+ # at the given place, expressed as a Place ID obtained from [Google Places API](/
157
+ # places/place-id). Does not match places inside the given place. Does not
158
+ # consider the beacon's actual location (which may be different from its
159
+ # registered place). Accepts multiple filters that will be combined with OR
160
+ # logic. The place ID must be double-quoted. * `registration_time[|=]` For
161
+ # example: `registration_time>=1433116800` Returns beacons whose registration
162
+ # time matches the given filter. Supports the operators: , =. Timestamp must be
163
+ # expressed as an integer number of seconds since midnight January 1, 1970 UTC.
164
+ # Accepts at most two filters that will be combined with AND logic, to support "
165
+ # between" semantics. If more than two are supplied, the latter ones are ignored.
166
+ # * `lat: lng: radius:` For example: `lat:51.1232343 lng:-1.093852 radius:1000`
167
+ # Returns beacons whose registered location is within the given circle. When any
168
+ # of these fields are given, all are required. Latitude and longitude must be
169
+ # decimal degrees between -90.0 and 90.0 and between -180.0 and 180.0
170
+ # respectively. Radius must be an integer number of meters less than 1,000,000 (
171
+ # 1000 km). * `property:"="` For example: `property:"battery-type=CR2032"`
172
+ # Returns beacons which have a property of the given name and value. Supports
173
+ # multiple filters which will be combined with OR logic. The entire name=value
174
+ # string must be double-quoted as one string. * `attachment_type:""` For example:
175
+ # `attachment_type:"my-namespace/my-type"` Returns beacons having at least one
176
+ # attachment of the given namespaced type. Supports "any within this namespace"
177
+ # via the partial wildcard syntax: "my-namespace/*". Supports multiple filters
178
+ # which will be combined with OR logic. The string must be double-quoted.
179
+ # Multiple filters on the same field are combined with OR logic (except
180
+ # registration_time which is combined with AND logic). Multiple filters on
181
+ # different fields are combined with AND logic. Filters should be separated by
182
+ # spaces. As with any HTTP query string parameter, the whole filter expression
183
+ # must be URL-encoded. Example REST request: `GET /v1beta1/beacons?q=status:
184
+ # active%20lat:51.123%20lng:-1.095%20radius:1000`
185
+ # @param [String] page_token
186
+ # A pagination token obtained from a previous request to list beacons.
187
+ # @param [Fixnum] page_size
188
+ # The maximum number of records to return for this request, up to a server-
189
+ # defined upper limit.
190
+ # @param [String] fields
191
+ # Selector specifying which fields to include in a partial response.
192
+ # @param [String] quota_user
193
+ # Available to use for quota purposes for server-side applications. Can be any
194
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
195
+ # @param [Google::Apis::RequestOptions] options
196
+ # Request-specific options
197
+ #
198
+ # @yield [result, err] Result & error if block supplied
199
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse] parsed result object
200
+ # @yieldparam err [StandardError] error object if request failed
201
+ #
202
+ # @return [Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse]
203
+ #
204
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
205
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
206
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
207
+ def list_beacons(q: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
208
+ command = make_simple_command(:get, 'v1beta1/beacons', options)
209
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse::Representation
210
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse
211
+ command.query['q'] = q unless q.nil?
212
+ command.query['pageToken'] = page_token unless page_token.nil?
213
+ command.query['pageSize'] = page_size unless page_size.nil?
214
+ command.query['fields'] = fields unless fields.nil?
215
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
216
+ execute_or_queue_command(command, &block)
217
+ end
218
+
219
+ # Updates the information about the specified beacon. **Any field that you do
220
+ # not populate in the submitted beacon will be permanently erased**, so you
221
+ # should follow the "read, modify, write" pattern to avoid inadvertently
222
+ # destroying data. Changes to the beacon status via this method will be silently
223
+ # ignored. To update beacon status, use the separate methods on this API for (de)
224
+ # activation and decommissioning.
225
+ # @param [String] beacon_name
226
+ # Resource name of this beacon. A beacon name has the format "beacons/N!beaconId"
227
+ # where the beaconId is the base16 ID broadcast by the beacon and N is a code
228
+ # for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon,
229
+ # or `5` for AltBeacon. This field must be left empty when registering. After
230
+ # reading a beacon, clients can use the name for future operations.
231
+ # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object
232
+ # @param [String] fields
233
+ # Selector specifying which fields to include in a partial response.
234
+ # @param [String] quota_user
235
+ # Available to use for quota purposes for server-side applications. Can be any
236
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
237
+ # @param [Google::Apis::RequestOptions] options
238
+ # Request-specific options
239
+ #
240
+ # @yield [result, err] Result & error if block supplied
241
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object
242
+ # @yieldparam err [StandardError] error object if request failed
243
+ #
244
+ # @return [Google::Apis::ProximitybeaconV1beta1::Beacon]
245
+ #
246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
249
+ def update_beacon(beacon_name, beacon_object = nil, fields: nil, quota_user: nil, options: nil, &block)
250
+ command = make_simple_command(:put, 'v1beta1/{+beaconName}', options)
251
+ command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
252
+ command.request_object = beacon_object
253
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation
254
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon
255
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
256
+ command.query['fields'] = fields unless fields.nil?
257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
258
+ execute_or_queue_command(command, &block)
259
+ end
260
+
261
+ # (Re)activates a beacon. A beacon that is active will return information and
262
+ # attachment data when queried via `beaconinfo.getforobserved`. Calling this
263
+ # method on an already active beacon will do nothing (but will return a
264
+ # successful response code).
265
+ # @param [String] beacon_name
266
+ # The beacon to activate. Required.
267
+ # @param [String] fields
268
+ # Selector specifying which fields to include in a partial response.
269
+ # @param [String] quota_user
270
+ # Available to use for quota purposes for server-side applications. Can be any
271
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
272
+ # @param [Google::Apis::RequestOptions] options
273
+ # Request-specific options
274
+ #
275
+ # @yield [result, err] Result & error if block supplied
276
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object
277
+ # @yieldparam err [StandardError] error object if request failed
278
+ #
279
+ # @return [Google::Apis::ProximitybeaconV1beta1::Empty]
280
+ #
281
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
282
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
283
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
284
+ def activate_beacon(beacon_name, fields: nil, quota_user: nil, options: nil, &block)
285
+ command = make_simple_command(:post, 'v1beta1/{+beaconName}:activate', options)
286
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation
287
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty
288
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
289
+ command.query['fields'] = fields unless fields.nil?
290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
291
+ execute_or_queue_command(command, &block)
292
+ end
293
+
294
+ # Deactivates a beacon. Once deactivated, the API will not return information
295
+ # nor attachment data for the beacon when queried via `beaconinfo.getforobserved`
296
+ # . Calling this method on an already inactive beacon will do nothing (but will
297
+ # return a successful response code).
298
+ # @param [String] beacon_name
299
+ # The beacon name of this beacon.
300
+ # @param [String] fields
301
+ # Selector specifying which fields to include in a partial response.
302
+ # @param [String] quota_user
303
+ # Available to use for quota purposes for server-side applications. Can be any
304
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
305
+ # @param [Google::Apis::RequestOptions] options
306
+ # Request-specific options
307
+ #
308
+ # @yield [result, err] Result & error if block supplied
309
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object
310
+ # @yieldparam err [StandardError] error object if request failed
311
+ #
312
+ # @return [Google::Apis::ProximitybeaconV1beta1::Empty]
313
+ #
314
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
315
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
316
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
317
+ def deactivate_beacon(beacon_name, fields: nil, quota_user: nil, options: nil, &block)
318
+ command = make_simple_command(:post, 'v1beta1/{+beaconName}:deactivate', options)
319
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation
320
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty
321
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
322
+ command.query['fields'] = fields unless fields.nil?
323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
324
+ execute_or_queue_command(command, &block)
325
+ end
326
+
327
+ # Associates the given data with the specified beacon. Attachment data must
328
+ # contain two parts:
329
+ # - A namespaced type.
330
+ # - The actual attachment data itself. The namespaced type consists of two
331
+ # parts, the namespace and the type. The namespace must be one of the values
332
+ # returned by the `namespaces` endpoint, while the type can be a string of any
333
+ # characters except for the forward slash (`/`) up to 100 characters in length.
334
+ # Attachment data can be up to 1024 bytes long.
335
+ # @param [String] beacon_name
336
+ # The beacon on which the attachment should be created. Required.
337
+ # @param [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] beacon_attachment_object
338
+ # @param [String] fields
339
+ # Selector specifying which fields to include in a partial response.
340
+ # @param [String] quota_user
341
+ # Available to use for quota purposes for server-side applications. Can be any
342
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
343
+ # @param [Google::Apis::RequestOptions] options
344
+ # Request-specific options
345
+ #
346
+ # @yield [result, err] Result & error if block supplied
347
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] parsed result object
348
+ # @yieldparam err [StandardError] error object if request failed
349
+ #
350
+ # @return [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment]
351
+ #
352
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
353
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
354
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
355
+ def create_beacon_attachment(beacon_name, beacon_attachment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
356
+ command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments', options)
357
+ command.request_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation
358
+ command.request_object = beacon_attachment_object
359
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation
360
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment
361
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
362
+ command.query['fields'] = fields unless fields.nil?
363
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
364
+ execute_or_queue_command(command, &block)
365
+ end
366
+
367
+ # Returns the attachments for the specified beacon that match the specified
368
+ # namespaced-type pattern. To control which namespaced types are returned, you
369
+ # add the `namespacedType` query parameter to the request. You must either use `*
370
+ # /*`, to return all attachments, or the namespace must be one of the ones
371
+ # returned from the `namespaces` endpoint.
372
+ # @param [String] beacon_name
373
+ # The beacon whose attachments are to be fetched. Required.
374
+ # @param [String] namespaced_type
375
+ # Specifies the namespace and type of attachment to include in response in
376
+ # namespace/type format. Accepts `*/*` to specify "all types in all namespaces".
377
+ # @param [String] fields
378
+ # Selector specifying which fields to include in a partial response.
379
+ # @param [String] quota_user
380
+ # Available to use for quota purposes for server-side applications. Can be any
381
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
382
+ # @param [Google::Apis::RequestOptions] options
383
+ # Request-specific options
384
+ #
385
+ # @yield [result, err] Result & error if block supplied
386
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse] parsed result object
387
+ # @yieldparam err [StandardError] error object if request failed
388
+ #
389
+ # @return [Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse]
390
+ #
391
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
392
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
393
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
394
+ def list_beacon_attachments(beacon_name, namespaced_type: nil, fields: nil, quota_user: nil, options: nil, &block)
395
+ command = make_simple_command(:get, 'v1beta1/{+beaconName}/attachments', options)
396
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse::Representation
397
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse
398
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
399
+ command.query['namespacedType'] = namespaced_type unless namespaced_type.nil?
400
+ command.query['fields'] = fields unless fields.nil?
401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
402
+ execute_or_queue_command(command, &block)
403
+ end
404
+
405
+ # Deletes the specified attachment for the given beacon. Each attachment has a
406
+ # unique attachment name (`attachmentName`) which is returned when you fetch the
407
+ # attachment data via this API. You specify this with the delete request to
408
+ # control which attachment is removed. This operation cannot be undone.
409
+ # @param [String] attachment_name
410
+ # The attachment name (`attachmentName`) of the attachment to remove. For
411
+ # example: `beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738`
412
+ # Required.
413
+ # @param [String] fields
414
+ # Selector specifying which fields to include in a partial response.
415
+ # @param [String] quota_user
416
+ # Available to use for quota purposes for server-side applications. Can be any
417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
418
+ # @param [Google::Apis::RequestOptions] options
419
+ # Request-specific options
420
+ #
421
+ # @yield [result, err] Result & error if block supplied
422
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object
423
+ # @yieldparam err [StandardError] error object if request failed
424
+ #
425
+ # @return [Google::Apis::ProximitybeaconV1beta1::Empty]
426
+ #
427
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
428
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
429
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
430
+ def delete_beacon_attachment(attachment_name, fields: nil, quota_user: nil, options: nil, &block)
431
+ command = make_simple_command(:delete, 'v1beta1/{+attachmentName}', options)
432
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation
433
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty
434
+ command.params['attachmentName'] = attachment_name unless attachment_name.nil?
435
+ command.query['fields'] = fields unless fields.nil?
436
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
437
+ execute_or_queue_command(command, &block)
438
+ end
439
+
440
+ # Deletes multiple attachments on a given beacon. This operation is permanent
441
+ # and cannot be undone. You can optionally specify `namespacedType` to choose
442
+ # which attachments should be deleted. If you do not specify `namespacedType`,
443
+ # all your attachments on the given beacon will be deleted. You also may
444
+ # explicitly specify `*/*` to delete all.
445
+ # @param [String] beacon_name
446
+ # The beacon whose attachments are to be deleted. Required.
447
+ # @param [String] namespaced_type
448
+ # Specifies the namespace and type of attachments to delete in `namespace/type`
449
+ # format. Accepts `*/*` to specify "all types in all namespaces". Optional.
450
+ # @param [String] fields
451
+ # Selector specifying which fields to include in a partial response.
452
+ # @param [String] quota_user
453
+ # Available to use for quota purposes for server-side applications. Can be any
454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
455
+ # @param [Google::Apis::RequestOptions] options
456
+ # Request-specific options
457
+ #
458
+ # @yield [result, err] Result & error if block supplied
459
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse] parsed result object
460
+ # @yieldparam err [StandardError] error object if request failed
461
+ #
462
+ # @return [Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse]
463
+ #
464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
467
+ def batch_beacon_attachment_delete(beacon_name, namespaced_type: nil, fields: nil, quota_user: nil, options: nil, &block)
468
+ command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments:batchDelete', options)
469
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse::Representation
470
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse
471
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
472
+ command.query['namespacedType'] = namespaced_type unless namespaced_type.nil?
473
+ command.query['fields'] = fields unless fields.nil?
474
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
475
+ execute_or_queue_command(command, &block)
476
+ end
477
+
478
+ # List the diagnostics for a single beacon. You can also list diagnostics for
479
+ # all the beacons owned by your Google Developers Console project by using the
480
+ # beacon name `beacons/-`.
481
+ # @param [String] beacon_name
482
+ # Beacon that the diagnostics are for.
483
+ # @param [Fixnum] page_size
484
+ # Specifies the maximum number of results to return. Defaults to 10. Maximum
485
+ # 1000. Optional.
486
+ # @param [String] page_token
487
+ # Requests results that occur after the `page_token`, obtained from the response
488
+ # to a previous request. Optional.
489
+ # @param [String] alert_filter
490
+ # Requests only beacons that have the given alert. For example, to find beacons
491
+ # that have low batteries use `alert_filter=LOW_BATTERY`.
492
+ # @param [String] fields
493
+ # Selector specifying which fields to include in a partial response.
494
+ # @param [String] quota_user
495
+ # Available to use for quota purposes for server-side applications. Can be any
496
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
497
+ # @param [Google::Apis::RequestOptions] options
498
+ # Request-specific options
499
+ #
500
+ # @yield [result, err] Result & error if block supplied
501
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] parsed result object
502
+ # @yieldparam err [StandardError] error object if request failed
503
+ #
504
+ # @return [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse]
505
+ #
506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
509
+ def list_beacon_diagnostics(beacon_name, page_size: nil, page_token: nil, alert_filter: nil, fields: nil, quota_user: nil, options: nil, &block)
510
+ command = make_simple_command(:get, 'v1beta1/{+beaconName}/diagnostics', options)
511
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse::Representation
512
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse
513
+ command.params['beaconName'] = beacon_name unless beacon_name.nil?
514
+ command.query['pageSize'] = page_size unless page_size.nil?
515
+ command.query['pageToken'] = page_token unless page_token.nil?
516
+ command.query['alertFilter'] = alert_filter unless alert_filter.nil?
517
+ command.query['fields'] = fields unless fields.nil?
518
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
519
+ execute_or_queue_command(command, &block)
520
+ end
521
+
522
+ # Lists all attachment namespaces owned by your Google Developers Console
523
+ # project. Attachment data associated with a beacon must include a namespaced
524
+ # type, and the namespace must be owned by your project.
525
+ # @param [String] fields
526
+ # Selector specifying which fields to include in a partial response.
527
+ # @param [String] quota_user
528
+ # Available to use for quota purposes for server-side applications. Can be any
529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
530
+ # @param [Google::Apis::RequestOptions] options
531
+ # Request-specific options
532
+ #
533
+ # @yield [result, err] Result & error if block supplied
534
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] parsed result object
535
+ # @yieldparam err [StandardError] error object if request failed
536
+ #
537
+ # @return [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse]
538
+ #
539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
542
+ def list_namespaces(fields: nil, quota_user: nil, options: nil, &block)
543
+ command = make_simple_command(:get, 'v1beta1/namespaces', options)
544
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse::Representation
545
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse
546
+ command.query['fields'] = fields unless fields.nil?
547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
548
+ execute_or_queue_command(command, &block)
549
+ end
550
+
551
+ # Given one or more beacon observations, returns any beacon information and
552
+ # attachments accessible to your application.
553
+ # @param [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest] get_info_for_observed_beacons_request_object
554
+ # @param [String] fields
555
+ # Selector specifying which fields to include in a partial response.
556
+ # @param [String] quota_user
557
+ # Available to use for quota purposes for server-side applications. Can be any
558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
559
+ # @param [Google::Apis::RequestOptions] options
560
+ # Request-specific options
561
+ #
562
+ # @yield [result, err] Result & error if block supplied
563
+ # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse] parsed result object
564
+ # @yieldparam err [StandardError] error object if request failed
565
+ #
566
+ # @return [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse]
567
+ #
568
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
569
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
570
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
571
+ def getforobserved_beaconinfo(get_info_for_observed_beacons_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
572
+ command = make_simple_command(:post, 'v1beta1/beaconinfo:getforobserved', options)
573
+ command.request_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest::Representation
574
+ command.request_object = get_info_for_observed_beacons_request_object
575
+ command.response_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse::Representation
576
+ command.response_class = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse
577
+ command.query['fields'] = fields unless fields.nil?
578
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
579
+ execute_or_queue_command(command, &block)
580
+ end
581
+
582
+ protected
583
+
584
+ def apply_command_defaults(command)
585
+ command.query['key'] = key unless key.nil?
586
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
587
+ end
588
+ end
589
+ end
590
+ end
591
+ end