google-api-client 0.8.6 → 0.9

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 (497) 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 +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +41 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +32 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -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 +668 -0
  25. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  26. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  27. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  28. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  29. data/generated/google/apis/admin_directory_v1.rb +113 -0
  30. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  31. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  32. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  33. data/generated/google/apis/admin_reports_v1.rb +38 -0
  34. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  35. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  36. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  37. data/generated/google/apis/adsense_v1_4.rb +38 -0
  38. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  39. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  40. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  41. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  42. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  43. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  44. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  45. data/generated/google/apis/analytics_v3.rb +49 -0
  46. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  47. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  48. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  49. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  50. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  51. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  52. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  53. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  54. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  55. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  56. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  57. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  58. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  59. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  60. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  61. data/generated/google/apis/appsactivity_v1.rb +46 -0
  62. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  63. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  64. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  65. data/generated/google/apis/appstate_v1.rb +34 -0
  66. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  67. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  68. data/generated/google/apis/appstate_v1/service.rb +260 -0
  69. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  70. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  71. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  72. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  73. data/generated/google/apis/bigquery_v2.rb +52 -0
  74. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  75. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  76. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  77. data/generated/google/apis/blogger_v3.rb +37 -0
  78. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  79. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  80. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  81. data/generated/google/apis/books_v1.rb +34 -0
  82. data/generated/google/apis/books_v1/classes.rb +3956 -0
  83. data/generated/google/apis/books_v1/representations.rb +1538 -0
  84. data/generated/google/apis/books_v1/service.rb +2290 -0
  85. data/generated/google/apis/calendar_v3.rb +37 -0
  86. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  87. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  88. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  89. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  90. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  91. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  92. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  93. data/generated/google/apis/classroom_v1.rb +49 -0
  94. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  95. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  96. data/generated/google/apis/classroom_v1/service.rb +970 -0
  97. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  98. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  99. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  100. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  101. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  102. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  103. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  104. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  105. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  106. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  107. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  108. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  117. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  118. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  119. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  120. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  121. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  122. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  123. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  124. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  125. data/generated/google/apis/compute_beta.rb +49 -0
  126. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  127. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  128. data/generated/google/apis/compute_beta/service.rb +10154 -0
  129. data/generated/google/apis/compute_v1.rb +49 -0
  130. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  131. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  132. data/generated/google/apis/compute_v1/service.rb +9252 -0
  133. data/generated/google/apis/container_v1.rb +35 -0
  134. data/generated/google/apis/container_v1/classes.rb +463 -0
  135. data/generated/google/apis/container_v1/representations.rb +175 -0
  136. data/generated/google/apis/container_v1/service.rb +367 -0
  137. data/generated/google/apis/container_v1beta1.rb +35 -0
  138. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  139. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  140. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  141. data/generated/google/apis/content_v2.rb +35 -0
  142. data/generated/google/apis/content_v2/classes.rb +5986 -0
  143. data/generated/google/apis/content_v2/representations.rb +2288 -0
  144. data/generated/google/apis/content_v2/service.rb +2338 -0
  145. data/generated/google/apis/coordinate_v1.rb +37 -0
  146. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  147. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  148. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  149. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  150. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  151. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  152. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  153. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  154. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  155. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  156. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  157. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  158. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  159. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  160. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  165. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  166. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  167. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  168. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  169. data/generated/google/apis/discovery_v1.rb +32 -0
  170. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  171. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  172. data/generated/google/apis/discovery_v1/service.rb +142 -0
  173. data/generated/google/apis/dns_v1.rb +44 -0
  174. data/generated/google/apis/dns_v1/classes.rb +406 -0
  175. data/generated/google/apis/dns_v1/representations.rb +151 -0
  176. data/generated/google/apis/dns_v1/service.rb +454 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  181. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  182. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  183. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  184. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  185. data/generated/google/apis/drive_v2.rb +58 -0
  186. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  187. data/generated/google/apis/drive_v2/representations.rb +795 -0
  188. data/generated/google/apis/drive_v2/service.rb +2696 -0
  189. data/generated/google/apis/drive_v3.rb +55 -0
  190. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  191. data/generated/google/apis/drive_v3/representations.rb +497 -0
  192. data/generated/google/apis/drive_v3/service.rb +1541 -0
  193. data/generated/google/apis/fitness_v1.rb +49 -0
  194. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  195. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  196. data/generated/google/apis/fitness_v1/service.rb +675 -0
  197. data/generated/google/apis/fusiontables_v2.rb +37 -0
  198. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  199. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  200. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  201. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  202. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  203. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  204. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  205. data/generated/google/apis/games_management_v1management.rb +37 -0
  206. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  207. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  208. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  209. data/generated/google/apis/games_v1.rb +40 -0
  210. data/generated/google/apis/games_v1/classes.rb +4617 -0
  211. data/generated/google/apis/games_v1/representations.rb +1584 -0
  212. data/generated/google/apis/games_v1/service.rb +2290 -0
  213. data/generated/google/apis/gan_v1beta1.rb +31 -0
  214. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  215. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  216. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  217. data/generated/google/apis/genomics_v1.rb +49 -0
  218. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  219. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  220. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  221. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  222. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  223. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  224. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  225. data/generated/google/apis/gmail_v1.rb +52 -0
  226. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  227. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  228. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  229. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  230. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  231. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  232. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  233. data/generated/google/apis/groupssettings_v1.rb +34 -0
  234. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  235. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  236. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  237. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  238. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  239. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  240. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  241. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  242. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  243. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  244. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  245. data/generated/google/apis/licensing_v1.rb +34 -0
  246. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  247. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  248. data/generated/google/apis/licensing_v1/service.rb +369 -0
  249. data/generated/google/apis/logging_v1beta3.rb +47 -0
  250. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  251. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  252. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  253. data/generated/google/apis/manager_v1beta2.rb +53 -0
  254. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  255. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  256. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  257. data/generated/google/apis/mapsengine_v1.rb +38 -0
  258. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  259. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  260. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  261. data/generated/google/apis/mirror_v1.rb +37 -0
  262. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  263. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  264. data/generated/google/apis/mirror_v1/service.rb +977 -0
  265. data/generated/google/apis/oauth2_v2.rb +43 -0
  266. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  267. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  268. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  269. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  270. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  271. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  272. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  273. data/generated/google/apis/partners_v2.rb +32 -0
  274. data/generated/google/apis/partners_v2/classes.rb +942 -0
  275. data/generated/google/apis/partners_v2/representations.rb +402 -0
  276. data/generated/google/apis/partners_v2/service.rb +400 -0
  277. data/generated/google/apis/plus_domains_v1.rb +61 -0
  278. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  279. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  280. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  281. data/generated/google/apis/plus_v1.rb +43 -0
  282. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  283. data/generated/google/apis/plus_v1/representations.rb +805 -0
  284. data/generated/google/apis/plus_v1/service.rb +470 -0
  285. data/generated/google/apis/prediction_v1_6.rb +44 -0
  286. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  287. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  288. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  293. data/generated/google/apis/pubsub_v1.rb +37 -0
  294. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  295. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  296. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  297. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  298. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  299. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  300. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  301. data/generated/google/apis/qpx_express_v1.rb +31 -0
  302. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  303. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  304. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  305. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  306. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  307. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  308. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  313. data/generated/google/apis/reseller_v1.rb +37 -0
  314. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  315. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  316. data/generated/google/apis/reseller_v1/service.rb +623 -0
  317. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  318. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  319. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  320. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  321. data/generated/google/apis/script_v1.rb +61 -0
  322. data/generated/google/apis/script_v1/classes.rb +259 -0
  323. data/generated/google/apis/script_v1/representations.rb +106 -0
  324. data/generated/google/apis/script_v1/service.rb +98 -0
  325. data/generated/google/apis/site_verification_v1.rb +37 -0
  326. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  327. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  328. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  329. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  330. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  331. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  332. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  333. data/generated/google/apis/storage_v1.rb +46 -0
  334. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  335. data/generated/google/apis/storage_v1/representations.rb +445 -0
  336. data/generated/google/apis/storage_v1/service.rb +1903 -0
  337. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  338. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  339. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  340. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  341. data/generated/google/apis/tagmanager_v1.rb +52 -0
  342. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  343. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  344. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  345. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  346. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  347. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  348. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  349. data/generated/google/apis/tasks_v1.rb +37 -0
  350. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  351. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  352. data/generated/google/apis/tasks_v1/service.rb +643 -0
  353. data/generated/google/apis/translate_v2.rb +31 -0
  354. data/generated/google/apis/translate_v2/classes.rb +168 -0
  355. data/generated/google/apis/translate_v2/representations.rb +109 -0
  356. data/generated/google/apis/translate_v2/service.rb +182 -0
  357. data/generated/google/apis/urlshortener_v1.rb +34 -0
  358. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  359. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  360. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  361. data/generated/google/apis/webmasters_v3.rb +37 -0
  362. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  363. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  364. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  365. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  366. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  367. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  368. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  369. data/generated/google/apis/youtube_v3.rb +49 -0
  370. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  371. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  372. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  373. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  374. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  375. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  376. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +1 -0
  380. data/lib/google/api_client/auth/storage.rb +4 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis.rb +48 -0
  385. data/lib/google/apis/core/api_command.rb +135 -0
  386. data/lib/google/apis/core/base_service.rb +317 -0
  387. data/lib/google/apis/core/batch.rb +239 -0
  388. data/lib/google/apis/core/download.rb +94 -0
  389. data/lib/google/apis/core/hashable.rb +44 -0
  390. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  391. data/lib/google/apis/core/http_command.rb +312 -0
  392. data/lib/google/apis/core/json_representation.rb +127 -0
  393. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  394. data/lib/google/apis/core/multipart.rb +187 -0
  395. data/lib/google/apis/core/upload.rb +288 -0
  396. data/lib/google/{api_client → apis}/errors.rb +39 -28
  397. data/lib/google/apis/generator.rb +70 -0
  398. data/lib/google/apis/generator/annotator.rb +295 -0
  399. data/lib/google/apis/generator/helpers.rb +74 -0
  400. data/lib/google/apis/generator/model.rb +143 -0
  401. data/lib/google/apis/generator/template.rb +124 -0
  402. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  403. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  404. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  405. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  406. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  407. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  408. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  409. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  410. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  411. data/lib/google/apis/options.rb +85 -0
  412. data/lib/google/apis/version.rb +39 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper.rb +131 -44
  460. data/spec/spec_helper/load_path_spec.rb +33 -0
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client.rb +0 -750
  465. data/lib/google/api_client/auth/file_storage.rb +0 -59
  466. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  467. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  468. data/lib/google/api_client/batch.rb +0 -326
  469. data/lib/google/api_client/charset.rb +0 -33
  470. data/lib/google/api_client/discovery/api.rb +0 -310
  471. data/lib/google/api_client/discovery/media.rb +0 -77
  472. data/lib/google/api_client/discovery/method.rb +0 -363
  473. data/lib/google/api_client/discovery/resource.rb +0 -156
  474. data/lib/google/api_client/discovery/schema.rb +0 -117
  475. data/lib/google/api_client/environment.rb +0 -42
  476. data/lib/google/api_client/gzip.rb +0 -28
  477. data/lib/google/api_client/logging.rb +0 -32
  478. data/lib/google/api_client/media.rb +0 -259
  479. data/lib/google/api_client/railtie.rb +0 -18
  480. data/lib/google/api_client/request.rb +0 -350
  481. data/lib/google/api_client/result.rb +0 -255
  482. data/lib/google/api_client/service.rb +0 -233
  483. data/lib/google/api_client/service/batch.rb +0 -110
  484. data/lib/google/api_client/service/request.rb +0 -144
  485. data/lib/google/api_client/service/resource.rb +0 -40
  486. data/lib/google/api_client/service/result.rb +0 -162
  487. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  488. data/lib/google/api_client/service/stub_generator.rb +0 -61
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -708
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1714 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module AdsenseV1_4
23
+ # AdSense Management API
24
+ #
25
+ # Gives AdSense publishers access to their inventory and the ability to generate
26
+ # reports
27
+ #
28
+ # @example
29
+ # require 'google/apis/adsense_v1_4'
30
+ #
31
+ # Adsense = Google::Apis::AdsenseV1_4 # Alias the module
32
+ # service = Adsense::AdSenseService.new
33
+ #
34
+ # @see https://developers.google.com/adsense/management/
35
+ class AdSenseService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ # Overrides userIp if both are provided.
45
+ attr_accessor :quota_user
46
+
47
+ # @return [String]
48
+ # IP address of the site where the request originates. Use this if you want to
49
+ # enforce per-user limits.
50
+ attr_accessor :user_ip
51
+
52
+ def initialize
53
+ super('https://www.googleapis.com/', 'adsense/v1.4/')
54
+ end
55
+
56
+ # Get information about the selected AdSense account.
57
+ # @param [String] account_id
58
+ # Account to get information about.
59
+ # @param [Boolean] tree
60
+ # Whether the tree of sub accounts should be returned.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # Overrides userIp if both are provided.
67
+ # @param [String] user_ip
68
+ # IP address of the site where the request originates. Use this if you want to
69
+ # enforce per-user limits.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Account] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::AdsenseV1_4::Account]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def get_account(account_id, tree: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
83
+ command = make_simple_command(:get, 'accounts/{accountId}', options)
84
+ command.response_representation = Google::Apis::AdsenseV1_4::Account::Representation
85
+ command.response_class = Google::Apis::AdsenseV1_4::Account
86
+ command.params['accountId'] = account_id unless account_id.nil?
87
+ command.query['tree'] = tree unless tree.nil?
88
+ command.query['fields'] = fields unless fields.nil?
89
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
90
+ command.query['userIp'] = user_ip unless user_ip.nil?
91
+ execute_or_queue_command(command, &block)
92
+ end
93
+
94
+ # List all accounts available to this AdSense account.
95
+ # @param [Fixnum] max_results
96
+ # The maximum number of accounts to include in the response, used for paging.
97
+ # @param [String] page_token
98
+ # A continuation token, used to page through accounts. To retrieve the next page,
99
+ # set this parameter to the value of "nextPageToken" from the previous response.
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # Overrides userIp if both are provided.
106
+ # @param [String] user_ip
107
+ # IP address of the site where the request originates. Use this if you want to
108
+ # enforce per-user limits.
109
+ # @param [Google::Apis::RequestOptions] options
110
+ # Request-specific options
111
+ #
112
+ # @yield [result, err] Result & error if block supplied
113
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Accounts] parsed result object
114
+ # @yieldparam err [StandardError] error object if request failed
115
+ #
116
+ # @return [Google::Apis::AdsenseV1_4::Accounts]
117
+ #
118
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
119
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
120
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
121
+ def list_accounts(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
122
+ command = make_simple_command(:get, 'accounts', options)
123
+ command.response_representation = Google::Apis::AdsenseV1_4::Accounts::Representation
124
+ command.response_class = Google::Apis::AdsenseV1_4::Accounts
125
+ command.query['maxResults'] = max_results unless max_results.nil?
126
+ command.query['pageToken'] = page_token unless page_token.nil?
127
+ command.query['fields'] = fields unless fields.nil?
128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
129
+ command.query['userIp'] = user_ip unless user_ip.nil?
130
+ execute_or_queue_command(command, &block)
131
+ end
132
+
133
+ # List all ad clients in the specified account.
134
+ # @param [String] account_id
135
+ # Account for which to list ad clients.
136
+ # @param [Fixnum] max_results
137
+ # The maximum number of ad clients to include in the response, used for paging.
138
+ # @param [String] page_token
139
+ # A continuation token, used to page through ad clients. To retrieve the next
140
+ # page, set this parameter to the value of "nextPageToken" from the previous
141
+ # response.
142
+ # @param [String] fields
143
+ # Selector specifying which fields to include in a partial response.
144
+ # @param [String] quota_user
145
+ # Available to use for quota purposes for server-side applications. Can be any
146
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
147
+ # Overrides userIp if both are provided.
148
+ # @param [String] user_ip
149
+ # IP address of the site where the request originates. Use this if you want to
150
+ # enforce per-user limits.
151
+ # @param [Google::Apis::RequestOptions] options
152
+ # Request-specific options
153
+ #
154
+ # @yield [result, err] Result & error if block supplied
155
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
156
+ # @yieldparam err [StandardError] error object if request failed
157
+ #
158
+ # @return [Google::Apis::AdsenseV1_4::AdClients]
159
+ #
160
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
161
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
162
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
163
+ def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
164
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients', options)
165
+ command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
166
+ command.response_class = Google::Apis::AdsenseV1_4::AdClients
167
+ command.params['accountId'] = account_id unless account_id.nil?
168
+ command.query['maxResults'] = max_results unless max_results.nil?
169
+ command.query['pageToken'] = page_token unless page_token.nil?
170
+ command.query['fields'] = fields unless fields.nil?
171
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
172
+ command.query['userIp'] = user_ip unless user_ip.nil?
173
+ execute_or_queue_command(command, &block)
174
+ end
175
+
176
+ # Gets the specified ad unit in the specified ad client for the specified
177
+ # account.
178
+ # @param [String] account_id
179
+ # Account to which the ad client belongs.
180
+ # @param [String] ad_client_id
181
+ # Ad client for which to get the ad unit.
182
+ # @param [String] ad_unit_id
183
+ # Ad unit to retrieve.
184
+ # @param [String] fields
185
+ # Selector specifying which fields to include in a partial response.
186
+ # @param [String] quota_user
187
+ # Available to use for quota purposes for server-side applications. Can be any
188
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
189
+ # Overrides userIp if both are provided.
190
+ # @param [String] user_ip
191
+ # IP address of the site where the request originates. Use this if you want to
192
+ # enforce per-user limits.
193
+ # @param [Google::Apis::RequestOptions] options
194
+ # Request-specific options
195
+ #
196
+ # @yield [result, err] Result & error if block supplied
197
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object
198
+ # @yieldparam err [StandardError] error object if request failed
199
+ #
200
+ # @return [Google::Apis::AdsenseV1_4::AdUnit]
201
+ #
202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
205
+ def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
206
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}', options)
207
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
208
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnit
209
+ command.params['accountId'] = account_id unless account_id.nil?
210
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
211
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
212
+ command.query['fields'] = fields unless fields.nil?
213
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
214
+ command.query['userIp'] = user_ip unless user_ip.nil?
215
+ execute_or_queue_command(command, &block)
216
+ end
217
+
218
+ # Get ad code for the specified ad unit.
219
+ # @param [String] account_id
220
+ # Account which contains the ad client.
221
+ # @param [String] ad_client_id
222
+ # Ad client with contains the ad unit.
223
+ # @param [String] ad_unit_id
224
+ # Ad unit to get the code for.
225
+ # @param [String] fields
226
+ # Selector specifying which fields to include in a partial response.
227
+ # @param [String] quota_user
228
+ # Available to use for quota purposes for server-side applications. Can be any
229
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
230
+ # Overrides userIp if both are provided.
231
+ # @param [String] user_ip
232
+ # IP address of the site where the request originates. Use this if you want to
233
+ # enforce per-user limits.
234
+ # @param [Google::Apis::RequestOptions] options
235
+ # Request-specific options
236
+ #
237
+ # @yield [result, err] Result & error if block supplied
238
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
239
+ # @yieldparam err [StandardError] error object if request failed
240
+ #
241
+ # @return [Google::Apis::AdsenseV1_4::AdCode]
242
+ #
243
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
244
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
245
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
246
+ def get_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
247
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
248
+ command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
249
+ command.response_class = Google::Apis::AdsenseV1_4::AdCode
250
+ command.params['accountId'] = account_id unless account_id.nil?
251
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
252
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
253
+ command.query['fields'] = fields unless fields.nil?
254
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
255
+ command.query['userIp'] = user_ip unless user_ip.nil?
256
+ execute_or_queue_command(command, &block)
257
+ end
258
+
259
+ # List all ad units in the specified ad client for the specified account.
260
+ # @param [String] account_id
261
+ # Account to which the ad client belongs.
262
+ # @param [String] ad_client_id
263
+ # Ad client for which to list ad units.
264
+ # @param [Boolean] include_inactive
265
+ # Whether to include inactive ad units. Default: true.
266
+ # @param [Fixnum] max_results
267
+ # The maximum number of ad units to include in the response, used for paging.
268
+ # @param [String] page_token
269
+ # A continuation token, used to page through ad units. To retrieve the next page,
270
+ # set this parameter to the value of "nextPageToken" from the previous response.
271
+ # @param [String] fields
272
+ # Selector specifying which fields to include in a partial response.
273
+ # @param [String] quota_user
274
+ # Available to use for quota purposes for server-side applications. Can be any
275
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
276
+ # Overrides userIp if both are provided.
277
+ # @param [String] user_ip
278
+ # IP address of the site where the request originates. Use this if you want to
279
+ # enforce per-user limits.
280
+ # @param [Google::Apis::RequestOptions] options
281
+ # Request-specific options
282
+ #
283
+ # @yield [result, err] Result & error if block supplied
284
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
285
+ # @yieldparam err [StandardError] error object if request failed
286
+ #
287
+ # @return [Google::Apis::AdsenseV1_4::AdUnits]
288
+ #
289
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
290
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
291
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
292
+ def list_account_ad_units(account_id, ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
293
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits', options)
294
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
295
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnits
296
+ command.params['accountId'] = account_id unless account_id.nil?
297
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
298
+ command.query['includeInactive'] = include_inactive unless include_inactive.nil?
299
+ command.query['maxResults'] = max_results unless max_results.nil?
300
+ command.query['pageToken'] = page_token unless page_token.nil?
301
+ command.query['fields'] = fields unless fields.nil?
302
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
303
+ command.query['userIp'] = user_ip unless user_ip.nil?
304
+ execute_or_queue_command(command, &block)
305
+ end
306
+
307
+ # List all custom channels which the specified ad unit belongs to.
308
+ # @param [String] account_id
309
+ # Account to which the ad client belongs.
310
+ # @param [String] ad_client_id
311
+ # Ad client which contains the ad unit.
312
+ # @param [String] ad_unit_id
313
+ # Ad unit for which to list custom channels.
314
+ # @param [Fixnum] max_results
315
+ # The maximum number of custom channels to include in the response, used for
316
+ # paging.
317
+ # @param [String] page_token
318
+ # A continuation token, used to page through custom channels. To retrieve the
319
+ # next page, set this parameter to the value of "nextPageToken" from the
320
+ # previous response.
321
+ # @param [String] fields
322
+ # Selector specifying which fields to include in a partial response.
323
+ # @param [String] quota_user
324
+ # Available to use for quota purposes for server-side applications. Can be any
325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
326
+ # Overrides userIp if both are provided.
327
+ # @param [String] user_ip
328
+ # IP address of the site where the request originates. Use this if you want to
329
+ # enforce per-user limits.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::AdsenseV1_4::CustomChannels]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def list_account_ad_unit_custom_channels(account_id, ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
343
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
344
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
345
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
346
+ command.params['accountId'] = account_id unless account_id.nil?
347
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
348
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
349
+ command.query['maxResults'] = max_results unless max_results.nil?
350
+ command.query['pageToken'] = page_token unless page_token.nil?
351
+ command.query['fields'] = fields unless fields.nil?
352
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
353
+ command.query['userIp'] = user_ip unless user_ip.nil?
354
+ execute_or_queue_command(command, &block)
355
+ end
356
+
357
+ # Dismiss (delete) the specified alert from the specified publisher AdSense
358
+ # account.
359
+ # @param [String] account_id
360
+ # Account which contains the ad unit.
361
+ # @param [String] alert_id
362
+ # Alert to delete.
363
+ # @param [String] fields
364
+ # Selector specifying which fields to include in a partial response.
365
+ # @param [String] quota_user
366
+ # Available to use for quota purposes for server-side applications. Can be any
367
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
368
+ # Overrides userIp if both are provided.
369
+ # @param [String] user_ip
370
+ # IP address of the site where the request originates. Use this if you want to
371
+ # enforce per-user limits.
372
+ # @param [Google::Apis::RequestOptions] options
373
+ # Request-specific options
374
+ #
375
+ # @yield [result, err] Result & error if block supplied
376
+ # @yieldparam result [NilClass] No result returned for this method
377
+ # @yieldparam err [StandardError] error object if request failed
378
+ #
379
+ # @return [void]
380
+ #
381
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
382
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
383
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
384
+ def delete_account_alert(account_id, alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
385
+ command = make_simple_command(:delete, 'accounts/{accountId}/alerts/{alertId}', options)
386
+ command.params['accountId'] = account_id unless account_id.nil?
387
+ command.params['alertId'] = alert_id unless alert_id.nil?
388
+ command.query['fields'] = fields unless fields.nil?
389
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
390
+ command.query['userIp'] = user_ip unless user_ip.nil?
391
+ execute_or_queue_command(command, &block)
392
+ end
393
+
394
+ # List the alerts for the specified AdSense account.
395
+ # @param [String] account_id
396
+ # Account for which to retrieve the alerts.
397
+ # @param [String] locale
398
+ # The locale to use for translating alert messages. The account locale will be
399
+ # used if this is not supplied. The AdSense default (English) will be used if
400
+ # the supplied locale is invalid or unsupported.
401
+ # @param [String] fields
402
+ # Selector specifying which fields to include in a partial response.
403
+ # @param [String] quota_user
404
+ # Available to use for quota purposes for server-side applications. Can be any
405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
406
+ # Overrides userIp if both are provided.
407
+ # @param [String] user_ip
408
+ # IP address of the site where the request originates. Use this if you want to
409
+ # enforce per-user limits.
410
+ # @param [Google::Apis::RequestOptions] options
411
+ # Request-specific options
412
+ #
413
+ # @yield [result, err] Result & error if block supplied
414
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
415
+ # @yieldparam err [StandardError] error object if request failed
416
+ #
417
+ # @return [Google::Apis::AdsenseV1_4::Alerts]
418
+ #
419
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
420
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
421
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
422
+ def list_account_alerts(account_id, locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
423
+ command = make_simple_command(:get, 'accounts/{accountId}/alerts', options)
424
+ command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
425
+ command.response_class = Google::Apis::AdsenseV1_4::Alerts
426
+ command.params['accountId'] = account_id unless account_id.nil?
427
+ command.query['locale'] = locale unless locale.nil?
428
+ command.query['fields'] = fields unless fields.nil?
429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
430
+ command.query['userIp'] = user_ip unless user_ip.nil?
431
+ execute_or_queue_command(command, &block)
432
+ end
433
+
434
+ # Get the specified custom channel from the specified ad client for the
435
+ # specified account.
436
+ # @param [String] account_id
437
+ # Account to which the ad client belongs.
438
+ # @param [String] ad_client_id
439
+ # Ad client which contains the custom channel.
440
+ # @param [String] custom_channel_id
441
+ # Custom channel to retrieve.
442
+ # @param [String] fields
443
+ # Selector specifying which fields to include in a partial response.
444
+ # @param [String] quota_user
445
+ # Available to use for quota purposes for server-side applications. Can be any
446
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
447
+ # Overrides userIp if both are provided.
448
+ # @param [String] user_ip
449
+ # IP address of the site where the request originates. Use this if you want to
450
+ # enforce per-user limits.
451
+ # @param [Google::Apis::RequestOptions] options
452
+ # Request-specific options
453
+ #
454
+ # @yield [result, err] Result & error if block supplied
455
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
456
+ # @yieldparam err [StandardError] error object if request failed
457
+ #
458
+ # @return [Google::Apis::AdsenseV1_4::CustomChannel]
459
+ #
460
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
461
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
462
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
463
+ def get_account_custom_channel(account_id, ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
464
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}', options)
465
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
466
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
467
+ command.params['accountId'] = account_id unless account_id.nil?
468
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
469
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ command.query['userIp'] = user_ip unless user_ip.nil?
473
+ execute_or_queue_command(command, &block)
474
+ end
475
+
476
+ # List all custom channels in the specified ad client for the specified account.
477
+ # @param [String] account_id
478
+ # Account to which the ad client belongs.
479
+ # @param [String] ad_client_id
480
+ # Ad client for which to list custom channels.
481
+ # @param [Fixnum] max_results
482
+ # The maximum number of custom channels to include in the response, used for
483
+ # paging.
484
+ # @param [String] page_token
485
+ # A continuation token, used to page through custom channels. To retrieve the
486
+ # next page, set this parameter to the value of "nextPageToken" from the
487
+ # previous response.
488
+ # @param [String] fields
489
+ # Selector specifying which fields to include in a partial response.
490
+ # @param [String] quota_user
491
+ # Available to use for quota purposes for server-side applications. Can be any
492
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
493
+ # Overrides userIp if both are provided.
494
+ # @param [String] user_ip
495
+ # IP address of the site where the request originates. Use this if you want to
496
+ # enforce per-user limits.
497
+ # @param [Google::Apis::RequestOptions] options
498
+ # Request-specific options
499
+ #
500
+ # @yield [result, err] Result & error if block supplied
501
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
502
+ # @yieldparam err [StandardError] error object if request failed
503
+ #
504
+ # @return [Google::Apis::AdsenseV1_4::CustomChannels]
505
+ #
506
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
507
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
508
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
509
+ def list_account_custom_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
510
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels', options)
511
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
512
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
513
+ command.params['accountId'] = account_id unless account_id.nil?
514
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
515
+ command.query['maxResults'] = max_results unless max_results.nil?
516
+ command.query['pageToken'] = page_token unless page_token.nil?
517
+ command.query['fields'] = fields unless fields.nil?
518
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
519
+ command.query['userIp'] = user_ip unless user_ip.nil?
520
+ execute_or_queue_command(command, &block)
521
+ end
522
+
523
+ # List all ad units in the specified custom channel.
524
+ # @param [String] account_id
525
+ # Account to which the ad client belongs.
526
+ # @param [String] ad_client_id
527
+ # Ad client which contains the custom channel.
528
+ # @param [String] custom_channel_id
529
+ # Custom channel for which to list ad units.
530
+ # @param [Boolean] include_inactive
531
+ # Whether to include inactive ad units. Default: true.
532
+ # @param [Fixnum] max_results
533
+ # The maximum number of ad units to include in the response, used for paging.
534
+ # @param [String] page_token
535
+ # A continuation token, used to page through ad units. To retrieve the next page,
536
+ # set this parameter to the value of "nextPageToken" from the previous response.
537
+ # @param [String] fields
538
+ # Selector specifying which fields to include in a partial response.
539
+ # @param [String] quota_user
540
+ # Available to use for quota purposes for server-side applications. Can be any
541
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
542
+ # Overrides userIp if both are provided.
543
+ # @param [String] user_ip
544
+ # IP address of the site where the request originates. Use this if you want to
545
+ # enforce per-user limits.
546
+ # @param [Google::Apis::RequestOptions] options
547
+ # Request-specific options
548
+ #
549
+ # @yield [result, err] Result & error if block supplied
550
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
551
+ # @yieldparam err [StandardError] error object if request failed
552
+ #
553
+ # @return [Google::Apis::AdsenseV1_4::AdUnits]
554
+ #
555
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
556
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
557
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
558
+ def list_account_custom_channel_ad_units(account_id, ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
559
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
560
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
561
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnits
562
+ command.params['accountId'] = account_id unless account_id.nil?
563
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
564
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
565
+ command.query['includeInactive'] = include_inactive unless include_inactive.nil?
566
+ command.query['maxResults'] = max_results unless max_results.nil?
567
+ command.query['pageToken'] = page_token unless page_token.nil?
568
+ command.query['fields'] = fields unless fields.nil?
569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
570
+ command.query['userIp'] = user_ip unless user_ip.nil?
571
+ execute_or_queue_command(command, &block)
572
+ end
573
+
574
+ # List the payments for the specified AdSense account.
575
+ # @param [String] account_id
576
+ # Account for which to retrieve the payments.
577
+ # @param [String] fields
578
+ # Selector specifying which fields to include in a partial response.
579
+ # @param [String] quota_user
580
+ # Available to use for quota purposes for server-side applications. Can be any
581
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
582
+ # Overrides userIp if both are provided.
583
+ # @param [String] user_ip
584
+ # IP address of the site where the request originates. Use this if you want to
585
+ # enforce per-user limits.
586
+ # @param [Google::Apis::RequestOptions] options
587
+ # Request-specific options
588
+ #
589
+ # @yield [result, err] Result & error if block supplied
590
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
591
+ # @yieldparam err [StandardError] error object if request failed
592
+ #
593
+ # @return [Google::Apis::AdsenseV1_4::Payments]
594
+ #
595
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
596
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
597
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
598
+ def list_account_payments(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
599
+ command = make_simple_command(:get, 'accounts/{accountId}/payments', options)
600
+ command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
601
+ command.response_class = Google::Apis::AdsenseV1_4::Payments
602
+ command.params['accountId'] = account_id unless account_id.nil?
603
+ command.query['fields'] = fields unless fields.nil?
604
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
605
+ command.query['userIp'] = user_ip unless user_ip.nil?
606
+ execute_or_queue_command(command, &block)
607
+ end
608
+
609
+ # Generate an AdSense report based on the report request sent in the query
610
+ # parameters. Returns the result as JSON; to retrieve output in CSV format
611
+ # specify "alt=csv" as a query parameter.
612
+ # @param [String] account_id
613
+ # Account upon which to report.
614
+ # @param [String] start_date
615
+ # Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
616
+ # @param [String] end_date
617
+ # End of the date range to report on in "YYYY-MM-DD" format, inclusive.
618
+ # @param [String] currency
619
+ # Optional currency to use when reporting on monetary metrics. Defaults to the
620
+ # account's currency if not set.
621
+ # @param [Array<String>, String] dimension
622
+ # Dimensions to base the report on.
623
+ # @param [Array<String>, String] filter
624
+ # Filters to be run on the report.
625
+ # @param [String] locale
626
+ # Optional locale to use for translating report output to a local language.
627
+ # Defaults to "en_US" if not specified.
628
+ # @param [Fixnum] max_results
629
+ # The maximum number of rows of report data to return.
630
+ # @param [Array<String>, String] metric
631
+ # Numeric columns to include in the report.
632
+ # @param [Array<String>, String] sort
633
+ # The name of a dimension or metric to sort the resulting report on, optionally
634
+ # prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
635
+ # specified, the column is sorted ascending.
636
+ # @param [Fixnum] start_index
637
+ # Index of the first row of report data to return.
638
+ # @param [Boolean] use_timezone_reporting
639
+ # Whether the report should be generated in the AdSense account's local timezone.
640
+ # If false default PST/PDT timezone will be used.
641
+ # @param [String] fields
642
+ # Selector specifying which fields to include in a partial response.
643
+ # @param [String] quota_user
644
+ # Available to use for quota purposes for server-side applications. Can be any
645
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
646
+ # Overrides userIp if both are provided.
647
+ # @param [String] user_ip
648
+ # IP address of the site where the request originates. Use this if you want to
649
+ # enforce per-user limits.
650
+ # @param [IO, String] download_dest
651
+ # IO stream or filename to receive content download
652
+ # @param [Google::Apis::RequestOptions] options
653
+ # Request-specific options
654
+ #
655
+ # @yield [result, err] Result & error if block supplied
656
+ # @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
657
+ # @yieldparam err [StandardError] error object if request failed
658
+ #
659
+ # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
660
+ #
661
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
662
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
663
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
664
+ def generate_account_report(account_id, start_date, end_date, currency: nil, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
665
+ if download_dest.nil?
666
+ command = make_simple_command(:get, 'accounts/{accountId}/reports', options)
667
+ else
668
+ command = make_download_command(:get, 'accounts/{accountId}/reports', options)
669
+ command.download_dest = download_dest
670
+ end
671
+ command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
672
+ command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
673
+ command.params['accountId'] = account_id unless account_id.nil?
674
+ command.query['currency'] = currency unless currency.nil?
675
+ command.query['dimension'] = dimension unless dimension.nil?
676
+ command.query['endDate'] = end_date unless end_date.nil?
677
+ command.query['filter'] = filter unless filter.nil?
678
+ command.query['locale'] = locale unless locale.nil?
679
+ command.query['maxResults'] = max_results unless max_results.nil?
680
+ command.query['metric'] = metric unless metric.nil?
681
+ command.query['sort'] = sort unless sort.nil?
682
+ command.query['startDate'] = start_date unless start_date.nil?
683
+ command.query['startIndex'] = start_index unless start_index.nil?
684
+ command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
685
+ command.query['fields'] = fields unless fields.nil?
686
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
687
+ command.query['userIp'] = user_ip unless user_ip.nil?
688
+ execute_or_queue_command(command, &block)
689
+ end
690
+
691
+ # Generate an AdSense report based on the saved report ID sent in the query
692
+ # parameters.
693
+ # @param [String] account_id
694
+ # Account to which the saved reports belong.
695
+ # @param [String] saved_report_id
696
+ # The saved report to retrieve.
697
+ # @param [String] locale
698
+ # Optional locale to use for translating report output to a local language.
699
+ # Defaults to "en_US" if not specified.
700
+ # @param [Fixnum] max_results
701
+ # The maximum number of rows of report data to return.
702
+ # @param [Fixnum] start_index
703
+ # Index of the first row of report data to return.
704
+ # @param [String] fields
705
+ # Selector specifying which fields to include in a partial response.
706
+ # @param [String] quota_user
707
+ # Available to use for quota purposes for server-side applications. Can be any
708
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
709
+ # Overrides userIp if both are provided.
710
+ # @param [String] user_ip
711
+ # IP address of the site where the request originates. Use this if you want to
712
+ # enforce per-user limits.
713
+ # @param [Google::Apis::RequestOptions] options
714
+ # Request-specific options
715
+ #
716
+ # @yield [result, err] Result & error if block supplied
717
+ # @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
718
+ # @yieldparam err [StandardError] error object if request failed
719
+ #
720
+ # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
721
+ #
722
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
725
+ def generate_account_saved_report(account_id, saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
726
+ command = make_simple_command(:get, 'accounts/{accountId}/reports/{savedReportId}', options)
727
+ command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
728
+ command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
729
+ command.params['accountId'] = account_id unless account_id.nil?
730
+ command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
731
+ command.query['locale'] = locale unless locale.nil?
732
+ command.query['maxResults'] = max_results unless max_results.nil?
733
+ command.query['startIndex'] = start_index unless start_index.nil?
734
+ command.query['fields'] = fields unless fields.nil?
735
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
736
+ command.query['userIp'] = user_ip unless user_ip.nil?
737
+ execute_or_queue_command(command, &block)
738
+ end
739
+
740
+ # List all saved reports in the specified AdSense account.
741
+ # @param [String] account_id
742
+ # Account to which the saved reports belong.
743
+ # @param [Fixnum] max_results
744
+ # The maximum number of saved reports to include in the response, used for
745
+ # paging.
746
+ # @param [String] page_token
747
+ # A continuation token, used to page through saved reports. To retrieve the next
748
+ # page, set this parameter to the value of "nextPageToken" from the previous
749
+ # response.
750
+ # @param [String] fields
751
+ # Selector specifying which fields to include in a partial response.
752
+ # @param [String] quota_user
753
+ # Available to use for quota purposes for server-side applications. Can be any
754
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
755
+ # Overrides userIp if both are provided.
756
+ # @param [String] user_ip
757
+ # IP address of the site where the request originates. Use this if you want to
758
+ # enforce per-user limits.
759
+ # @param [Google::Apis::RequestOptions] options
760
+ # Request-specific options
761
+ #
762
+ # @yield [result, err] Result & error if block supplied
763
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
764
+ # @yieldparam err [StandardError] error object if request failed
765
+ #
766
+ # @return [Google::Apis::AdsenseV1_4::SavedReports]
767
+ #
768
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
769
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
770
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
771
+ def list_account_saved_reports(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
772
+ command = make_simple_command(:get, 'accounts/{accountId}/reports/saved', options)
773
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
774
+ command.response_class = Google::Apis::AdsenseV1_4::SavedReports
775
+ command.params['accountId'] = account_id unless account_id.nil?
776
+ command.query['maxResults'] = max_results unless max_results.nil?
777
+ command.query['pageToken'] = page_token unless page_token.nil?
778
+ command.query['fields'] = fields unless fields.nil?
779
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
780
+ command.query['userIp'] = user_ip unless user_ip.nil?
781
+ execute_or_queue_command(command, &block)
782
+ end
783
+
784
+ # List a specific saved ad style for the specified account.
785
+ # @param [String] account_id
786
+ # Account for which to get the saved ad style.
787
+ # @param [String] saved_ad_style_id
788
+ # Saved ad style to retrieve.
789
+ # @param [String] fields
790
+ # Selector specifying which fields to include in a partial response.
791
+ # @param [String] quota_user
792
+ # Available to use for quota purposes for server-side applications. Can be any
793
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
794
+ # Overrides userIp if both are provided.
795
+ # @param [String] user_ip
796
+ # IP address of the site where the request originates. Use this if you want to
797
+ # enforce per-user limits.
798
+ # @param [Google::Apis::RequestOptions] options
799
+ # Request-specific options
800
+ #
801
+ # @yield [result, err] Result & error if block supplied
802
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
803
+ # @yieldparam err [StandardError] error object if request failed
804
+ #
805
+ # @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
806
+ #
807
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
808
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
809
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
810
+ def get_account_saved_ad_style(account_id, saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
811
+ command = make_simple_command(:get, 'accounts/{accountId}/savedadstyles/{savedAdStyleId}', options)
812
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
813
+ command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
814
+ command.params['accountId'] = account_id unless account_id.nil?
815
+ command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
816
+ command.query['fields'] = fields unless fields.nil?
817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
818
+ command.query['userIp'] = user_ip unless user_ip.nil?
819
+ execute_or_queue_command(command, &block)
820
+ end
821
+
822
+ # List all saved ad styles in the specified account.
823
+ # @param [String] account_id
824
+ # Account for which to list saved ad styles.
825
+ # @param [Fixnum] max_results
826
+ # The maximum number of saved ad styles to include in the response, used for
827
+ # paging.
828
+ # @param [String] page_token
829
+ # A continuation token, used to page through saved ad styles. To retrieve the
830
+ # next page, set this parameter to the value of "nextPageToken" from the
831
+ # previous response.
832
+ # @param [String] fields
833
+ # Selector specifying which fields to include in a partial response.
834
+ # @param [String] quota_user
835
+ # Available to use for quota purposes for server-side applications. Can be any
836
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
837
+ # Overrides userIp if both are provided.
838
+ # @param [String] user_ip
839
+ # IP address of the site where the request originates. Use this if you want to
840
+ # enforce per-user limits.
841
+ # @param [Google::Apis::RequestOptions] options
842
+ # Request-specific options
843
+ #
844
+ # @yield [result, err] Result & error if block supplied
845
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
846
+ # @yieldparam err [StandardError] error object if request failed
847
+ #
848
+ # @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
849
+ #
850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
853
+ def list_account_saved_ad_styles(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
854
+ command = make_simple_command(:get, 'accounts/{accountId}/savedadstyles', options)
855
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
856
+ command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
857
+ command.params['accountId'] = account_id unless account_id.nil?
858
+ command.query['maxResults'] = max_results unless max_results.nil?
859
+ command.query['pageToken'] = page_token unless page_token.nil?
860
+ command.query['fields'] = fields unless fields.nil?
861
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
862
+ command.query['userIp'] = user_ip unless user_ip.nil?
863
+ execute_or_queue_command(command, &block)
864
+ end
865
+
866
+ # List all URL channels in the specified ad client for the specified account.
867
+ # @param [String] account_id
868
+ # Account to which the ad client belongs.
869
+ # @param [String] ad_client_id
870
+ # Ad client for which to list URL channels.
871
+ # @param [Fixnum] max_results
872
+ # The maximum number of URL channels to include in the response, used for paging.
873
+ # @param [String] page_token
874
+ # A continuation token, used to page through URL channels. To retrieve the next
875
+ # page, set this parameter to the value of "nextPageToken" from the previous
876
+ # response.
877
+ # @param [String] fields
878
+ # Selector specifying which fields to include in a partial response.
879
+ # @param [String] quota_user
880
+ # Available to use for quota purposes for server-side applications. Can be any
881
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
882
+ # Overrides userIp if both are provided.
883
+ # @param [String] user_ip
884
+ # IP address of the site where the request originates. Use this if you want to
885
+ # enforce per-user limits.
886
+ # @param [Google::Apis::RequestOptions] options
887
+ # Request-specific options
888
+ #
889
+ # @yield [result, err] Result & error if block supplied
890
+ # @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
891
+ # @yieldparam err [StandardError] error object if request failed
892
+ #
893
+ # @return [Google::Apis::AdsenseV1_4::UrlChannels]
894
+ #
895
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
896
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
897
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
898
+ def list_account_url_channels(account_id, ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
899
+ command = make_simple_command(:get, 'accounts/{accountId}/adclients/{adClientId}/urlchannels', options)
900
+ command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
901
+ command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
902
+ command.params['accountId'] = account_id unless account_id.nil?
903
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
904
+ command.query['maxResults'] = max_results unless max_results.nil?
905
+ command.query['pageToken'] = page_token unless page_token.nil?
906
+ command.query['fields'] = fields unless fields.nil?
907
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
908
+ command.query['userIp'] = user_ip unless user_ip.nil?
909
+ execute_or_queue_command(command, &block)
910
+ end
911
+
912
+ # List all ad clients in this AdSense account.
913
+ # @param [Fixnum] max_results
914
+ # The maximum number of ad clients to include in the response, used for paging.
915
+ # @param [String] page_token
916
+ # A continuation token, used to page through ad clients. To retrieve the next
917
+ # page, set this parameter to the value of "nextPageToken" from the previous
918
+ # response.
919
+ # @param [String] fields
920
+ # Selector specifying which fields to include in a partial response.
921
+ # @param [String] quota_user
922
+ # Available to use for quota purposes for server-side applications. Can be any
923
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
924
+ # Overrides userIp if both are provided.
925
+ # @param [String] user_ip
926
+ # IP address of the site where the request originates. Use this if you want to
927
+ # enforce per-user limits.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdClients] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::AdsenseV1_4::AdClients]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
941
+ command = make_simple_command(:get, 'adclients', options)
942
+ command.response_representation = Google::Apis::AdsenseV1_4::AdClients::Representation
943
+ command.response_class = Google::Apis::AdsenseV1_4::AdClients
944
+ command.query['maxResults'] = max_results unless max_results.nil?
945
+ command.query['pageToken'] = page_token unless page_token.nil?
946
+ command.query['fields'] = fields unless fields.nil?
947
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
948
+ command.query['userIp'] = user_ip unless user_ip.nil?
949
+ execute_or_queue_command(command, &block)
950
+ end
951
+
952
+ # Gets the specified ad unit in the specified ad client.
953
+ # @param [String] ad_client_id
954
+ # Ad client for which to get the ad unit.
955
+ # @param [String] ad_unit_id
956
+ # Ad unit to retrieve.
957
+ # @param [String] fields
958
+ # Selector specifying which fields to include in a partial response.
959
+ # @param [String] quota_user
960
+ # Available to use for quota purposes for server-side applications. Can be any
961
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
962
+ # Overrides userIp if both are provided.
963
+ # @param [String] user_ip
964
+ # IP address of the site where the request originates. Use this if you want to
965
+ # enforce per-user limits.
966
+ # @param [Google::Apis::RequestOptions] options
967
+ # Request-specific options
968
+ #
969
+ # @yield [result, err] Result & error if block supplied
970
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnit] parsed result object
971
+ # @yieldparam err [StandardError] error object if request failed
972
+ #
973
+ # @return [Google::Apis::AdsenseV1_4::AdUnit]
974
+ #
975
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
976
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
977
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
978
+ def get_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
979
+ command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}', options)
980
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnit::Representation
981
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnit
982
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
983
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
984
+ command.query['fields'] = fields unless fields.nil?
985
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
986
+ command.query['userIp'] = user_ip unless user_ip.nil?
987
+ execute_or_queue_command(command, &block)
988
+ end
989
+
990
+ # Get ad code for the specified ad unit.
991
+ # @param [String] ad_client_id
992
+ # Ad client with contains the ad unit.
993
+ # @param [String] ad_unit_id
994
+ # Ad unit to get the code for.
995
+ # @param [String] fields
996
+ # Selector specifying which fields to include in a partial response.
997
+ # @param [String] quota_user
998
+ # Available to use for quota purposes for server-side applications. Can be any
999
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1000
+ # Overrides userIp if both are provided.
1001
+ # @param [String] user_ip
1002
+ # IP address of the site where the request originates. Use this if you want to
1003
+ # enforce per-user limits.
1004
+ # @param [Google::Apis::RequestOptions] options
1005
+ # Request-specific options
1006
+ #
1007
+ # @yield [result, err] Result & error if block supplied
1008
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdCode] parsed result object
1009
+ # @yieldparam err [StandardError] error object if request failed
1010
+ #
1011
+ # @return [Google::Apis::AdsenseV1_4::AdCode]
1012
+ #
1013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1016
+ def get_ad_code_ad_unit(ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1017
+ command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/adcode', options)
1018
+ command.response_representation = Google::Apis::AdsenseV1_4::AdCode::Representation
1019
+ command.response_class = Google::Apis::AdsenseV1_4::AdCode
1020
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1021
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
1022
+ command.query['fields'] = fields unless fields.nil?
1023
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1024
+ command.query['userIp'] = user_ip unless user_ip.nil?
1025
+ execute_or_queue_command(command, &block)
1026
+ end
1027
+
1028
+ # List all ad units in the specified ad client for this AdSense account.
1029
+ # @param [String] ad_client_id
1030
+ # Ad client for which to list ad units.
1031
+ # @param [Boolean] include_inactive
1032
+ # Whether to include inactive ad units. Default: true.
1033
+ # @param [Fixnum] max_results
1034
+ # The maximum number of ad units to include in the response, used for paging.
1035
+ # @param [String] page_token
1036
+ # A continuation token, used to page through ad units. To retrieve the next page,
1037
+ # set this parameter to the value of "nextPageToken" from the previous response.
1038
+ # @param [String] fields
1039
+ # Selector specifying which fields to include in a partial response.
1040
+ # @param [String] quota_user
1041
+ # Available to use for quota purposes for server-side applications. Can be any
1042
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1043
+ # Overrides userIp if both are provided.
1044
+ # @param [String] user_ip
1045
+ # IP address of the site where the request originates. Use this if you want to
1046
+ # enforce per-user limits.
1047
+ # @param [Google::Apis::RequestOptions] options
1048
+ # Request-specific options
1049
+ #
1050
+ # @yield [result, err] Result & error if block supplied
1051
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
1052
+ # @yieldparam err [StandardError] error object if request failed
1053
+ #
1054
+ # @return [Google::Apis::AdsenseV1_4::AdUnits]
1055
+ #
1056
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1057
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1058
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1059
+ def list_ad_units(ad_client_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1060
+ command = make_simple_command(:get, 'adclients/{adClientId}/adunits', options)
1061
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
1062
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnits
1063
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1064
+ command.query['includeInactive'] = include_inactive unless include_inactive.nil?
1065
+ command.query['maxResults'] = max_results unless max_results.nil?
1066
+ command.query['pageToken'] = page_token unless page_token.nil?
1067
+ command.query['fields'] = fields unless fields.nil?
1068
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1069
+ command.query['userIp'] = user_ip unless user_ip.nil?
1070
+ execute_or_queue_command(command, &block)
1071
+ end
1072
+
1073
+ # List all custom channels which the specified ad unit belongs to.
1074
+ # @param [String] ad_client_id
1075
+ # Ad client which contains the ad unit.
1076
+ # @param [String] ad_unit_id
1077
+ # Ad unit for which to list custom channels.
1078
+ # @param [Fixnum] max_results
1079
+ # The maximum number of custom channels to include in the response, used for
1080
+ # paging.
1081
+ # @param [String] page_token
1082
+ # A continuation token, used to page through custom channels. To retrieve the
1083
+ # next page, set this parameter to the value of "nextPageToken" from the
1084
+ # previous response.
1085
+ # @param [String] fields
1086
+ # Selector specifying which fields to include in a partial response.
1087
+ # @param [String] quota_user
1088
+ # Available to use for quota purposes for server-side applications. Can be any
1089
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1090
+ # Overrides userIp if both are provided.
1091
+ # @param [String] user_ip
1092
+ # IP address of the site where the request originates. Use this if you want to
1093
+ # enforce per-user limits.
1094
+ # @param [Google::Apis::RequestOptions] options
1095
+ # Request-specific options
1096
+ #
1097
+ # @yield [result, err] Result & error if block supplied
1098
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
1099
+ # @yieldparam err [StandardError] error object if request failed
1100
+ #
1101
+ # @return [Google::Apis::AdsenseV1_4::CustomChannels]
1102
+ #
1103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1106
+ def list_ad_unit_custom_channels(ad_client_id, ad_unit_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1107
+ command = make_simple_command(:get, 'adclients/{adClientId}/adunits/{adUnitId}/customchannels', options)
1108
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
1109
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
1110
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1111
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
1112
+ command.query['maxResults'] = max_results unless max_results.nil?
1113
+ command.query['pageToken'] = page_token unless page_token.nil?
1114
+ command.query['fields'] = fields unless fields.nil?
1115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1116
+ command.query['userIp'] = user_ip unless user_ip.nil?
1117
+ execute_or_queue_command(command, &block)
1118
+ end
1119
+
1120
+ # Dismiss (delete) the specified alert from the publisher's AdSense account.
1121
+ # @param [String] alert_id
1122
+ # Alert to delete.
1123
+ # @param [String] fields
1124
+ # Selector specifying which fields to include in a partial response.
1125
+ # @param [String] quota_user
1126
+ # Available to use for quota purposes for server-side applications. Can be any
1127
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1128
+ # Overrides userIp if both are provided.
1129
+ # @param [String] user_ip
1130
+ # IP address of the site where the request originates. Use this if you want to
1131
+ # enforce per-user limits.
1132
+ # @param [Google::Apis::RequestOptions] options
1133
+ # Request-specific options
1134
+ #
1135
+ # @yield [result, err] Result & error if block supplied
1136
+ # @yieldparam result [NilClass] No result returned for this method
1137
+ # @yieldparam err [StandardError] error object if request failed
1138
+ #
1139
+ # @return [void]
1140
+ #
1141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1144
+ def delete_alert(alert_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1145
+ command = make_simple_command(:delete, 'alerts/{alertId}', options)
1146
+ command.params['alertId'] = alert_id unless alert_id.nil?
1147
+ command.query['fields'] = fields unless fields.nil?
1148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1149
+ command.query['userIp'] = user_ip unless user_ip.nil?
1150
+ execute_or_queue_command(command, &block)
1151
+ end
1152
+
1153
+ # List the alerts for this AdSense account.
1154
+ # @param [String] locale
1155
+ # The locale to use for translating alert messages. The account locale will be
1156
+ # used if this is not supplied. The AdSense default (English) will be used if
1157
+ # the supplied locale is invalid or unsupported.
1158
+ # @param [String] fields
1159
+ # Selector specifying which fields to include in a partial response.
1160
+ # @param [String] quota_user
1161
+ # Available to use for quota purposes for server-side applications. Can be any
1162
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1163
+ # Overrides userIp if both are provided.
1164
+ # @param [String] user_ip
1165
+ # IP address of the site where the request originates. Use this if you want to
1166
+ # enforce per-user limits.
1167
+ # @param [Google::Apis::RequestOptions] options
1168
+ # Request-specific options
1169
+ #
1170
+ # @yield [result, err] Result & error if block supplied
1171
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Alerts] parsed result object
1172
+ # @yieldparam err [StandardError] error object if request failed
1173
+ #
1174
+ # @return [Google::Apis::AdsenseV1_4::Alerts]
1175
+ #
1176
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1177
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1178
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1179
+ def list_alerts(locale: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1180
+ command = make_simple_command(:get, 'alerts', options)
1181
+ command.response_representation = Google::Apis::AdsenseV1_4::Alerts::Representation
1182
+ command.response_class = Google::Apis::AdsenseV1_4::Alerts
1183
+ command.query['locale'] = locale unless locale.nil?
1184
+ command.query['fields'] = fields unless fields.nil?
1185
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1186
+ command.query['userIp'] = user_ip unless user_ip.nil?
1187
+ execute_or_queue_command(command, &block)
1188
+ end
1189
+
1190
+ # Get the specified custom channel from the specified ad client.
1191
+ # @param [String] ad_client_id
1192
+ # Ad client which contains the custom channel.
1193
+ # @param [String] custom_channel_id
1194
+ # Custom channel to retrieve.
1195
+ # @param [String] fields
1196
+ # Selector specifying which fields to include in a partial response.
1197
+ # @param [String] quota_user
1198
+ # Available to use for quota purposes for server-side applications. Can be any
1199
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1200
+ # Overrides userIp if both are provided.
1201
+ # @param [String] user_ip
1202
+ # IP address of the site where the request originates. Use this if you want to
1203
+ # enforce per-user limits.
1204
+ # @param [Google::Apis::RequestOptions] options
1205
+ # Request-specific options
1206
+ #
1207
+ # @yield [result, err] Result & error if block supplied
1208
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannel] parsed result object
1209
+ # @yieldparam err [StandardError] error object if request failed
1210
+ #
1211
+ # @return [Google::Apis::AdsenseV1_4::CustomChannel]
1212
+ #
1213
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1214
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1215
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1216
+ def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1217
+ command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}', options)
1218
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannel::Representation
1219
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannel
1220
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1221
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
1222
+ command.query['fields'] = fields unless fields.nil?
1223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1224
+ command.query['userIp'] = user_ip unless user_ip.nil?
1225
+ execute_or_queue_command(command, &block)
1226
+ end
1227
+
1228
+ # List all custom channels in the specified ad client for this AdSense account.
1229
+ # @param [String] ad_client_id
1230
+ # Ad client for which to list custom channels.
1231
+ # @param [Fixnum] max_results
1232
+ # The maximum number of custom channels to include in the response, used for
1233
+ # paging.
1234
+ # @param [String] page_token
1235
+ # A continuation token, used to page through custom channels. To retrieve the
1236
+ # next page, set this parameter to the value of "nextPageToken" from the
1237
+ # previous response.
1238
+ # @param [String] fields
1239
+ # Selector specifying which fields to include in a partial response.
1240
+ # @param [String] quota_user
1241
+ # Available to use for quota purposes for server-side applications. Can be any
1242
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1243
+ # Overrides userIp if both are provided.
1244
+ # @param [String] user_ip
1245
+ # IP address of the site where the request originates. Use this if you want to
1246
+ # enforce per-user limits.
1247
+ # @param [Google::Apis::RequestOptions] options
1248
+ # Request-specific options
1249
+ #
1250
+ # @yield [result, err] Result & error if block supplied
1251
+ # @yieldparam result [Google::Apis::AdsenseV1_4::CustomChannels] parsed result object
1252
+ # @yieldparam err [StandardError] error object if request failed
1253
+ #
1254
+ # @return [Google::Apis::AdsenseV1_4::CustomChannels]
1255
+ #
1256
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1257
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1258
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1259
+ def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1260
+ command = make_simple_command(:get, 'adclients/{adClientId}/customchannels', options)
1261
+ command.response_representation = Google::Apis::AdsenseV1_4::CustomChannels::Representation
1262
+ command.response_class = Google::Apis::AdsenseV1_4::CustomChannels
1263
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1264
+ command.query['maxResults'] = max_results unless max_results.nil?
1265
+ command.query['pageToken'] = page_token unless page_token.nil?
1266
+ command.query['fields'] = fields unless fields.nil?
1267
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1268
+ command.query['userIp'] = user_ip unless user_ip.nil?
1269
+ execute_or_queue_command(command, &block)
1270
+ end
1271
+
1272
+ # List all ad units in the specified custom channel.
1273
+ # @param [String] ad_client_id
1274
+ # Ad client which contains the custom channel.
1275
+ # @param [String] custom_channel_id
1276
+ # Custom channel for which to list ad units.
1277
+ # @param [Boolean] include_inactive
1278
+ # Whether to include inactive ad units. Default: true.
1279
+ # @param [Fixnum] max_results
1280
+ # The maximum number of ad units to include in the response, used for paging.
1281
+ # @param [String] page_token
1282
+ # A continuation token, used to page through ad units. To retrieve the next page,
1283
+ # set this parameter to the value of "nextPageToken" from the previous response.
1284
+ # @param [String] fields
1285
+ # Selector specifying which fields to include in a partial response.
1286
+ # @param [String] quota_user
1287
+ # Available to use for quota purposes for server-side applications. Can be any
1288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1289
+ # Overrides userIp if both are provided.
1290
+ # @param [String] user_ip
1291
+ # IP address of the site where the request originates. Use this if you want to
1292
+ # enforce per-user limits.
1293
+ # @param [Google::Apis::RequestOptions] options
1294
+ # Request-specific options
1295
+ #
1296
+ # @yield [result, err] Result & error if block supplied
1297
+ # @yieldparam result [Google::Apis::AdsenseV1_4::AdUnits] parsed result object
1298
+ # @yieldparam err [StandardError] error object if request failed
1299
+ #
1300
+ # @return [Google::Apis::AdsenseV1_4::AdUnits]
1301
+ #
1302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1305
+ def list_custom_channel_ad_units(ad_client_id, custom_channel_id, include_inactive: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1306
+ command = make_simple_command(:get, 'adclients/{adClientId}/customchannels/{customChannelId}/adunits', options)
1307
+ command.response_representation = Google::Apis::AdsenseV1_4::AdUnits::Representation
1308
+ command.response_class = Google::Apis::AdsenseV1_4::AdUnits
1309
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1310
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
1311
+ command.query['includeInactive'] = include_inactive unless include_inactive.nil?
1312
+ command.query['maxResults'] = max_results unless max_results.nil?
1313
+ command.query['pageToken'] = page_token unless page_token.nil?
1314
+ command.query['fields'] = fields unless fields.nil?
1315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1316
+ command.query['userIp'] = user_ip unless user_ip.nil?
1317
+ execute_or_queue_command(command, &block)
1318
+ end
1319
+
1320
+ # List the metadata for the dimensions available to this AdSense account.
1321
+ # @param [String] fields
1322
+ # Selector specifying which fields to include in a partial response.
1323
+ # @param [String] quota_user
1324
+ # Available to use for quota purposes for server-side applications. Can be any
1325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1326
+ # Overrides userIp if both are provided.
1327
+ # @param [String] user_ip
1328
+ # IP address of the site where the request originates. Use this if you want to
1329
+ # enforce per-user limits.
1330
+ # @param [Google::Apis::RequestOptions] options
1331
+ # Request-specific options
1332
+ #
1333
+ # @yield [result, err] Result & error if block supplied
1334
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
1335
+ # @yieldparam err [StandardError] error object if request failed
1336
+ #
1337
+ # @return [Google::Apis::AdsenseV1_4::Metadata]
1338
+ #
1339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1342
+ def list_metadata_dimensions(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1343
+ command = make_simple_command(:get, 'metadata/dimensions', options)
1344
+ command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
1345
+ command.response_class = Google::Apis::AdsenseV1_4::Metadata
1346
+ command.query['fields'] = fields unless fields.nil?
1347
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1348
+ command.query['userIp'] = user_ip unless user_ip.nil?
1349
+ execute_or_queue_command(command, &block)
1350
+ end
1351
+
1352
+ # List the metadata for the metrics available to this AdSense account.
1353
+ # @param [String] fields
1354
+ # Selector specifying which fields to include in a partial response.
1355
+ # @param [String] quota_user
1356
+ # Available to use for quota purposes for server-side applications. Can be any
1357
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1358
+ # Overrides userIp if both are provided.
1359
+ # @param [String] user_ip
1360
+ # IP address of the site where the request originates. Use this if you want to
1361
+ # enforce per-user limits.
1362
+ # @param [Google::Apis::RequestOptions] options
1363
+ # Request-specific options
1364
+ #
1365
+ # @yield [result, err] Result & error if block supplied
1366
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Metadata] parsed result object
1367
+ # @yieldparam err [StandardError] error object if request failed
1368
+ #
1369
+ # @return [Google::Apis::AdsenseV1_4::Metadata]
1370
+ #
1371
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1372
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1373
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1374
+ def list_metadata_metrics(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1375
+ command = make_simple_command(:get, 'metadata/metrics', options)
1376
+ command.response_representation = Google::Apis::AdsenseV1_4::Metadata::Representation
1377
+ command.response_class = Google::Apis::AdsenseV1_4::Metadata
1378
+ command.query['fields'] = fields unless fields.nil?
1379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1380
+ command.query['userIp'] = user_ip unless user_ip.nil?
1381
+ execute_or_queue_command(command, &block)
1382
+ end
1383
+
1384
+ # List the payments for this AdSense account.
1385
+ # @param [String] fields
1386
+ # Selector specifying which fields to include in a partial response.
1387
+ # @param [String] quota_user
1388
+ # Available to use for quota purposes for server-side applications. Can be any
1389
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1390
+ # Overrides userIp if both are provided.
1391
+ # @param [String] user_ip
1392
+ # IP address of the site where the request originates. Use this if you want to
1393
+ # enforce per-user limits.
1394
+ # @param [Google::Apis::RequestOptions] options
1395
+ # Request-specific options
1396
+ #
1397
+ # @yield [result, err] Result & error if block supplied
1398
+ # @yieldparam result [Google::Apis::AdsenseV1_4::Payments] parsed result object
1399
+ # @yieldparam err [StandardError] error object if request failed
1400
+ #
1401
+ # @return [Google::Apis::AdsenseV1_4::Payments]
1402
+ #
1403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1406
+ def list_payments(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1407
+ command = make_simple_command(:get, 'payments', options)
1408
+ command.response_representation = Google::Apis::AdsenseV1_4::Payments::Representation
1409
+ command.response_class = Google::Apis::AdsenseV1_4::Payments
1410
+ command.query['fields'] = fields unless fields.nil?
1411
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1412
+ command.query['userIp'] = user_ip unless user_ip.nil?
1413
+ execute_or_queue_command(command, &block)
1414
+ end
1415
+
1416
+ # Generate an AdSense report based on the report request sent in the query
1417
+ # parameters. Returns the result as JSON; to retrieve output in CSV format
1418
+ # specify "alt=csv" as a query parameter.
1419
+ # @param [String] start_date
1420
+ # Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
1421
+ # @param [String] end_date
1422
+ # End of the date range to report on in "YYYY-MM-DD" format, inclusive.
1423
+ # @param [Array<String>, String] account_id
1424
+ # Accounts upon which to report.
1425
+ # @param [String] currency
1426
+ # Optional currency to use when reporting on monetary metrics. Defaults to the
1427
+ # account's currency if not set.
1428
+ # @param [Array<String>, String] dimension
1429
+ # Dimensions to base the report on.
1430
+ # @param [Array<String>, String] filter
1431
+ # Filters to be run on the report.
1432
+ # @param [String] locale
1433
+ # Optional locale to use for translating report output to a local language.
1434
+ # Defaults to "en_US" if not specified.
1435
+ # @param [Fixnum] max_results
1436
+ # The maximum number of rows of report data to return.
1437
+ # @param [Array<String>, String] metric
1438
+ # Numeric columns to include in the report.
1439
+ # @param [Array<String>, String] sort
1440
+ # The name of a dimension or metric to sort the resulting report on, optionally
1441
+ # prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
1442
+ # specified, the column is sorted ascending.
1443
+ # @param [Fixnum] start_index
1444
+ # Index of the first row of report data to return.
1445
+ # @param [Boolean] use_timezone_reporting
1446
+ # Whether the report should be generated in the AdSense account's local timezone.
1447
+ # If false default PST/PDT timezone will be used.
1448
+ # @param [String] fields
1449
+ # Selector specifying which fields to include in a partial response.
1450
+ # @param [String] quota_user
1451
+ # Available to use for quota purposes for server-side applications. Can be any
1452
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1453
+ # Overrides userIp if both are provided.
1454
+ # @param [String] user_ip
1455
+ # IP address of the site where the request originates. Use this if you want to
1456
+ # enforce per-user limits.
1457
+ # @param [IO, String] download_dest
1458
+ # IO stream or filename to receive content download
1459
+ # @param [Google::Apis::RequestOptions] options
1460
+ # Request-specific options
1461
+ #
1462
+ # @yield [result, err] Result & error if block supplied
1463
+ # @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
1464
+ # @yieldparam err [StandardError] error object if request failed
1465
+ #
1466
+ # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
1467
+ #
1468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1471
+ def generate_report(start_date, end_date, account_id: nil, currency: nil, dimension: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_index: nil, use_timezone_reporting: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
1472
+ if download_dest.nil?
1473
+ command = make_simple_command(:get, 'reports', options)
1474
+ else
1475
+ command = make_download_command(:get, 'reports', options)
1476
+ command.download_dest = download_dest
1477
+ end
1478
+ command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
1479
+ command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
1480
+ command.query['accountId'] = account_id unless account_id.nil?
1481
+ command.query['currency'] = currency unless currency.nil?
1482
+ command.query['dimension'] = dimension unless dimension.nil?
1483
+ command.query['endDate'] = end_date unless end_date.nil?
1484
+ command.query['filter'] = filter unless filter.nil?
1485
+ command.query['locale'] = locale unless locale.nil?
1486
+ command.query['maxResults'] = max_results unless max_results.nil?
1487
+ command.query['metric'] = metric unless metric.nil?
1488
+ command.query['sort'] = sort unless sort.nil?
1489
+ command.query['startDate'] = start_date unless start_date.nil?
1490
+ command.query['startIndex'] = start_index unless start_index.nil?
1491
+ command.query['useTimezoneReporting'] = use_timezone_reporting unless use_timezone_reporting.nil?
1492
+ command.query['fields'] = fields unless fields.nil?
1493
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1494
+ command.query['userIp'] = user_ip unless user_ip.nil?
1495
+ execute_or_queue_command(command, &block)
1496
+ end
1497
+
1498
+ # Generate an AdSense report based on the saved report ID sent in the query
1499
+ # parameters.
1500
+ # @param [String] saved_report_id
1501
+ # The saved report to retrieve.
1502
+ # @param [String] locale
1503
+ # Optional locale to use for translating report output to a local language.
1504
+ # Defaults to "en_US" if not specified.
1505
+ # @param [Fixnum] max_results
1506
+ # The maximum number of rows of report data to return.
1507
+ # @param [Fixnum] start_index
1508
+ # Index of the first row of report data to return.
1509
+ # @param [String] fields
1510
+ # Selector specifying which fields to include in a partial response.
1511
+ # @param [String] quota_user
1512
+ # Available to use for quota purposes for server-side applications. Can be any
1513
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1514
+ # Overrides userIp if both are provided.
1515
+ # @param [String] user_ip
1516
+ # IP address of the site where the request originates. Use this if you want to
1517
+ # enforce per-user limits.
1518
+ # @param [Google::Apis::RequestOptions] options
1519
+ # Request-specific options
1520
+ #
1521
+ # @yield [result, err] Result & error if block supplied
1522
+ # @yieldparam result [Google::Apis::AdsenseV1_4::GenerateReportResponse] parsed result object
1523
+ # @yieldparam err [StandardError] error object if request failed
1524
+ #
1525
+ # @return [Google::Apis::AdsenseV1_4::GenerateReportResponse]
1526
+ #
1527
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1528
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1529
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1530
+ def generate_saved_report(saved_report_id, locale: nil, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1531
+ command = make_simple_command(:get, 'reports/{savedReportId}', options)
1532
+ command.response_representation = Google::Apis::AdsenseV1_4::GenerateReportResponse::Representation
1533
+ command.response_class = Google::Apis::AdsenseV1_4::GenerateReportResponse
1534
+ command.params['savedReportId'] = saved_report_id unless saved_report_id.nil?
1535
+ command.query['locale'] = locale unless locale.nil?
1536
+ command.query['maxResults'] = max_results unless max_results.nil?
1537
+ command.query['startIndex'] = start_index unless start_index.nil?
1538
+ command.query['fields'] = fields unless fields.nil?
1539
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1540
+ command.query['userIp'] = user_ip unless user_ip.nil?
1541
+ execute_or_queue_command(command, &block)
1542
+ end
1543
+
1544
+ # List all saved reports in this AdSense account.
1545
+ # @param [Fixnum] max_results
1546
+ # The maximum number of saved reports to include in the response, used for
1547
+ # paging.
1548
+ # @param [String] page_token
1549
+ # A continuation token, used to page through saved reports. To retrieve the next
1550
+ # page, set this parameter to the value of "nextPageToken" from the previous
1551
+ # response.
1552
+ # @param [String] fields
1553
+ # Selector specifying which fields to include in a partial response.
1554
+ # @param [String] quota_user
1555
+ # Available to use for quota purposes for server-side applications. Can be any
1556
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1557
+ # Overrides userIp if both are provided.
1558
+ # @param [String] user_ip
1559
+ # IP address of the site where the request originates. Use this if you want to
1560
+ # enforce per-user limits.
1561
+ # @param [Google::Apis::RequestOptions] options
1562
+ # Request-specific options
1563
+ #
1564
+ # @yield [result, err] Result & error if block supplied
1565
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedReports] parsed result object
1566
+ # @yieldparam err [StandardError] error object if request failed
1567
+ #
1568
+ # @return [Google::Apis::AdsenseV1_4::SavedReports]
1569
+ #
1570
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1571
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1572
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1573
+ def list_saved_reports(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1574
+ command = make_simple_command(:get, 'reports/saved', options)
1575
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedReports::Representation
1576
+ command.response_class = Google::Apis::AdsenseV1_4::SavedReports
1577
+ command.query['maxResults'] = max_results unless max_results.nil?
1578
+ command.query['pageToken'] = page_token unless page_token.nil?
1579
+ command.query['fields'] = fields unless fields.nil?
1580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1581
+ command.query['userIp'] = user_ip unless user_ip.nil?
1582
+ execute_or_queue_command(command, &block)
1583
+ end
1584
+
1585
+ # Get a specific saved ad style from the user's account.
1586
+ # @param [String] saved_ad_style_id
1587
+ # Saved ad style to retrieve.
1588
+ # @param [String] fields
1589
+ # Selector specifying which fields to include in a partial response.
1590
+ # @param [String] quota_user
1591
+ # Available to use for quota purposes for server-side applications. Can be any
1592
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1593
+ # Overrides userIp if both are provided.
1594
+ # @param [String] user_ip
1595
+ # IP address of the site where the request originates. Use this if you want to
1596
+ # enforce per-user limits.
1597
+ # @param [Google::Apis::RequestOptions] options
1598
+ # Request-specific options
1599
+ #
1600
+ # @yield [result, err] Result & error if block supplied
1601
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyle] parsed result object
1602
+ # @yieldparam err [StandardError] error object if request failed
1603
+ #
1604
+ # @return [Google::Apis::AdsenseV1_4::SavedAdStyle]
1605
+ #
1606
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1607
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1608
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1609
+ def get_saved_ad_style(saved_ad_style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1610
+ command = make_simple_command(:get, 'savedadstyles/{savedAdStyleId}', options)
1611
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyle::Representation
1612
+ command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyle
1613
+ command.params['savedAdStyleId'] = saved_ad_style_id unless saved_ad_style_id.nil?
1614
+ command.query['fields'] = fields unless fields.nil?
1615
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1616
+ command.query['userIp'] = user_ip unless user_ip.nil?
1617
+ execute_or_queue_command(command, &block)
1618
+ end
1619
+
1620
+ # List all saved ad styles in the user's account.
1621
+ # @param [Fixnum] max_results
1622
+ # The maximum number of saved ad styles to include in the response, used for
1623
+ # paging.
1624
+ # @param [String] page_token
1625
+ # A continuation token, used to page through saved ad styles. To retrieve the
1626
+ # next page, set this parameter to the value of "nextPageToken" from the
1627
+ # previous response.
1628
+ # @param [String] fields
1629
+ # Selector specifying which fields to include in a partial response.
1630
+ # @param [String] quota_user
1631
+ # Available to use for quota purposes for server-side applications. Can be any
1632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1633
+ # Overrides userIp if both are provided.
1634
+ # @param [String] user_ip
1635
+ # IP address of the site where the request originates. Use this if you want to
1636
+ # enforce per-user limits.
1637
+ # @param [Google::Apis::RequestOptions] options
1638
+ # Request-specific options
1639
+ #
1640
+ # @yield [result, err] Result & error if block supplied
1641
+ # @yieldparam result [Google::Apis::AdsenseV1_4::SavedAdStyles] parsed result object
1642
+ # @yieldparam err [StandardError] error object if request failed
1643
+ #
1644
+ # @return [Google::Apis::AdsenseV1_4::SavedAdStyles]
1645
+ #
1646
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1647
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1648
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1649
+ def list_saved_ad_styles(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1650
+ command = make_simple_command(:get, 'savedadstyles', options)
1651
+ command.response_representation = Google::Apis::AdsenseV1_4::SavedAdStyles::Representation
1652
+ command.response_class = Google::Apis::AdsenseV1_4::SavedAdStyles
1653
+ command.query['maxResults'] = max_results unless max_results.nil?
1654
+ command.query['pageToken'] = page_token unless page_token.nil?
1655
+ command.query['fields'] = fields unless fields.nil?
1656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1657
+ command.query['userIp'] = user_ip unless user_ip.nil?
1658
+ execute_or_queue_command(command, &block)
1659
+ end
1660
+
1661
+ # List all URL channels in the specified ad client for this AdSense account.
1662
+ # @param [String] ad_client_id
1663
+ # Ad client for which to list URL channels.
1664
+ # @param [Fixnum] max_results
1665
+ # The maximum number of URL channels to include in the response, used for paging.
1666
+ # @param [String] page_token
1667
+ # A continuation token, used to page through URL channels. To retrieve the next
1668
+ # page, set this parameter to the value of "nextPageToken" from the previous
1669
+ # response.
1670
+ # @param [String] fields
1671
+ # Selector specifying which fields to include in a partial response.
1672
+ # @param [String] quota_user
1673
+ # Available to use for quota purposes for server-side applications. Can be any
1674
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1675
+ # Overrides userIp if both are provided.
1676
+ # @param [String] user_ip
1677
+ # IP address of the site where the request originates. Use this if you want to
1678
+ # enforce per-user limits.
1679
+ # @param [Google::Apis::RequestOptions] options
1680
+ # Request-specific options
1681
+ #
1682
+ # @yield [result, err] Result & error if block supplied
1683
+ # @yieldparam result [Google::Apis::AdsenseV1_4::UrlChannels] parsed result object
1684
+ # @yieldparam err [StandardError] error object if request failed
1685
+ #
1686
+ # @return [Google::Apis::AdsenseV1_4::UrlChannels]
1687
+ #
1688
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1689
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1690
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1691
+ def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1692
+ command = make_simple_command(:get, 'adclients/{adClientId}/urlchannels', options)
1693
+ command.response_representation = Google::Apis::AdsenseV1_4::UrlChannels::Representation
1694
+ command.response_class = Google::Apis::AdsenseV1_4::UrlChannels
1695
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1696
+ command.query['maxResults'] = max_results unless max_results.nil?
1697
+ command.query['pageToken'] = page_token unless page_token.nil?
1698
+ command.query['fields'] = fields unless fields.nil?
1699
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1700
+ command.query['userIp'] = user_ip unless user_ip.nil?
1701
+ execute_or_queue_command(command, &block)
1702
+ end
1703
+
1704
+ protected
1705
+
1706
+ def apply_command_defaults(command)
1707
+ command.query['key'] = key unless key.nil?
1708
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1709
+ command.query['userIp'] = user_ip unless user_ip.nil?
1710
+ end
1711
+ end
1712
+ end
1713
+ end
1714
+ end