google-api-client 0.8.7 → 0.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,32 @@
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/discovery_v1/service.rb'
16
+ require 'google/apis/discovery_v1/classes.rb'
17
+ require 'google/apis/discovery_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # APIs Discovery Service
22
+ #
23
+ # Lets you discover information about other Google APIs, such as what APIs are
24
+ # available, the resource and method details for each API.
25
+ #
26
+ # @see https://developers.google.com/discovery/
27
+ module DiscoveryV1
28
+ VERSION = 'V1'
29
+ REVISION = ''
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,947 @@
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 DiscoveryV1
24
+
25
+ #
26
+ class DirectoryList
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Indicate the version of the Discovery API used to generate this doc.
30
+ # Corresponds to the JSON property `discoveryVersion`
31
+ # @return [String]
32
+ attr_accessor :discovery_version
33
+
34
+ # The individual directory entries. One entry per api/version pair.
35
+ # Corresponds to the JSON property `items`
36
+ # @return [Array<Google::Apis::DiscoveryV1::DirectoryList::Item>]
37
+ attr_accessor :items
38
+
39
+ # The kind for this response.
40
+ # Corresponds to the JSON property `kind`
41
+ # @return [String]
42
+ attr_accessor :kind
43
+
44
+ def initialize(**args)
45
+ update!(**args)
46
+ end
47
+
48
+ # Update properties of this object
49
+ def update!(**args)
50
+ @discovery_version = args[:discovery_version] unless args[:discovery_version].nil?
51
+ @items = args[:items] unless args[:items].nil?
52
+ @kind = args[:kind] unless args[:kind].nil?
53
+ end
54
+
55
+ #
56
+ class Item
57
+ include Google::Apis::Core::Hashable
58
+
59
+ # The description of this API.
60
+ # Corresponds to the JSON property `description`
61
+ # @return [String]
62
+ attr_accessor :description
63
+
64
+ # A link to the discovery document.
65
+ # Corresponds to the JSON property `discoveryLink`
66
+ # @return [String]
67
+ attr_accessor :discovery_link
68
+
69
+ # The URL for the discovery REST document.
70
+ # Corresponds to the JSON property `discoveryRestUrl`
71
+ # @return [String]
72
+ attr_accessor :discovery_rest_url
73
+
74
+ # A link to human readable documentation for the API.
75
+ # Corresponds to the JSON property `documentationLink`
76
+ # @return [String]
77
+ attr_accessor :documentation_link
78
+
79
+ # Links to 16x16 and 32x32 icons representing the API.
80
+ # Corresponds to the JSON property `icons`
81
+ # @return [Google::Apis::DiscoveryV1::DirectoryList::Item::Icons]
82
+ attr_accessor :icons
83
+
84
+ # The id of this API.
85
+ # Corresponds to the JSON property `id`
86
+ # @return [String]
87
+ attr_accessor :id
88
+
89
+ # The kind for this response.
90
+ # Corresponds to the JSON property `kind`
91
+ # @return [String]
92
+ attr_accessor :kind
93
+
94
+ # Labels for the status of this API, such as labs or deprecated.
95
+ # Corresponds to the JSON property `labels`
96
+ # @return [Array<String>]
97
+ attr_accessor :labels
98
+
99
+ # The name of the API.
100
+ # Corresponds to the JSON property `name`
101
+ # @return [String]
102
+ attr_accessor :name
103
+
104
+ # True if this version is the preferred version to use.
105
+ # Corresponds to the JSON property `preferred`
106
+ # @return [Boolean]
107
+ attr_accessor :preferred
108
+ alias_method :preferred?, :preferred
109
+
110
+ # The title of this API.
111
+ # Corresponds to the JSON property `title`
112
+ # @return [String]
113
+ attr_accessor :title
114
+
115
+ # The version of the API.
116
+ # Corresponds to the JSON property `version`
117
+ # @return [String]
118
+ attr_accessor :version
119
+
120
+ def initialize(**args)
121
+ update!(**args)
122
+ end
123
+
124
+ # Update properties of this object
125
+ def update!(**args)
126
+ @description = args[:description] unless args[:description].nil?
127
+ @discovery_link = args[:discovery_link] unless args[:discovery_link].nil?
128
+ @discovery_rest_url = args[:discovery_rest_url] unless args[:discovery_rest_url].nil?
129
+ @documentation_link = args[:documentation_link] unless args[:documentation_link].nil?
130
+ @icons = args[:icons] unless args[:icons].nil?
131
+ @id = args[:id] unless args[:id].nil?
132
+ @kind = args[:kind] unless args[:kind].nil?
133
+ @labels = args[:labels] unless args[:labels].nil?
134
+ @name = args[:name] unless args[:name].nil?
135
+ @preferred = args[:preferred] unless args[:preferred].nil?
136
+ @title = args[:title] unless args[:title].nil?
137
+ @version = args[:version] unless args[:version].nil?
138
+ end
139
+
140
+ # Links to 16x16 and 32x32 icons representing the API.
141
+ class Icons
142
+ include Google::Apis::Core::Hashable
143
+
144
+ # The URL of the 16x16 icon.
145
+ # Corresponds to the JSON property `x16`
146
+ # @return [String]
147
+ attr_accessor :x16
148
+
149
+ # The URL of the 32x32 icon.
150
+ # Corresponds to the JSON property `x32`
151
+ # @return [String]
152
+ attr_accessor :x32
153
+
154
+ def initialize(**args)
155
+ update!(**args)
156
+ end
157
+
158
+ # Update properties of this object
159
+ def update!(**args)
160
+ @x16 = args[:x16] unless args[:x16].nil?
161
+ @x32 = args[:x32] unless args[:x32].nil?
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ #
168
+ class JsonSchema
169
+ include Google::Apis::Core::Hashable
170
+
171
+ # A reference to another schema. The value of this property is the "id" of
172
+ # another schema.
173
+ # Corresponds to the JSON property `$ref`
174
+ # @return [String]
175
+ attr_accessor :_ref
176
+
177
+ # If this is a schema for an object, this property is the schema for any
178
+ # additional properties with dynamic keys on this object.
179
+ # Corresponds to the JSON property `additionalProperties`
180
+ # @return [Google::Apis::DiscoveryV1::JsonSchema]
181
+ attr_accessor :additional_properties
182
+
183
+ # Additional information about this property.
184
+ # Corresponds to the JSON property `annotations`
185
+ # @return [Google::Apis::DiscoveryV1::JsonSchema::Annotations]
186
+ attr_accessor :annotations
187
+
188
+ # The default value of this property (if one exists).
189
+ # Corresponds to the JSON property `default`
190
+ # @return [String]
191
+ attr_accessor :default
192
+
193
+ # A description of this object.
194
+ # Corresponds to the JSON property `description`
195
+ # @return [String]
196
+ attr_accessor :description
197
+
198
+ # Values this parameter may take (if it is an enum).
199
+ # Corresponds to the JSON property `enum`
200
+ # @return [Array<String>]
201
+ attr_accessor :enum
202
+
203
+ # The descriptions for the enums. Each position maps to the corresponding value
204
+ # in the "enum" array.
205
+ # Corresponds to the JSON property `enumDescriptions`
206
+ # @return [Array<String>]
207
+ attr_accessor :enum_descriptions
208
+
209
+ # An additional regular expression or key that helps constrain the value. For
210
+ # more details see: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-
211
+ # 5.23
212
+ # Corresponds to the JSON property `format`
213
+ # @return [String]
214
+ attr_accessor :format
215
+
216
+ # Unique identifier for this schema.
217
+ # Corresponds to the JSON property `id`
218
+ # @return [String]
219
+ attr_accessor :id
220
+
221
+ # If this is a schema for an array, this property is the schema for each element
222
+ # in the array.
223
+ # Corresponds to the JSON property `items`
224
+ # @return [Google::Apis::DiscoveryV1::JsonSchema]
225
+ attr_accessor :items
226
+
227
+ # Whether this parameter goes in the query or the path for REST requests.
228
+ # Corresponds to the JSON property `location`
229
+ # @return [String]
230
+ attr_accessor :location
231
+
232
+ # The maximum value of this parameter.
233
+ # Corresponds to the JSON property `maximum`
234
+ # @return [String]
235
+ attr_accessor :maximum
236
+
237
+ # The minimum value of this parameter.
238
+ # Corresponds to the JSON property `minimum`
239
+ # @return [String]
240
+ attr_accessor :minimum
241
+
242
+ # The regular expression this parameter must conform to. Uses Java 6 regex
243
+ # format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
244
+ # Corresponds to the JSON property `pattern`
245
+ # @return [String]
246
+ attr_accessor :pattern
247
+
248
+ # If this is a schema for an object, list the schema for each property of this
249
+ # object.
250
+ # Corresponds to the JSON property `properties`
251
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
252
+ attr_accessor :properties
253
+
254
+ # The value is read-only, generated by the service. The value cannot be modified
255
+ # by the client. If the value is included in a POST, PUT, or PATCH request, it
256
+ # is ignored by the service.
257
+ # Corresponds to the JSON property `readOnly`
258
+ # @return [Boolean]
259
+ attr_accessor :read_only
260
+ alias_method :read_only?, :read_only
261
+
262
+ # Whether this parameter may appear multiple times.
263
+ # Corresponds to the JSON property `repeated`
264
+ # @return [Boolean]
265
+ attr_accessor :repeated
266
+ alias_method :repeated?, :repeated
267
+
268
+ # Whether the parameter is required.
269
+ # Corresponds to the JSON property `required`
270
+ # @return [Boolean]
271
+ attr_accessor :required
272
+ alias_method :required?, :required
273
+
274
+ # The value type for this schema. A list of values can be found here: http://
275
+ # tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
276
+ # Corresponds to the JSON property `type`
277
+ # @return [String]
278
+ attr_accessor :type
279
+
280
+ # In a variant data type, the value of one property is used to determine how to
281
+ # interpret the entire entity. Its value must exist in a map of descriminant
282
+ # values to schema names.
283
+ # Corresponds to the JSON property `variant`
284
+ # @return [Google::Apis::DiscoveryV1::JsonSchema::Variant]
285
+ attr_accessor :variant
286
+
287
+ def initialize(**args)
288
+ update!(**args)
289
+ end
290
+
291
+ # Update properties of this object
292
+ def update!(**args)
293
+ @_ref = args[:_ref] unless args[:_ref].nil?
294
+ @additional_properties = args[:additional_properties] unless args[:additional_properties].nil?
295
+ @annotations = args[:annotations] unless args[:annotations].nil?
296
+ @default = args[:default] unless args[:default].nil?
297
+ @description = args[:description] unless args[:description].nil?
298
+ @enum = args[:enum] unless args[:enum].nil?
299
+ @enum_descriptions = args[:enum_descriptions] unless args[:enum_descriptions].nil?
300
+ @format = args[:format] unless args[:format].nil?
301
+ @id = args[:id] unless args[:id].nil?
302
+ @items = args[:items] unless args[:items].nil?
303
+ @location = args[:location] unless args[:location].nil?
304
+ @maximum = args[:maximum] unless args[:maximum].nil?
305
+ @minimum = args[:minimum] unless args[:minimum].nil?
306
+ @pattern = args[:pattern] unless args[:pattern].nil?
307
+ @properties = args[:properties] unless args[:properties].nil?
308
+ @read_only = args[:read_only] unless args[:read_only].nil?
309
+ @repeated = args[:repeated] unless args[:repeated].nil?
310
+ @required = args[:required] unless args[:required].nil?
311
+ @type = args[:type] unless args[:type].nil?
312
+ @variant = args[:variant] unless args[:variant].nil?
313
+ end
314
+
315
+ # Additional information about this property.
316
+ class Annotations
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # A list of methods for which this property is required on requests.
320
+ # Corresponds to the JSON property `required`
321
+ # @return [Array<String>]
322
+ attr_accessor :required
323
+
324
+ def initialize(**args)
325
+ update!(**args)
326
+ end
327
+
328
+ # Update properties of this object
329
+ def update!(**args)
330
+ @required = args[:required] unless args[:required].nil?
331
+ end
332
+ end
333
+
334
+ # In a variant data type, the value of one property is used to determine how to
335
+ # interpret the entire entity. Its value must exist in a map of descriminant
336
+ # values to schema names.
337
+ class Variant
338
+ include Google::Apis::Core::Hashable
339
+
340
+ # The name of the type discriminant property.
341
+ # Corresponds to the JSON property `discriminant`
342
+ # @return [String]
343
+ attr_accessor :discriminant
344
+
345
+ # The map of discriminant value to schema to use for parsing..
346
+ # Corresponds to the JSON property `map`
347
+ # @return [Array<Google::Apis::DiscoveryV1::JsonSchema::Variant::Map>]
348
+ attr_accessor :map
349
+
350
+ def initialize(**args)
351
+ update!(**args)
352
+ end
353
+
354
+ # Update properties of this object
355
+ def update!(**args)
356
+ @discriminant = args[:discriminant] unless args[:discriminant].nil?
357
+ @map = args[:map] unless args[:map].nil?
358
+ end
359
+
360
+ #
361
+ class Map
362
+ include Google::Apis::Core::Hashable
363
+
364
+ #
365
+ # Corresponds to the JSON property `$ref`
366
+ # @return [String]
367
+ attr_accessor :_ref
368
+
369
+ #
370
+ # Corresponds to the JSON property `type_value`
371
+ # @return [String]
372
+ attr_accessor :type_value
373
+
374
+ def initialize(**args)
375
+ update!(**args)
376
+ end
377
+
378
+ # Update properties of this object
379
+ def update!(**args)
380
+ @_ref = args[:_ref] unless args[:_ref].nil?
381
+ @type_value = args[:type_value] unless args[:type_value].nil?
382
+ end
383
+ end
384
+ end
385
+ end
386
+
387
+ #
388
+ class RestDescription
389
+ include Google::Apis::Core::Hashable
390
+
391
+ # Authentication information.
392
+ # Corresponds to the JSON property `auth`
393
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Auth]
394
+ attr_accessor :auth
395
+
396
+ # [DEPRECATED] The base path for REST requests.
397
+ # Corresponds to the JSON property `basePath`
398
+ # @return [String]
399
+ attr_accessor :base_path
400
+
401
+ # [DEPRECATED] The base URL for REST requests.
402
+ # Corresponds to the JSON property `baseUrl`
403
+ # @return [String]
404
+ attr_accessor :base_url
405
+
406
+ # The path for REST batch requests.
407
+ # Corresponds to the JSON property `batchPath`
408
+ # @return [String]
409
+ attr_accessor :batch_path
410
+
411
+ # Indicates how the API name should be capitalized and split into various parts.
412
+ # Useful for generating pretty class names.
413
+ # Corresponds to the JSON property `canonicalName`
414
+ # @return [String]
415
+ attr_accessor :canonical_name
416
+
417
+ # The description of this API.
418
+ # Corresponds to the JSON property `description`
419
+ # @return [String]
420
+ attr_accessor :description
421
+
422
+ # Indicate the version of the Discovery API used to generate this doc.
423
+ # Corresponds to the JSON property `discoveryVersion`
424
+ # @return [String]
425
+ attr_accessor :discovery_version
426
+
427
+ # A link to human readable documentation for the API.
428
+ # Corresponds to the JSON property `documentationLink`
429
+ # @return [String]
430
+ attr_accessor :documentation_link
431
+
432
+ # The ETag for this response.
433
+ # Corresponds to the JSON property `etag`
434
+ # @return [String]
435
+ attr_accessor :etag
436
+
437
+ # A list of supported features for this API.
438
+ # Corresponds to the JSON property `features`
439
+ # @return [Array<String>]
440
+ attr_accessor :features
441
+
442
+ # Links to 16x16 and 32x32 icons representing the API.
443
+ # Corresponds to the JSON property `icons`
444
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Icons]
445
+ attr_accessor :icons
446
+
447
+ # The ID of this API.
448
+ # Corresponds to the JSON property `id`
449
+ # @return [String]
450
+ attr_accessor :id
451
+
452
+ # The kind for this response.
453
+ # Corresponds to the JSON property `kind`
454
+ # @return [String]
455
+ attr_accessor :kind
456
+
457
+ # Labels for the status of this API, such as labs or deprecated.
458
+ # Corresponds to the JSON property `labels`
459
+ # @return [Array<String>]
460
+ attr_accessor :labels
461
+
462
+ # API-level methods for this API.
463
+ # Corresponds to the JSON property `methods`
464
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestMethod>]
465
+ attr_accessor :api_methods
466
+
467
+ # The name of this API.
468
+ # Corresponds to the JSON property `name`
469
+ # @return [String]
470
+ attr_accessor :name
471
+
472
+ # The domain of the owner of this API. Together with the ownerName and a
473
+ # packagePath values, this can be used to generate a library for this API which
474
+ # would have a unique fully qualified name.
475
+ # Corresponds to the JSON property `ownerDomain`
476
+ # @return [String]
477
+ attr_accessor :owner_domain
478
+
479
+ # The name of the owner of this API. See ownerDomain.
480
+ # Corresponds to the JSON property `ownerName`
481
+ # @return [String]
482
+ attr_accessor :owner_name
483
+
484
+ # The package of the owner of this API. See ownerDomain.
485
+ # Corresponds to the JSON property `packagePath`
486
+ # @return [String]
487
+ attr_accessor :package_path
488
+
489
+ # Common parameters that apply across all apis.
490
+ # Corresponds to the JSON property `parameters`
491
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
492
+ attr_accessor :parameters
493
+
494
+ # The protocol described by this document.
495
+ # Corresponds to the JSON property `protocol`
496
+ # @return [String]
497
+ attr_accessor :protocol
498
+
499
+ # The resources in this API.
500
+ # Corresponds to the JSON property `resources`
501
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestResource>]
502
+ attr_accessor :resources
503
+
504
+ # The version of this API.
505
+ # Corresponds to the JSON property `revision`
506
+ # @return [String]
507
+ attr_accessor :revision
508
+
509
+ # The root URL under which all API services live.
510
+ # Corresponds to the JSON property `rootUrl`
511
+ # @return [String]
512
+ attr_accessor :root_url
513
+
514
+ # The schemas for this API.
515
+ # Corresponds to the JSON property `schemas`
516
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
517
+ attr_accessor :schemas
518
+
519
+ # The base path for all REST requests.
520
+ # Corresponds to the JSON property `servicePath`
521
+ # @return [String]
522
+ attr_accessor :service_path
523
+
524
+ # The title of this API.
525
+ # Corresponds to the JSON property `title`
526
+ # @return [String]
527
+ attr_accessor :title
528
+
529
+ # The version of this API.
530
+ # Corresponds to the JSON property `version`
531
+ # @return [String]
532
+ attr_accessor :version
533
+
534
+ def initialize(**args)
535
+ update!(**args)
536
+ end
537
+
538
+ # Update properties of this object
539
+ def update!(**args)
540
+ @auth = args[:auth] unless args[:auth].nil?
541
+ @base_path = args[:base_path] unless args[:base_path].nil?
542
+ @base_url = args[:base_url] unless args[:base_url].nil?
543
+ @batch_path = args[:batch_path] unless args[:batch_path].nil?
544
+ @canonical_name = args[:canonical_name] unless args[:canonical_name].nil?
545
+ @description = args[:description] unless args[:description].nil?
546
+ @discovery_version = args[:discovery_version] unless args[:discovery_version].nil?
547
+ @documentation_link = args[:documentation_link] unless args[:documentation_link].nil?
548
+ @etag = args[:etag] unless args[:etag].nil?
549
+ @features = args[:features] unless args[:features].nil?
550
+ @icons = args[:icons] unless args[:icons].nil?
551
+ @id = args[:id] unless args[:id].nil?
552
+ @kind = args[:kind] unless args[:kind].nil?
553
+ @labels = args[:labels] unless args[:labels].nil?
554
+ @api_methods = args[:api_methods] unless args[:api_methods].nil?
555
+ @name = args[:name] unless args[:name].nil?
556
+ @owner_domain = args[:owner_domain] unless args[:owner_domain].nil?
557
+ @owner_name = args[:owner_name] unless args[:owner_name].nil?
558
+ @package_path = args[:package_path] unless args[:package_path].nil?
559
+ @parameters = args[:parameters] unless args[:parameters].nil?
560
+ @protocol = args[:protocol] unless args[:protocol].nil?
561
+ @resources = args[:resources] unless args[:resources].nil?
562
+ @revision = args[:revision] unless args[:revision].nil?
563
+ @root_url = args[:root_url] unless args[:root_url].nil?
564
+ @schemas = args[:schemas] unless args[:schemas].nil?
565
+ @service_path = args[:service_path] unless args[:service_path].nil?
566
+ @title = args[:title] unless args[:title].nil?
567
+ @version = args[:version] unless args[:version].nil?
568
+ end
569
+
570
+ # Authentication information.
571
+ class Auth
572
+ include Google::Apis::Core::Hashable
573
+
574
+ # OAuth 2.0 authentication information.
575
+ # Corresponds to the JSON property `oauth2`
576
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Auth::Oauth2]
577
+ attr_accessor :oauth2
578
+
579
+ def initialize(**args)
580
+ update!(**args)
581
+ end
582
+
583
+ # Update properties of this object
584
+ def update!(**args)
585
+ @oauth2 = args[:oauth2] unless args[:oauth2].nil?
586
+ end
587
+
588
+ # OAuth 2.0 authentication information.
589
+ class Oauth2
590
+ include Google::Apis::Core::Hashable
591
+
592
+ # Available OAuth 2.0 scopes.
593
+ # Corresponds to the JSON property `scopes`
594
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestDescription::Auth::Oauth2::Scope>]
595
+ attr_accessor :scopes
596
+
597
+ def initialize(**args)
598
+ update!(**args)
599
+ end
600
+
601
+ # Update properties of this object
602
+ def update!(**args)
603
+ @scopes = args[:scopes] unless args[:scopes].nil?
604
+ end
605
+
606
+ # The scope value.
607
+ class Scope
608
+ include Google::Apis::Core::Hashable
609
+
610
+ # Description of scope.
611
+ # Corresponds to the JSON property `description`
612
+ # @return [String]
613
+ attr_accessor :description
614
+
615
+ def initialize(**args)
616
+ update!(**args)
617
+ end
618
+
619
+ # Update properties of this object
620
+ def update!(**args)
621
+ @description = args[:description] unless args[:description].nil?
622
+ end
623
+ end
624
+ end
625
+ end
626
+
627
+ # Links to 16x16 and 32x32 icons representing the API.
628
+ class Icons
629
+ include Google::Apis::Core::Hashable
630
+
631
+ # The URL of the 16x16 icon.
632
+ # Corresponds to the JSON property `x16`
633
+ # @return [String]
634
+ attr_accessor :x16
635
+
636
+ # The URL of the 32x32 icon.
637
+ # Corresponds to the JSON property `x32`
638
+ # @return [String]
639
+ attr_accessor :x32
640
+
641
+ def initialize(**args)
642
+ update!(**args)
643
+ end
644
+
645
+ # Update properties of this object
646
+ def update!(**args)
647
+ @x16 = args[:x16] unless args[:x16].nil?
648
+ @x32 = args[:x32] unless args[:x32].nil?
649
+ end
650
+ end
651
+ end
652
+
653
+ #
654
+ class RestMethod
655
+ include Google::Apis::Core::Hashable
656
+
657
+ # Description of this method.
658
+ # Corresponds to the JSON property `description`
659
+ # @return [String]
660
+ attr_accessor :description
661
+
662
+ # Whether this method requires an ETag to be specified. The ETag is sent as an
663
+ # HTTP If-Match or If-None-Match header.
664
+ # Corresponds to the JSON property `etagRequired`
665
+ # @return [Boolean]
666
+ attr_accessor :etag_required
667
+ alias_method :etag_required?, :etag_required
668
+
669
+ # HTTP method used by this method.
670
+ # Corresponds to the JSON property `httpMethod`
671
+ # @return [String]
672
+ attr_accessor :http_method
673
+
674
+ # A unique ID for this method. This property can be used to match methods
675
+ # between different versions of Discovery.
676
+ # Corresponds to the JSON property `id`
677
+ # @return [String]
678
+ attr_accessor :id
679
+
680
+ # Media upload parameters.
681
+ # Corresponds to the JSON property `mediaUpload`
682
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload]
683
+ attr_accessor :media_upload
684
+
685
+ # Ordered list of required parameters, serves as a hint to clients on how to
686
+ # structure their method signatures. The array is ordered such that the "most-
687
+ # significant" parameter appears first.
688
+ # Corresponds to the JSON property `parameterOrder`
689
+ # @return [Array<String>]
690
+ attr_accessor :parameter_order
691
+
692
+ # Details for all parameters in this method.
693
+ # Corresponds to the JSON property `parameters`
694
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
695
+ attr_accessor :parameters
696
+
697
+ # The URI path of this REST method. Should be used in conjunction with the
698
+ # basePath property at the api-level.
699
+ # Corresponds to the JSON property `path`
700
+ # @return [String]
701
+ attr_accessor :path
702
+
703
+ # The schema for the request.
704
+ # Corresponds to the JSON property `request`
705
+ # @return [Google::Apis::DiscoveryV1::RestMethod::Request]
706
+ attr_accessor :request
707
+
708
+ # The schema for the response.
709
+ # Corresponds to the JSON property `response`
710
+ # @return [Google::Apis::DiscoveryV1::RestMethod::Response]
711
+ attr_accessor :response
712
+
713
+ # OAuth 2.0 scopes applicable to this method.
714
+ # Corresponds to the JSON property `scopes`
715
+ # @return [Array<String>]
716
+ attr_accessor :scopes
717
+
718
+ # Whether this method supports media downloads.
719
+ # Corresponds to the JSON property `supportsMediaDownload`
720
+ # @return [Boolean]
721
+ attr_accessor :supports_media_download
722
+ alias_method :supports_media_download?, :supports_media_download
723
+
724
+ # Whether this method supports media uploads.
725
+ # Corresponds to the JSON property `supportsMediaUpload`
726
+ # @return [Boolean]
727
+ attr_accessor :supports_media_upload
728
+ alias_method :supports_media_upload?, :supports_media_upload
729
+
730
+ # Whether this method supports subscriptions.
731
+ # Corresponds to the JSON property `supportsSubscription`
732
+ # @return [Boolean]
733
+ attr_accessor :supports_subscription
734
+ alias_method :supports_subscription?, :supports_subscription
735
+
736
+ # Indicates that downloads from this method should use the download service URL (
737
+ # i.e. "/download"). Only applies if the method supports media download.
738
+ # Corresponds to the JSON property `useMediaDownloadService`
739
+ # @return [Boolean]
740
+ attr_accessor :use_media_download_service
741
+ alias_method :use_media_download_service?, :use_media_download_service
742
+
743
+ def initialize(**args)
744
+ update!(**args)
745
+ end
746
+
747
+ # Update properties of this object
748
+ def update!(**args)
749
+ @description = args[:description] unless args[:description].nil?
750
+ @etag_required = args[:etag_required] unless args[:etag_required].nil?
751
+ @http_method = args[:http_method] unless args[:http_method].nil?
752
+ @id = args[:id] unless args[:id].nil?
753
+ @media_upload = args[:media_upload] unless args[:media_upload].nil?
754
+ @parameter_order = args[:parameter_order] unless args[:parameter_order].nil?
755
+ @parameters = args[:parameters] unless args[:parameters].nil?
756
+ @path = args[:path] unless args[:path].nil?
757
+ @request = args[:request] unless args[:request].nil?
758
+ @response = args[:response] unless args[:response].nil?
759
+ @scopes = args[:scopes] unless args[:scopes].nil?
760
+ @supports_media_download = args[:supports_media_download] unless args[:supports_media_download].nil?
761
+ @supports_media_upload = args[:supports_media_upload] unless args[:supports_media_upload].nil?
762
+ @supports_subscription = args[:supports_subscription] unless args[:supports_subscription].nil?
763
+ @use_media_download_service = args[:use_media_download_service] unless args[:use_media_download_service].nil?
764
+ end
765
+
766
+ # Media upload parameters.
767
+ class MediaUpload
768
+ include Google::Apis::Core::Hashable
769
+
770
+ # MIME Media Ranges for acceptable media uploads to this method.
771
+ # Corresponds to the JSON property `accept`
772
+ # @return [Array<String>]
773
+ attr_accessor :accept
774
+
775
+ # Maximum size of a media upload, such as "1MB", "2GB" or "3TB".
776
+ # Corresponds to the JSON property `maxSize`
777
+ # @return [String]
778
+ attr_accessor :max_size
779
+
780
+ # Supported upload protocols.
781
+ # Corresponds to the JSON property `protocols`
782
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols]
783
+ attr_accessor :protocols
784
+
785
+ def initialize(**args)
786
+ update!(**args)
787
+ end
788
+
789
+ # Update properties of this object
790
+ def update!(**args)
791
+ @accept = args[:accept] unless args[:accept].nil?
792
+ @max_size = args[:max_size] unless args[:max_size].nil?
793
+ @protocols = args[:protocols] unless args[:protocols].nil?
794
+ end
795
+
796
+ # Supported upload protocols.
797
+ class Protocols
798
+ include Google::Apis::Core::Hashable
799
+
800
+ # Supports the Resumable Media Upload protocol.
801
+ # Corresponds to the JSON property `resumable`
802
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols::Resumable]
803
+ attr_accessor :resumable
804
+
805
+ # Supports uploading as a single HTTP request.
806
+ # Corresponds to the JSON property `simple`
807
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols::Simple]
808
+ attr_accessor :simple
809
+
810
+ def initialize(**args)
811
+ update!(**args)
812
+ end
813
+
814
+ # Update properties of this object
815
+ def update!(**args)
816
+ @resumable = args[:resumable] unless args[:resumable].nil?
817
+ @simple = args[:simple] unless args[:simple].nil?
818
+ end
819
+
820
+ # Supports the Resumable Media Upload protocol.
821
+ class Resumable
822
+ include Google::Apis::Core::Hashable
823
+
824
+ # True if this endpoint supports uploading multipart media.
825
+ # Corresponds to the JSON property `multipart`
826
+ # @return [Boolean]
827
+ attr_accessor :multipart
828
+ alias_method :multipart?, :multipart
829
+
830
+ # The URI path to be used for upload. Should be used in conjunction with the
831
+ # basePath property at the api-level.
832
+ # Corresponds to the JSON property `path`
833
+ # @return [String]
834
+ attr_accessor :path
835
+
836
+ def initialize(**args)
837
+ update!(**args)
838
+ end
839
+
840
+ # Update properties of this object
841
+ def update!(**args)
842
+ @multipart = args[:multipart] unless args[:multipart].nil?
843
+ @path = args[:path] unless args[:path].nil?
844
+ end
845
+ end
846
+
847
+ # Supports uploading as a single HTTP request.
848
+ class Simple
849
+ include Google::Apis::Core::Hashable
850
+
851
+ # True if this endpoint supports upload multipart media.
852
+ # Corresponds to the JSON property `multipart`
853
+ # @return [Boolean]
854
+ attr_accessor :multipart
855
+ alias_method :multipart?, :multipart
856
+
857
+ # The URI path to be used for upload. Should be used in conjunction with the
858
+ # basePath property at the api-level.
859
+ # Corresponds to the JSON property `path`
860
+ # @return [String]
861
+ attr_accessor :path
862
+
863
+ def initialize(**args)
864
+ update!(**args)
865
+ end
866
+
867
+ # Update properties of this object
868
+ def update!(**args)
869
+ @multipart = args[:multipart] unless args[:multipart].nil?
870
+ @path = args[:path] unless args[:path].nil?
871
+ end
872
+ end
873
+ end
874
+ end
875
+
876
+ # The schema for the request.
877
+ class Request
878
+ include Google::Apis::Core::Hashable
879
+
880
+ # Schema ID for the request schema.
881
+ # Corresponds to the JSON property `$ref`
882
+ # @return [String]
883
+ attr_accessor :_ref
884
+
885
+ # parameter name.
886
+ # Corresponds to the JSON property `parameterName`
887
+ # @return [String]
888
+ attr_accessor :parameter_name
889
+
890
+ def initialize(**args)
891
+ update!(**args)
892
+ end
893
+
894
+ # Update properties of this object
895
+ def update!(**args)
896
+ @_ref = args[:_ref] unless args[:_ref].nil?
897
+ @parameter_name = args[:parameter_name] unless args[:parameter_name].nil?
898
+ end
899
+ end
900
+
901
+ # The schema for the response.
902
+ class Response
903
+ include Google::Apis::Core::Hashable
904
+
905
+ # Schema ID for the response schema.
906
+ # Corresponds to the JSON property `$ref`
907
+ # @return [String]
908
+ attr_accessor :_ref
909
+
910
+ def initialize(**args)
911
+ update!(**args)
912
+ end
913
+
914
+ # Update properties of this object
915
+ def update!(**args)
916
+ @_ref = args[:_ref] unless args[:_ref].nil?
917
+ end
918
+ end
919
+ end
920
+
921
+ #
922
+ class RestResource
923
+ include Google::Apis::Core::Hashable
924
+
925
+ # Methods on this resource.
926
+ # Corresponds to the JSON property `methods`
927
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestMethod>]
928
+ attr_accessor :api_methods
929
+
930
+ # Sub-resources on this resource.
931
+ # Corresponds to the JSON property `resources`
932
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestResource>]
933
+ attr_accessor :resources
934
+
935
+ def initialize(**args)
936
+ update!(**args)
937
+ end
938
+
939
+ # Update properties of this object
940
+ def update!(**args)
941
+ @api_methods = args[:api_methods] unless args[:api_methods].nil?
942
+ @resources = args[:resources] unless args[:resources].nil?
943
+ end
944
+ end
945
+ end
946
+ end
947
+ end