google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,93 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # TODO - Repeated params
4
+
5
+ require 'thor'
6
+ require 'open-uri'
7
+ require 'google/apis/discovery_v1'
8
+ require 'google/apis/generator'
9
+ require 'multi_json'
10
+ require 'logger'
11
+
12
+ module Google
13
+ class ApiGenerator < Thor
14
+ include Thor::Actions
15
+
16
+ Google::Apis::ClientOptions.default.application_name = "generate-api"
17
+ Google::Apis::ClientOptions.default.application_version = Google::Apis::VERSION
18
+
19
+ Discovery = Google::Apis::DiscoveryV1
20
+
21
+ desc 'gen OUTDIR', 'Generate ruby API from an API description'
22
+ method_options url: :string, file: :string, id: :array, preferred_only: :boolean, verbose: :boolean, names: :string, names_out: :string
23
+ method_option :preferred_only, default: true
24
+ def gen(dir)
25
+ self.destination_root = dir
26
+ Google::Apis.logger.level = Logger::DEBUG if options[:verbose]
27
+ if options[:url]
28
+ generate_from_url(options[:url])
29
+ elsif options[:file]
30
+ generate_from_file(options[:file])
31
+ else
32
+ generate_from_discovery(preferred_only: options[:preferred_only], id: options[:id] )
33
+ end
34
+ create_file(options[:names_out]) { |*| generator.dump_api_names } if options[:names_out]
35
+ end
36
+
37
+ desc 'list', 'List public APIs'
38
+ method_options verbose: :boolean, preferred_only: :boolean
39
+ def list
40
+ Google::Apis.logger.level = Logger::DEBUG if options[:verbose]
41
+ discovery = Discovery::DiscoveryService.new
42
+ apis = discovery.list_apis
43
+ apis.items.each do |api|
44
+ say sprintf('%s - %s', api.id, api.description).strip unless options[:preferred_only] && !api.preferred?
45
+ end
46
+ end
47
+
48
+ no_commands do
49
+ def generate_from_url(url)
50
+ json = discovery.http(:get, url)
51
+ generate_api(json)
52
+ end
53
+
54
+ def generate_from_file(file)
55
+ File.open(file) do |f|
56
+ generate_api(f.read)
57
+ end
58
+ end
59
+
60
+ def generate_from_discovery(preferred_only: false, id: nil)
61
+ say 'Fetching API list'
62
+ id = Array(id)
63
+ apis = discovery.list_apis
64
+ apis.items.each do |api|
65
+ if (id.empty? && preferred_only && api.preferred?) || id.include?(api.id)
66
+ say sprintf('Loading %s, version %s from %s', api.name, api.version, api.discovery_rest_url)
67
+ generate_from_url(api.discovery_rest_url)
68
+ else
69
+ say sprintf('Ignoring disoverable API %s', api.id)
70
+ end
71
+ end
72
+ end
73
+
74
+ def generate_api(json)
75
+ files = generator.render(json)
76
+ files.each do |file, content|
77
+ create_file(file) { |*| content }
78
+ end
79
+ end
80
+
81
+ def discovery
82
+ @discovery ||= Discovery::DiscoveryService.new
83
+ end
84
+
85
+ def generator
86
+ @generator ||= Google::Apis::Generator.new(api_names: options[:names])
87
+ end
88
+ end
89
+ end
90
+
91
+ end
92
+
93
+ Google::ApiGenerator.start(ARGV)
@@ -0,0 +1,35 @@
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/adexchangebuyer_v1_3/service.rb'
16
+ require 'google/apis/adexchangebuyer_v1_3/classes.rb'
17
+ require 'google/apis/adexchangebuyer_v1_3/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Ad Exchange Buyer API
22
+ #
23
+ # Accesses your bidding-account information, submits creatives for validation,
24
+ # finds available direct deals, and retrieves performance reports.
25
+ #
26
+ # @see https://developers.google.com/ad-exchange/buyer-rest
27
+ module AdexchangebuyerV1_3
28
+ VERSION = 'V1_3'
29
+ REVISION = '20150520'
30
+
31
+ # Manage your Ad Exchange buyer account configuration
32
+ AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer'
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,1124 @@
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 AdexchangebuyerV1_3
24
+
25
+ # Configuration data for an Ad Exchange buyer account.
26
+ class Account
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Your bidder locations that have distinct URLs.
30
+ # Corresponds to the JSON property `bidderLocation`
31
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Account::BidderLocation>]
32
+ attr_accessor :bidder_location
33
+
34
+ # The nid parameter value used in cookie match requests. Please contact your
35
+ # technical account manager if you need to change this.
36
+ # Corresponds to the JSON property `cookieMatchingNid`
37
+ # @return [String]
38
+ attr_accessor :cookie_matching_nid
39
+
40
+ # The base URL used in cookie match requests.
41
+ # Corresponds to the JSON property `cookieMatchingUrl`
42
+ # @return [String]
43
+ attr_accessor :cookie_matching_url
44
+
45
+ # Account id.
46
+ # Corresponds to the JSON property `id`
47
+ # @return [Fixnum]
48
+ attr_accessor :id
49
+
50
+ # Resource type.
51
+ # Corresponds to the JSON property `kind`
52
+ # @return [String]
53
+ attr_accessor :kind
54
+
55
+ # The maximum number of active creatives that an account can have, where a
56
+ # creative is active if it was inserted or bid with in the last 30 days. Please
57
+ # contact your technical account manager if you need to change this.
58
+ # Corresponds to the JSON property `maximumActiveCreatives`
59
+ # @return [Fixnum]
60
+ attr_accessor :maximum_active_creatives
61
+
62
+ # The sum of all bidderLocation.maximumQps values cannot exceed this. Please
63
+ # contact your technical account manager if you need to change this.
64
+ # Corresponds to the JSON property `maximumTotalQps`
65
+ # @return [Fixnum]
66
+ attr_accessor :maximum_total_qps
67
+
68
+ # The number of creatives that this account inserted or bid with in the last 30
69
+ # days.
70
+ # Corresponds to the JSON property `numberActiveCreatives`
71
+ # @return [Fixnum]
72
+ attr_accessor :number_active_creatives
73
+
74
+ def initialize(**args)
75
+ update!(**args)
76
+ end
77
+
78
+ # Update properties of this object
79
+ def update!(**args)
80
+ @bidder_location = args[:bidder_location] unless args[:bidder_location].nil?
81
+ @cookie_matching_nid = args[:cookie_matching_nid] unless args[:cookie_matching_nid].nil?
82
+ @cookie_matching_url = args[:cookie_matching_url] unless args[:cookie_matching_url].nil?
83
+ @id = args[:id] unless args[:id].nil?
84
+ @kind = args[:kind] unless args[:kind].nil?
85
+ @maximum_active_creatives = args[:maximum_active_creatives] unless args[:maximum_active_creatives].nil?
86
+ @maximum_total_qps = args[:maximum_total_qps] unless args[:maximum_total_qps].nil?
87
+ @number_active_creatives = args[:number_active_creatives] unless args[:number_active_creatives].nil?
88
+ end
89
+
90
+ #
91
+ class BidderLocation
92
+ include Google::Apis::Core::Hashable
93
+
94
+ # The maximum queries per second the Ad Exchange will send.
95
+ # Corresponds to the JSON property `maximumQps`
96
+ # @return [Fixnum]
97
+ attr_accessor :maximum_qps
98
+
99
+ # The geographical region the Ad Exchange should send requests from. Only used
100
+ # by some quota systems, but always setting the value is recommended. Allowed
101
+ # values:
102
+ # - ASIA
103
+ # - EUROPE
104
+ # - US_EAST
105
+ # - US_WEST
106
+ # Corresponds to the JSON property `region`
107
+ # @return [String]
108
+ attr_accessor :region
109
+
110
+ # The URL to which the Ad Exchange will send bid requests.
111
+ # Corresponds to the JSON property `url`
112
+ # @return [String]
113
+ attr_accessor :url
114
+
115
+ def initialize(**args)
116
+ update!(**args)
117
+ end
118
+
119
+ # Update properties of this object
120
+ def update!(**args)
121
+ @maximum_qps = args[:maximum_qps] unless args[:maximum_qps].nil?
122
+ @region = args[:region] unless args[:region].nil?
123
+ @url = args[:url] unless args[:url].nil?
124
+ end
125
+ end
126
+ end
127
+
128
+ # An account feed lists Ad Exchange buyer accounts that the user has access to.
129
+ # Each entry in the feed corresponds to a single buyer account.
130
+ class AccountsList
131
+ include Google::Apis::Core::Hashable
132
+
133
+ # A list of accounts.
134
+ # Corresponds to the JSON property `items`
135
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Account>]
136
+ attr_accessor :items
137
+
138
+ # Resource type.
139
+ # Corresponds to the JSON property `kind`
140
+ # @return [String]
141
+ attr_accessor :kind
142
+
143
+ def initialize(**args)
144
+ update!(**args)
145
+ end
146
+
147
+ # Update properties of this object
148
+ def update!(**args)
149
+ @items = args[:items] unless args[:items].nil?
150
+ @kind = args[:kind] unless args[:kind].nil?
151
+ end
152
+ end
153
+
154
+ # The configuration data for an Ad Exchange billing info.
155
+ class BillingInfo
156
+ include Google::Apis::Core::Hashable
157
+
158
+ # Account id.
159
+ # Corresponds to the JSON property `accountId`
160
+ # @return [Fixnum]
161
+ attr_accessor :account_id
162
+
163
+ # Account name.
164
+ # Corresponds to the JSON property `accountName`
165
+ # @return [String]
166
+ attr_accessor :account_name
167
+
168
+ # A list of adgroup IDs associated with this particular account. These IDs may
169
+ # show up as part of a realtime bidding BidRequest, which indicates a bid
170
+ # request for this account.
171
+ # Corresponds to the JSON property `billingId`
172
+ # @return [Array<String>]
173
+ attr_accessor :billing_id
174
+
175
+ # Resource type.
176
+ # Corresponds to the JSON property `kind`
177
+ # @return [String]
178
+ attr_accessor :kind
179
+
180
+ def initialize(**args)
181
+ update!(**args)
182
+ end
183
+
184
+ # Update properties of this object
185
+ def update!(**args)
186
+ @account_id = args[:account_id] unless args[:account_id].nil?
187
+ @account_name = args[:account_name] unless args[:account_name].nil?
188
+ @billing_id = args[:billing_id] unless args[:billing_id].nil?
189
+ @kind = args[:kind] unless args[:kind].nil?
190
+ end
191
+ end
192
+
193
+ # A billing info feed lists Billing Info the Ad Exchange buyer account has
194
+ # access to. Each entry in the feed corresponds to a single billing info.
195
+ class BillingInfoList
196
+ include Google::Apis::Core::Hashable
197
+
198
+ # A list of billing info relevant for your account.
199
+ # Corresponds to the JSON property `items`
200
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::BillingInfo>]
201
+ attr_accessor :items
202
+
203
+ # Resource type.
204
+ # Corresponds to the JSON property `kind`
205
+ # @return [String]
206
+ attr_accessor :kind
207
+
208
+ def initialize(**args)
209
+ update!(**args)
210
+ end
211
+
212
+ # Update properties of this object
213
+ def update!(**args)
214
+ @items = args[:items] unless args[:items].nil?
215
+ @kind = args[:kind] unless args[:kind].nil?
216
+ end
217
+ end
218
+
219
+ # The configuration data for Ad Exchange RTB - Budget API.
220
+ class Budget
221
+ include Google::Apis::Core::Hashable
222
+
223
+ # The id of the account. This is required for get and update requests.
224
+ # Corresponds to the JSON property `accountId`
225
+ # @return [String]
226
+ attr_accessor :account_id
227
+
228
+ # The billing id to determine which adgroup to provide budget information for.
229
+ # This is required for get and update requests.
230
+ # Corresponds to the JSON property `billingId`
231
+ # @return [String]
232
+ attr_accessor :billing_id
233
+
234
+ # The budget amount to apply for the billingId provided. This is required for
235
+ # update requests.
236
+ # Corresponds to the JSON property `budgetAmount`
237
+ # @return [String]
238
+ attr_accessor :budget_amount
239
+
240
+ # The currency code for the buyer. This cannot be altered here.
241
+ # Corresponds to the JSON property `currencyCode`
242
+ # @return [String]
243
+ attr_accessor :currency_code
244
+
245
+ # The unique id that describes this item.
246
+ # Corresponds to the JSON property `id`
247
+ # @return [String]
248
+ attr_accessor :id
249
+
250
+ # The kind of the resource, i.e. "adexchangebuyer#budget".
251
+ # Corresponds to the JSON property `kind`
252
+ # @return [String]
253
+ attr_accessor :kind
254
+
255
+ def initialize(**args)
256
+ update!(**args)
257
+ end
258
+
259
+ # Update properties of this object
260
+ def update!(**args)
261
+ @account_id = args[:account_id] unless args[:account_id].nil?
262
+ @billing_id = args[:billing_id] unless args[:billing_id].nil?
263
+ @budget_amount = args[:budget_amount] unless args[:budget_amount].nil?
264
+ @currency_code = args[:currency_code] unless args[:currency_code].nil?
265
+ @id = args[:id] unless args[:id].nil?
266
+ @kind = args[:kind] unless args[:kind].nil?
267
+ end
268
+ end
269
+
270
+ # A creative and its classification data.
271
+ class Creative
272
+ include Google::Apis::Core::Hashable
273
+
274
+ # The HTML snippet that displays the ad when inserted in the web page. If set,
275
+ # videoURL should not be set.
276
+ # Corresponds to the JSON property `HTMLSnippet`
277
+ # @return [String]
278
+ attr_accessor :html_snippet
279
+
280
+ # Account id.
281
+ # Corresponds to the JSON property `accountId`
282
+ # @return [Fixnum]
283
+ attr_accessor :account_id
284
+
285
+ # Detected advertiser id, if any. Read-only. This field should not be set in
286
+ # requests.
287
+ # Corresponds to the JSON property `advertiserId`
288
+ # @return [Array<String>]
289
+ attr_accessor :advertiser_id
290
+
291
+ # The name of the company being advertised in the creative.
292
+ # Corresponds to the JSON property `advertiserName`
293
+ # @return [String]
294
+ attr_accessor :advertiser_name
295
+
296
+ # The agency id for this creative.
297
+ # Corresponds to the JSON property `agencyId`
298
+ # @return [String]
299
+ attr_accessor :agency_id
300
+
301
+ # All attributes for the ads that may be shown from this snippet.
302
+ # Corresponds to the JSON property `attribute`
303
+ # @return [Array<Fixnum>]
304
+ attr_accessor :attribute
305
+
306
+ # A buyer-specific id identifying the creative in this ad.
307
+ # Corresponds to the JSON property `buyerCreativeId`
308
+ # @return [String]
309
+ attr_accessor :buyer_creative_id
310
+
311
+ # The set of destination urls for the snippet.
312
+ # Corresponds to the JSON property `clickThroughUrl`
313
+ # @return [Array<String>]
314
+ attr_accessor :click_through_url
315
+
316
+ # Shows any corrections that were applied to this creative. Read-only. This
317
+ # field should not be set in requests.
318
+ # Corresponds to the JSON property `corrections`
319
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Creative::Correction>]
320
+ attr_accessor :corrections
321
+
322
+ # The reasons for disapproval, if any. Note that not all disapproval reasons may
323
+ # be categorized, so it is possible for the creative to have a status of
324
+ # DISAPPROVED with an empty list for disapproval_reasons. In this case, please
325
+ # reach out to your TAM to help debug the issue. Read-only. This field should
326
+ # not be set in requests.
327
+ # Corresponds to the JSON property `disapprovalReasons`
328
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Creative::DisapprovalReason>]
329
+ attr_accessor :disapproval_reasons
330
+
331
+ # The filtering reasons for the creative. Read-only. This field should not be
332
+ # set in requests.
333
+ # Corresponds to the JSON property `filteringReasons`
334
+ # @return [Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons]
335
+ attr_accessor :filtering_reasons
336
+
337
+ # Ad height.
338
+ # Corresponds to the JSON property `height`
339
+ # @return [Fixnum]
340
+ attr_accessor :height
341
+
342
+ # Resource type.
343
+ # Corresponds to the JSON property `kind`
344
+ # @return [String]
345
+ attr_accessor :kind
346
+
347
+ # Detected product categories, if any. Read-only. This field should not be set
348
+ # in requests.
349
+ # Corresponds to the JSON property `productCategories`
350
+ # @return [Array<Fixnum>]
351
+ attr_accessor :product_categories
352
+
353
+ # All restricted categories for the ads that may be shown from this snippet.
354
+ # Corresponds to the JSON property `restrictedCategories`
355
+ # @return [Array<Fixnum>]
356
+ attr_accessor :restricted_categories
357
+
358
+ # Detected sensitive categories, if any. Read-only. This field should not be set
359
+ # in requests.
360
+ # Corresponds to the JSON property `sensitiveCategories`
361
+ # @return [Array<Fixnum>]
362
+ attr_accessor :sensitive_categories
363
+
364
+ # Creative serving status. Read-only. This field should not be set in requests.
365
+ # Corresponds to the JSON property `status`
366
+ # @return [String]
367
+ attr_accessor :status
368
+
369
+ # All vendor types for the ads that may be shown from this snippet.
370
+ # Corresponds to the JSON property `vendorType`
371
+ # @return [Array<Fixnum>]
372
+ attr_accessor :vendor_type
373
+
374
+ # The url to fetch a video ad. If set, HTMLSnippet should not be set.
375
+ # Corresponds to the JSON property `videoURL`
376
+ # @return [String]
377
+ attr_accessor :video_url
378
+
379
+ # Ad width.
380
+ # Corresponds to the JSON property `width`
381
+ # @return [Fixnum]
382
+ attr_accessor :width
383
+
384
+ def initialize(**args)
385
+ update!(**args)
386
+ end
387
+
388
+ # Update properties of this object
389
+ def update!(**args)
390
+ @html_snippet = args[:html_snippet] unless args[:html_snippet].nil?
391
+ @account_id = args[:account_id] unless args[:account_id].nil?
392
+ @advertiser_id = args[:advertiser_id] unless args[:advertiser_id].nil?
393
+ @advertiser_name = args[:advertiser_name] unless args[:advertiser_name].nil?
394
+ @agency_id = args[:agency_id] unless args[:agency_id].nil?
395
+ @attribute = args[:attribute] unless args[:attribute].nil?
396
+ @buyer_creative_id = args[:buyer_creative_id] unless args[:buyer_creative_id].nil?
397
+ @click_through_url = args[:click_through_url] unless args[:click_through_url].nil?
398
+ @corrections = args[:corrections] unless args[:corrections].nil?
399
+ @disapproval_reasons = args[:disapproval_reasons] unless args[:disapproval_reasons].nil?
400
+ @filtering_reasons = args[:filtering_reasons] unless args[:filtering_reasons].nil?
401
+ @height = args[:height] unless args[:height].nil?
402
+ @kind = args[:kind] unless args[:kind].nil?
403
+ @product_categories = args[:product_categories] unless args[:product_categories].nil?
404
+ @restricted_categories = args[:restricted_categories] unless args[:restricted_categories].nil?
405
+ @sensitive_categories = args[:sensitive_categories] unless args[:sensitive_categories].nil?
406
+ @status = args[:status] unless args[:status].nil?
407
+ @vendor_type = args[:vendor_type] unless args[:vendor_type].nil?
408
+ @video_url = args[:video_url] unless args[:video_url].nil?
409
+ @width = args[:width] unless args[:width].nil?
410
+ end
411
+
412
+ #
413
+ class Correction
414
+ include Google::Apis::Core::Hashable
415
+
416
+ # Additional details about the correction.
417
+ # Corresponds to the JSON property `details`
418
+ # @return [Array<String>]
419
+ attr_accessor :details
420
+
421
+ # The type of correction that was applied to the creative.
422
+ # Corresponds to the JSON property `reason`
423
+ # @return [String]
424
+ attr_accessor :reason
425
+
426
+ def initialize(**args)
427
+ update!(**args)
428
+ end
429
+
430
+ # Update properties of this object
431
+ def update!(**args)
432
+ @details = args[:details] unless args[:details].nil?
433
+ @reason = args[:reason] unless args[:reason].nil?
434
+ end
435
+ end
436
+
437
+ #
438
+ class DisapprovalReason
439
+ include Google::Apis::Core::Hashable
440
+
441
+ # Additional details about the reason for disapproval.
442
+ # Corresponds to the JSON property `details`
443
+ # @return [Array<String>]
444
+ attr_accessor :details
445
+
446
+ # The categorized reason for disapproval.
447
+ # Corresponds to the JSON property `reason`
448
+ # @return [String]
449
+ attr_accessor :reason
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @details = args[:details] unless args[:details].nil?
458
+ @reason = args[:reason] unless args[:reason].nil?
459
+ end
460
+ end
461
+
462
+ # The filtering reasons for the creative. Read-only. This field should not be
463
+ # set in requests.
464
+ class FilteringReasons
465
+ include Google::Apis::Core::Hashable
466
+
467
+ # The date in ISO 8601 format for the data. The data is collected from 00:00:00
468
+ # to 23:59:59 in PST.
469
+ # Corresponds to the JSON property `date`
470
+ # @return [String]
471
+ attr_accessor :date
472
+
473
+ # The filtering reasons.
474
+ # Corresponds to the JSON property `reasons`
475
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Creative::FilteringReasons::Reason>]
476
+ attr_accessor :reasons
477
+
478
+ def initialize(**args)
479
+ update!(**args)
480
+ end
481
+
482
+ # Update properties of this object
483
+ def update!(**args)
484
+ @date = args[:date] unless args[:date].nil?
485
+ @reasons = args[:reasons] unless args[:reasons].nil?
486
+ end
487
+
488
+ #
489
+ class Reason
490
+ include Google::Apis::Core::Hashable
491
+
492
+ # The number of times the creative was filtered for the status. The count is
493
+ # aggregated across all publishers on the exchange.
494
+ # Corresponds to the JSON property `filteringCount`
495
+ # @return [String]
496
+ attr_accessor :filtering_count
497
+
498
+ # The filtering status code. Please refer to the creative-status-codes.txt file
499
+ # for different statuses.
500
+ # Corresponds to the JSON property `filteringStatus`
501
+ # @return [Fixnum]
502
+ attr_accessor :filtering_status
503
+
504
+ def initialize(**args)
505
+ update!(**args)
506
+ end
507
+
508
+ # Update properties of this object
509
+ def update!(**args)
510
+ @filtering_count = args[:filtering_count] unless args[:filtering_count].nil?
511
+ @filtering_status = args[:filtering_status] unless args[:filtering_status].nil?
512
+ end
513
+ end
514
+ end
515
+ end
516
+
517
+ # The creatives feed lists the active creatives for the Ad Exchange buyer
518
+ # accounts that the user has access to. Each entry in the feed corresponds to a
519
+ # single creative.
520
+ class CreativesList
521
+ include Google::Apis::Core::Hashable
522
+
523
+ # A list of creatives.
524
+ # Corresponds to the JSON property `items`
525
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::Creative>]
526
+ attr_accessor :items
527
+
528
+ # Resource type.
529
+ # Corresponds to the JSON property `kind`
530
+ # @return [String]
531
+ attr_accessor :kind
532
+
533
+ # Continuation token used to page through creatives. To retrieve the next page
534
+ # of results, set the next request's "pageToken" value to this.
535
+ # Corresponds to the JSON property `nextPageToken`
536
+ # @return [String]
537
+ attr_accessor :next_page_token
538
+
539
+ def initialize(**args)
540
+ update!(**args)
541
+ end
542
+
543
+ # Update properties of this object
544
+ def update!(**args)
545
+ @items = args[:items] unless args[:items].nil?
546
+ @kind = args[:kind] unless args[:kind].nil?
547
+ @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
548
+ end
549
+ end
550
+
551
+ # The configuration data for an Ad Exchange direct deal.
552
+ class DirectDeal
553
+ include Google::Apis::Core::Hashable
554
+
555
+ # The account id of the buyer this deal is for.
556
+ # Corresponds to the JSON property `accountId`
557
+ # @return [Fixnum]
558
+ attr_accessor :account_id
559
+
560
+ # The name of the advertiser this deal is for.
561
+ # Corresponds to the JSON property `advertiser`
562
+ # @return [String]
563
+ attr_accessor :advertiser
564
+
565
+ # The currency code that applies to the fixed_cpm value. If not set then assumed
566
+ # to be USD.
567
+ # Corresponds to the JSON property `currencyCode`
568
+ # @return [String]
569
+ attr_accessor :currency_code
570
+
571
+ # End time for when this deal stops being active. If not set then this deal is
572
+ # valid until manually disabled by the publisher. In seconds since the epoch.
573
+ # Corresponds to the JSON property `endTime`
574
+ # @return [String]
575
+ attr_accessor :end_time
576
+
577
+ # The fixed price for this direct deal. In cpm micros of currency according to
578
+ # currency_code. If set, then this deal is eligible for the fixed price tier of
579
+ # buying (highest priority, pay exactly the configured fixed price).
580
+ # Corresponds to the JSON property `fixedCpm`
581
+ # @return [String]
582
+ attr_accessor :fixed_cpm
583
+
584
+ # Deal id.
585
+ # Corresponds to the JSON property `id`
586
+ # @return [String]
587
+ attr_accessor :id
588
+
589
+ # Resource type.
590
+ # Corresponds to the JSON property `kind`
591
+ # @return [String]
592
+ attr_accessor :kind
593
+
594
+ # Deal name.
595
+ # Corresponds to the JSON property `name`
596
+ # @return [String]
597
+ attr_accessor :name
598
+
599
+ # The minimum price for this direct deal. In cpm micros of currency according to
600
+ # currency_code. If set, then this deal is eligible for the private exchange
601
+ # tier of buying (below fixed price priority, run as a second price auction).
602
+ # Corresponds to the JSON property `privateExchangeMinCpm`
603
+ # @return [String]
604
+ attr_accessor :private_exchange_min_cpm
605
+
606
+ # If true, the publisher has opted to have their blocks ignored when a creative
607
+ # is bid with for this deal.
608
+ # Corresponds to the JSON property `publisherBlocksOverriden`
609
+ # @return [Boolean]
610
+ attr_accessor :publisher_blocks_overriden
611
+ alias_method :publisher_blocks_overriden?, :publisher_blocks_overriden
612
+
613
+ # The name of the publisher offering this direct deal.
614
+ # Corresponds to the JSON property `sellerNetwork`
615
+ # @return [String]
616
+ attr_accessor :seller_network
617
+
618
+ # Start time for when this deal becomes active. If not set then this deal is
619
+ # active immediately upon creation. In seconds since the epoch.
620
+ # Corresponds to the JSON property `startTime`
621
+ # @return [String]
622
+ attr_accessor :start_time
623
+
624
+ def initialize(**args)
625
+ update!(**args)
626
+ end
627
+
628
+ # Update properties of this object
629
+ def update!(**args)
630
+ @account_id = args[:account_id] unless args[:account_id].nil?
631
+ @advertiser = args[:advertiser] unless args[:advertiser].nil?
632
+ @currency_code = args[:currency_code] unless args[:currency_code].nil?
633
+ @end_time = args[:end_time] unless args[:end_time].nil?
634
+ @fixed_cpm = args[:fixed_cpm] unless args[:fixed_cpm].nil?
635
+ @id = args[:id] unless args[:id].nil?
636
+ @kind = args[:kind] unless args[:kind].nil?
637
+ @name = args[:name] unless args[:name].nil?
638
+ @private_exchange_min_cpm = args[:private_exchange_min_cpm] unless args[:private_exchange_min_cpm].nil?
639
+ @publisher_blocks_overriden = args[:publisher_blocks_overriden] unless args[:publisher_blocks_overriden].nil?
640
+ @seller_network = args[:seller_network] unless args[:seller_network].nil?
641
+ @start_time = args[:start_time] unless args[:start_time].nil?
642
+ end
643
+ end
644
+
645
+ # A direct deals feed lists Direct Deals the Ad Exchange buyer account has
646
+ # access to. This includes direct deals set up for the buyer account as well as
647
+ # its merged stream seats.
648
+ class DirectDealsList
649
+ include Google::Apis::Core::Hashable
650
+
651
+ # A list of direct deals relevant for your account.
652
+ # Corresponds to the JSON property `directDeals`
653
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::DirectDeal>]
654
+ attr_accessor :direct_deals
655
+
656
+ # Resource type.
657
+ # Corresponds to the JSON property `kind`
658
+ # @return [String]
659
+ attr_accessor :kind
660
+
661
+ def initialize(**args)
662
+ update!(**args)
663
+ end
664
+
665
+ # Update properties of this object
666
+ def update!(**args)
667
+ @direct_deals = args[:direct_deals] unless args[:direct_deals].nil?
668
+ @kind = args[:kind] unless args[:kind].nil?
669
+ end
670
+ end
671
+
672
+ # The configuration data for an Ad Exchange performance report list.
673
+ class PerformanceReport
674
+ include Google::Apis::Core::Hashable
675
+
676
+ # The number of bid responses with an ad.
677
+ # Corresponds to the JSON property `bidRate`
678
+ # @return [Float]
679
+ attr_accessor :bid_rate
680
+
681
+ # The number of bid requests sent to your bidder.
682
+ # Corresponds to the JSON property `bidRequestRate`
683
+ # @return [Float]
684
+ attr_accessor :bid_request_rate
685
+
686
+ # Rate of various prefiltering statuses per match. Please refer to the callout-
687
+ # status-codes.txt file for different statuses.
688
+ # Corresponds to the JSON property `calloutStatusRate`
689
+ # @return [Array<Object>]
690
+ attr_accessor :callout_status_rate
691
+
692
+ # Average QPS for cookie matcher operations.
693
+ # Corresponds to the JSON property `cookieMatcherStatusRate`
694
+ # @return [Array<Object>]
695
+ attr_accessor :cookie_matcher_status_rate
696
+
697
+ # Rate of ads with a given status. Please refer to the creative-status-codes.txt
698
+ # file for different statuses.
699
+ # Corresponds to the JSON property `creativeStatusRate`
700
+ # @return [Array<Object>]
701
+ attr_accessor :creative_status_rate
702
+
703
+ # The number of bid responses that were filtered due to a policy violation or
704
+ # other errors.
705
+ # Corresponds to the JSON property `filteredBidRate`
706
+ # @return [Float]
707
+ attr_accessor :filtered_bid_rate
708
+
709
+ # Average QPS for hosted match operations.
710
+ # Corresponds to the JSON property `hostedMatchStatusRate`
711
+ # @return [Array<Object>]
712
+ attr_accessor :hosted_match_status_rate
713
+
714
+ # The number of potential queries based on your pretargeting settings.
715
+ # Corresponds to the JSON property `inventoryMatchRate`
716
+ # @return [Float]
717
+ attr_accessor :inventory_match_rate
718
+
719
+ # Resource type.
720
+ # Corresponds to the JSON property `kind`
721
+ # @return [String]
722
+ attr_accessor :kind
723
+
724
+ # The 50th percentile round trip latency(ms) as perceived from Google servers
725
+ # for the duration period covered by the report.
726
+ # Corresponds to the JSON property `latency50thPercentile`
727
+ # @return [Float]
728
+ attr_accessor :latency_50th_percentile
729
+
730
+ # The 85th percentile round trip latency(ms) as perceived from Google servers
731
+ # for the duration period covered by the report.
732
+ # Corresponds to the JSON property `latency85thPercentile`
733
+ # @return [Float]
734
+ attr_accessor :latency_85th_percentile
735
+
736
+ # The 95th percentile round trip latency(ms) as perceived from Google servers
737
+ # for the duration period covered by the report.
738
+ # Corresponds to the JSON property `latency95thPercentile`
739
+ # @return [Float]
740
+ attr_accessor :latency_95th_percentile
741
+
742
+ # Rate of various quota account statuses per quota check.
743
+ # Corresponds to the JSON property `noQuotaInRegion`
744
+ # @return [Float]
745
+ attr_accessor :no_quota_in_region
746
+
747
+ # Rate of various quota account statuses per quota check.
748
+ # Corresponds to the JSON property `outOfQuota`
749
+ # @return [Float]
750
+ attr_accessor :out_of_quota
751
+
752
+ # Average QPS for pixel match requests from clients.
753
+ # Corresponds to the JSON property `pixelMatchRequests`
754
+ # @return [Float]
755
+ attr_accessor :pixel_match_requests
756
+
757
+ # Average QPS for pixel match responses from clients.
758
+ # Corresponds to the JSON property `pixelMatchResponses`
759
+ # @return [Float]
760
+ attr_accessor :pixel_match_responses
761
+
762
+ # The configured quota limits for this account.
763
+ # Corresponds to the JSON property `quotaConfiguredLimit`
764
+ # @return [Float]
765
+ attr_accessor :quota_configured_limit
766
+
767
+ # The throttled quota limits for this account.
768
+ # Corresponds to the JSON property `quotaThrottledLimit`
769
+ # @return [Float]
770
+ attr_accessor :quota_throttled_limit
771
+
772
+ # The trading location of this data.
773
+ # Corresponds to the JSON property `region`
774
+ # @return [String]
775
+ attr_accessor :region
776
+
777
+ # The number of properly formed bid responses received by our servers within the
778
+ # deadline.
779
+ # Corresponds to the JSON property `successfulRequestRate`
780
+ # @return [Float]
781
+ attr_accessor :successful_request_rate
782
+
783
+ # The unix timestamp of the starting time of this performance data.
784
+ # Corresponds to the JSON property `timestamp`
785
+ # @return [String]
786
+ attr_accessor :timestamp
787
+
788
+ # The number of bid responses that were unsuccessful due to timeouts, incorrect
789
+ # formatting, etc.
790
+ # Corresponds to the JSON property `unsuccessfulRequestRate`
791
+ # @return [Float]
792
+ attr_accessor :unsuccessful_request_rate
793
+
794
+ def initialize(**args)
795
+ update!(**args)
796
+ end
797
+
798
+ # Update properties of this object
799
+ def update!(**args)
800
+ @bid_rate = args[:bid_rate] unless args[:bid_rate].nil?
801
+ @bid_request_rate = args[:bid_request_rate] unless args[:bid_request_rate].nil?
802
+ @callout_status_rate = args[:callout_status_rate] unless args[:callout_status_rate].nil?
803
+ @cookie_matcher_status_rate = args[:cookie_matcher_status_rate] unless args[:cookie_matcher_status_rate].nil?
804
+ @creative_status_rate = args[:creative_status_rate] unless args[:creative_status_rate].nil?
805
+ @filtered_bid_rate = args[:filtered_bid_rate] unless args[:filtered_bid_rate].nil?
806
+ @hosted_match_status_rate = args[:hosted_match_status_rate] unless args[:hosted_match_status_rate].nil?
807
+ @inventory_match_rate = args[:inventory_match_rate] unless args[:inventory_match_rate].nil?
808
+ @kind = args[:kind] unless args[:kind].nil?
809
+ @latency_50th_percentile = args[:latency_50th_percentile] unless args[:latency_50th_percentile].nil?
810
+ @latency_85th_percentile = args[:latency_85th_percentile] unless args[:latency_85th_percentile].nil?
811
+ @latency_95th_percentile = args[:latency_95th_percentile] unless args[:latency_95th_percentile].nil?
812
+ @no_quota_in_region = args[:no_quota_in_region] unless args[:no_quota_in_region].nil?
813
+ @out_of_quota = args[:out_of_quota] unless args[:out_of_quota].nil?
814
+ @pixel_match_requests = args[:pixel_match_requests] unless args[:pixel_match_requests].nil?
815
+ @pixel_match_responses = args[:pixel_match_responses] unless args[:pixel_match_responses].nil?
816
+ @quota_configured_limit = args[:quota_configured_limit] unless args[:quota_configured_limit].nil?
817
+ @quota_throttled_limit = args[:quota_throttled_limit] unless args[:quota_throttled_limit].nil?
818
+ @region = args[:region] unless args[:region].nil?
819
+ @successful_request_rate = args[:successful_request_rate] unless args[:successful_request_rate].nil?
820
+ @timestamp = args[:timestamp] unless args[:timestamp].nil?
821
+ @unsuccessful_request_rate = args[:unsuccessful_request_rate] unless args[:unsuccessful_request_rate].nil?
822
+ end
823
+ end
824
+
825
+ # The configuration data for an Ad Exchange performance report list. https://
826
+ # sites.google.com/a/google.com/adx-integration/Home/engineering/binary-releases/
827
+ # rtb-api-release https://cs.corp.google.com/#piper///depot/google3/contentads/
828
+ # adx/tools/rtb_api/adxrtb.py
829
+ class PerformanceReportList
830
+ include Google::Apis::Core::Hashable
831
+
832
+ # Resource type.
833
+ # Corresponds to the JSON property `kind`
834
+ # @return [String]
835
+ attr_accessor :kind
836
+
837
+ # A list of performance reports relevant for the account.
838
+ # Corresponds to the JSON property `performanceReport`
839
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::PerformanceReport>]
840
+ attr_accessor :performance_report
841
+
842
+ def initialize(**args)
843
+ update!(**args)
844
+ end
845
+
846
+ # Update properties of this object
847
+ def update!(**args)
848
+ @kind = args[:kind] unless args[:kind].nil?
849
+ @performance_report = args[:performance_report] unless args[:performance_report].nil?
850
+ end
851
+ end
852
+
853
+ #
854
+ class PretargetingConfig
855
+ include Google::Apis::Core::Hashable
856
+
857
+ # The id for billing purposes, provided for reference. Leave this field blank
858
+ # for insert requests; the id will be generated automatically.
859
+ # Corresponds to the JSON property `billingId`
860
+ # @return [String]
861
+ attr_accessor :billing_id
862
+
863
+ # The config id; generated automatically. Leave this field blank for insert
864
+ # requests.
865
+ # Corresponds to the JSON property `configId`
866
+ # @return [String]
867
+ attr_accessor :config_id
868
+
869
+ # The name of the config. Must be unique. Required for all requests.
870
+ # Corresponds to the JSON property `configName`
871
+ # @return [String]
872
+ attr_accessor :config_name
873
+
874
+ # List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or
875
+ # PRETARGETING_CREATIVE_TYPE_VIDEO.
876
+ # Corresponds to the JSON property `creativeType`
877
+ # @return [Array<String>]
878
+ attr_accessor :creative_type
879
+
880
+ # Requests which allow one of these (width, height) pairs will match. All pairs
881
+ # must be supported ad dimensions.
882
+ # Corresponds to the JSON property `dimensions`
883
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Dimension>]
884
+ attr_accessor :dimensions
885
+
886
+ # Requests with any of these content labels will not match. Values are from
887
+ # content-labels.txt in the downloadable files section.
888
+ # Corresponds to the JSON property `excludedContentLabels`
889
+ # @return [Array<String>]
890
+ attr_accessor :excluded_content_labels
891
+
892
+ # Requests containing any of these geo criteria ids will not match.
893
+ # Corresponds to the JSON property `excludedGeoCriteriaIds`
894
+ # @return [Array<String>]
895
+ attr_accessor :excluded_geo_criteria_ids
896
+
897
+ # Requests containing any of these placements will not match.
898
+ # Corresponds to the JSON property `excludedPlacements`
899
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::ExcludedPlacement>]
900
+ attr_accessor :excluded_placements
901
+
902
+ # Requests containing any of these users list ids will not match.
903
+ # Corresponds to the JSON property `excludedUserLists`
904
+ # @return [Array<String>]
905
+ attr_accessor :excluded_user_lists
906
+
907
+ # Requests containing any of these vertical ids will not match. Values are from
908
+ # the publisher-verticals.txt file in the downloadable files section.
909
+ # Corresponds to the JSON property `excludedVerticals`
910
+ # @return [Array<String>]
911
+ attr_accessor :excluded_verticals
912
+
913
+ # Requests containing any of these geo criteria ids will match.
914
+ # Corresponds to the JSON property `geoCriteriaIds`
915
+ # @return [Array<String>]
916
+ attr_accessor :geo_criteria_ids
917
+
918
+ # Whether this config is active. Required for all requests.
919
+ # Corresponds to the JSON property `isActive`
920
+ # @return [Boolean]
921
+ attr_accessor :is_active
922
+ alias_method :is_active?, :is_active
923
+
924
+ # The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig".
925
+ # Corresponds to the JSON property `kind`
926
+ # @return [String]
927
+ attr_accessor :kind
928
+
929
+ # Request containing any of these language codes will match.
930
+ # Corresponds to the JSON property `languages`
931
+ # @return [Array<String>]
932
+ attr_accessor :languages
933
+
934
+ # Requests containing any of these mobile carrier ids will match. Values are
935
+ # from mobile-carriers.csv in the downloadable files section.
936
+ # Corresponds to the JSON property `mobileCarriers`
937
+ # @return [Array<String>]
938
+ attr_accessor :mobile_carriers
939
+
940
+ # Requests containing any of these mobile device ids will match. Values are from
941
+ # mobile-devices.csv in the downloadable files section.
942
+ # Corresponds to the JSON property `mobileDevices`
943
+ # @return [Array<String>]
944
+ attr_accessor :mobile_devices
945
+
946
+ # Requests containing any of these mobile operating system version ids will
947
+ # match. Values are from mobile-os.csv in the downloadable files section.
948
+ # Corresponds to the JSON property `mobileOperatingSystemVersions`
949
+ # @return [Array<String>]
950
+ attr_accessor :mobile_operating_system_versions
951
+
952
+ # Requests containing any of these placements will match.
953
+ # Corresponds to the JSON property `placements`
954
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::PretargetingConfig::Placement>]
955
+ attr_accessor :placements
956
+
957
+ # Requests matching any of these platforms will match. Possible values are
958
+ # PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and
959
+ # PRETARGETING_PLATFORM_TABLET.
960
+ # Corresponds to the JSON property `platforms`
961
+ # @return [Array<String>]
962
+ attr_accessor :platforms
963
+
964
+ # Creative attributes should be declared here if all creatives corresponding to
965
+ # this pretargeting configuration have that creative attribute. Values are from
966
+ # pretargetable-creative-attributes.txt in the downloadable files section.
967
+ # Corresponds to the JSON property `supportedCreativeAttributes`
968
+ # @return [Array<String>]
969
+ attr_accessor :supported_creative_attributes
970
+
971
+ # Requests containing any of these user list ids will match.
972
+ # Corresponds to the JSON property `userLists`
973
+ # @return [Array<String>]
974
+ attr_accessor :user_lists
975
+
976
+ # Requests that allow any of these vendor ids will match. Values are from
977
+ # vendors.txt in the downloadable files section.
978
+ # Corresponds to the JSON property `vendorTypes`
979
+ # @return [Array<String>]
980
+ attr_accessor :vendor_types
981
+
982
+ # Requests containing any of these vertical ids will match.
983
+ # Corresponds to the JSON property `verticals`
984
+ # @return [Array<String>]
985
+ attr_accessor :verticals
986
+
987
+ def initialize(**args)
988
+ update!(**args)
989
+ end
990
+
991
+ # Update properties of this object
992
+ def update!(**args)
993
+ @billing_id = args[:billing_id] unless args[:billing_id].nil?
994
+ @config_id = args[:config_id] unless args[:config_id].nil?
995
+ @config_name = args[:config_name] unless args[:config_name].nil?
996
+ @creative_type = args[:creative_type] unless args[:creative_type].nil?
997
+ @dimensions = args[:dimensions] unless args[:dimensions].nil?
998
+ @excluded_content_labels = args[:excluded_content_labels] unless args[:excluded_content_labels].nil?
999
+ @excluded_geo_criteria_ids = args[:excluded_geo_criteria_ids] unless args[:excluded_geo_criteria_ids].nil?
1000
+ @excluded_placements = args[:excluded_placements] unless args[:excluded_placements].nil?
1001
+ @excluded_user_lists = args[:excluded_user_lists] unless args[:excluded_user_lists].nil?
1002
+ @excluded_verticals = args[:excluded_verticals] unless args[:excluded_verticals].nil?
1003
+ @geo_criteria_ids = args[:geo_criteria_ids] unless args[:geo_criteria_ids].nil?
1004
+ @is_active = args[:is_active] unless args[:is_active].nil?
1005
+ @kind = args[:kind] unless args[:kind].nil?
1006
+ @languages = args[:languages] unless args[:languages].nil?
1007
+ @mobile_carriers = args[:mobile_carriers] unless args[:mobile_carriers].nil?
1008
+ @mobile_devices = args[:mobile_devices] unless args[:mobile_devices].nil?
1009
+ @mobile_operating_system_versions = args[:mobile_operating_system_versions] unless args[:mobile_operating_system_versions].nil?
1010
+ @placements = args[:placements] unless args[:placements].nil?
1011
+ @platforms = args[:platforms] unless args[:platforms].nil?
1012
+ @supported_creative_attributes = args[:supported_creative_attributes] unless args[:supported_creative_attributes].nil?
1013
+ @user_lists = args[:user_lists] unless args[:user_lists].nil?
1014
+ @vendor_types = args[:vendor_types] unless args[:vendor_types].nil?
1015
+ @verticals = args[:verticals] unless args[:verticals].nil?
1016
+ end
1017
+
1018
+ #
1019
+ class Dimension
1020
+ include Google::Apis::Core::Hashable
1021
+
1022
+ # Height in pixels.
1023
+ # Corresponds to the JSON property `height`
1024
+ # @return [String]
1025
+ attr_accessor :height
1026
+
1027
+ # Width in pixels.
1028
+ # Corresponds to the JSON property `width`
1029
+ # @return [String]
1030
+ attr_accessor :width
1031
+
1032
+ def initialize(**args)
1033
+ update!(**args)
1034
+ end
1035
+
1036
+ # Update properties of this object
1037
+ def update!(**args)
1038
+ @height = args[:height] unless args[:height].nil?
1039
+ @width = args[:width] unless args[:width].nil?
1040
+ end
1041
+ end
1042
+
1043
+ #
1044
+ class ExcludedPlacement
1045
+ include Google::Apis::Core::Hashable
1046
+
1047
+ # The value of the placement. Interpretation depends on the placement type, e.g.
1048
+ # URL for a site placement, channel name for a channel placement, app id for a
1049
+ # mobile app placement.
1050
+ # Corresponds to the JSON property `token`
1051
+ # @return [String]
1052
+ attr_accessor :token
1053
+
1054
+ # The type of the placement.
1055
+ # Corresponds to the JSON property `type`
1056
+ # @return [String]
1057
+ attr_accessor :type
1058
+
1059
+ def initialize(**args)
1060
+ update!(**args)
1061
+ end
1062
+
1063
+ # Update properties of this object
1064
+ def update!(**args)
1065
+ @token = args[:token] unless args[:token].nil?
1066
+ @type = args[:type] unless args[:type].nil?
1067
+ end
1068
+ end
1069
+
1070
+ #
1071
+ class Placement
1072
+ include Google::Apis::Core::Hashable
1073
+
1074
+ # The value of the placement. Interpretation depends on the placement type, e.g.
1075
+ # URL for a site placement, channel name for a channel placement, app id for a
1076
+ # mobile app placement.
1077
+ # Corresponds to the JSON property `token`
1078
+ # @return [String]
1079
+ attr_accessor :token
1080
+
1081
+ # The type of the placement.
1082
+ # Corresponds to the JSON property `type`
1083
+ # @return [String]
1084
+ attr_accessor :type
1085
+
1086
+ def initialize(**args)
1087
+ update!(**args)
1088
+ end
1089
+
1090
+ # Update properties of this object
1091
+ def update!(**args)
1092
+ @token = args[:token] unless args[:token].nil?
1093
+ @type = args[:type] unless args[:type].nil?
1094
+ end
1095
+ end
1096
+ end
1097
+
1098
+ #
1099
+ class PretargetingConfigList
1100
+ include Google::Apis::Core::Hashable
1101
+
1102
+ # A list of pretargeting configs
1103
+ # Corresponds to the JSON property `items`
1104
+ # @return [Array<Google::Apis::AdexchangebuyerV1_3::PretargetingConfig>]
1105
+ attr_accessor :items
1106
+
1107
+ # Resource type.
1108
+ # Corresponds to the JSON property `kind`
1109
+ # @return [String]
1110
+ attr_accessor :kind
1111
+
1112
+ def initialize(**args)
1113
+ update!(**args)
1114
+ end
1115
+
1116
+ # Update properties of this object
1117
+ def update!(**args)
1118
+ @items = args[:items] unless args[:items].nil?
1119
+ @kind = args[:kind] unless args[:kind].nil?
1120
+ end
1121
+ end
1122
+ end
1123
+ end
1124
+ end