google-api-client 0.8.7 → 0.9.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,327 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module AdsensehostV4_1
24
+
25
+ class Account
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+ end
28
+
29
+ class Accounts
30
+ class Representation < Google::Apis::Core::JsonRepresentation; end
31
+ end
32
+
33
+ class AdClient
34
+ class Representation < Google::Apis::Core::JsonRepresentation; end
35
+ end
36
+
37
+ class AdClients
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+ end
40
+
41
+ class AdCode
42
+ class Representation < Google::Apis::Core::JsonRepresentation; end
43
+ end
44
+
45
+ class AdStyle
46
+ class Representation < Google::Apis::Core::JsonRepresentation; end
47
+
48
+ class Colors
49
+ class Representation < Google::Apis::Core::JsonRepresentation; end
50
+ end
51
+
52
+ class Font
53
+ class Representation < Google::Apis::Core::JsonRepresentation; end
54
+ end
55
+ end
56
+
57
+ class AdUnit
58
+ class Representation < Google::Apis::Core::JsonRepresentation; end
59
+
60
+ class ContentAdsSettings
61
+ class Representation < Google::Apis::Core::JsonRepresentation; end
62
+
63
+ class BackupOption
64
+ class Representation < Google::Apis::Core::JsonRepresentation; end
65
+ end
66
+ end
67
+
68
+ class MobileContentAdsSettings
69
+ class Representation < Google::Apis::Core::JsonRepresentation; end
70
+ end
71
+ end
72
+
73
+ class AdUnits
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class AssociationSession
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class CustomChannel
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class CustomChannels
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+ end
88
+
89
+ class Report
90
+ class Representation < Google::Apis::Core::JsonRepresentation; end
91
+
92
+ class Header
93
+ class Representation < Google::Apis::Core::JsonRepresentation; end
94
+ end
95
+ end
96
+
97
+ class UrlChannel
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+ end
100
+
101
+ class UrlChannels
102
+ class Representation < Google::Apis::Core::JsonRepresentation; end
103
+ end
104
+
105
+ class Account
106
+ # @private
107
+ class Representation < Google::Apis::Core::JsonRepresentation
108
+ property :id, as: 'id'
109
+ property :kind, as: 'kind'
110
+ property :name, as: 'name'
111
+ property :status, as: 'status'
112
+ end
113
+ end
114
+
115
+ class Accounts
116
+ # @private
117
+ class Representation < Google::Apis::Core::JsonRepresentation
118
+ property :etag, as: 'etag'
119
+ collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::Account, decorator: Google::Apis::AdsensehostV4_1::Account::Representation
120
+
121
+ property :kind, as: 'kind'
122
+ end
123
+ end
124
+
125
+ class AdClient
126
+ # @private
127
+ class Representation < Google::Apis::Core::JsonRepresentation
128
+ property :arc_opt_in, as: 'arcOptIn'
129
+ property :id, as: 'id'
130
+ property :kind, as: 'kind'
131
+ property :product_code, as: 'productCode'
132
+ property :supports_reporting, as: 'supportsReporting'
133
+ end
134
+ end
135
+
136
+ class AdClients
137
+ # @private
138
+ class Representation < Google::Apis::Core::JsonRepresentation
139
+ property :etag, as: 'etag'
140
+ collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdClient, decorator: Google::Apis::AdsensehostV4_1::AdClient::Representation
141
+
142
+ property :kind, as: 'kind'
143
+ property :next_page_token, as: 'nextPageToken'
144
+ end
145
+ end
146
+
147
+ class AdCode
148
+ # @private
149
+ class Representation < Google::Apis::Core::JsonRepresentation
150
+ property :ad_code, as: 'adCode'
151
+ property :kind, as: 'kind'
152
+ end
153
+ end
154
+
155
+ class AdStyle
156
+ # @private
157
+ class Representation < Google::Apis::Core::JsonRepresentation
158
+ property :colors, as: 'colors', class: Google::Apis::AdsensehostV4_1::AdStyle::Colors, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Colors::Representation
159
+
160
+ property :corners, as: 'corners'
161
+ property :font, as: 'font', class: Google::Apis::AdsensehostV4_1::AdStyle::Font, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Font::Representation
162
+
163
+ property :kind, as: 'kind'
164
+ end
165
+
166
+ class Colors
167
+ # @private
168
+ class Representation < Google::Apis::Core::JsonRepresentation
169
+ property :background, as: 'background'
170
+ property :border, as: 'border'
171
+ property :text, as: 'text'
172
+ property :title, as: 'title'
173
+ property :url, as: 'url'
174
+ end
175
+ end
176
+
177
+ class Font
178
+ # @private
179
+ class Representation < Google::Apis::Core::JsonRepresentation
180
+ property :family, as: 'family'
181
+ property :size, as: 'size'
182
+ end
183
+ end
184
+ end
185
+
186
+ class AdUnit
187
+ # @private
188
+ class Representation < Google::Apis::Core::JsonRepresentation
189
+ property :code, as: 'code'
190
+ property :content_ads_settings, as: 'contentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::Representation
191
+
192
+ property :custom_style, as: 'customStyle', class: Google::Apis::AdsensehostV4_1::AdStyle, decorator: Google::Apis::AdsensehostV4_1::AdStyle::Representation
193
+
194
+ property :id, as: 'id'
195
+ property :kind, as: 'kind'
196
+ property :mobile_content_ads_settings, as: 'mobileContentAdsSettings', class: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings, decorator: Google::Apis::AdsensehostV4_1::AdUnit::MobileContentAdsSettings::Representation
197
+
198
+ property :name, as: 'name'
199
+ property :status, as: 'status'
200
+ end
201
+
202
+ class ContentAdsSettings
203
+ # @private
204
+ class Representation < Google::Apis::Core::JsonRepresentation
205
+ property :backup_option, as: 'backupOption', class: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption, decorator: Google::Apis::AdsensehostV4_1::AdUnit::ContentAdsSettings::BackupOption::Representation
206
+
207
+ property :size, as: 'size'
208
+ property :type, as: 'type'
209
+ end
210
+
211
+ class BackupOption
212
+ # @private
213
+ class Representation < Google::Apis::Core::JsonRepresentation
214
+ property :color, as: 'color'
215
+ property :type, as: 'type'
216
+ property :url, as: 'url'
217
+ end
218
+ end
219
+ end
220
+
221
+ class MobileContentAdsSettings
222
+ # @private
223
+ class Representation < Google::Apis::Core::JsonRepresentation
224
+ property :markup_language, as: 'markupLanguage'
225
+ property :scripting_language, as: 'scriptingLanguage'
226
+ property :size, as: 'size'
227
+ property :type, as: 'type'
228
+ end
229
+ end
230
+ end
231
+
232
+ class AdUnits
233
+ # @private
234
+ class Representation < Google::Apis::Core::JsonRepresentation
235
+ property :etag, as: 'etag'
236
+ collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::AdUnit, decorator: Google::Apis::AdsensehostV4_1::AdUnit::Representation
237
+
238
+ property :kind, as: 'kind'
239
+ property :next_page_token, as: 'nextPageToken'
240
+ end
241
+ end
242
+
243
+ class AssociationSession
244
+ # @private
245
+ class Representation < Google::Apis::Core::JsonRepresentation
246
+ property :account_id, as: 'accountId'
247
+ property :id, as: 'id'
248
+ property :kind, as: 'kind'
249
+ collection :product_codes, as: 'productCodes'
250
+ property :redirect_url, as: 'redirectUrl'
251
+ property :status, as: 'status'
252
+ property :user_locale, as: 'userLocale'
253
+ property :website_locale, as: 'websiteLocale'
254
+ property :website_url, as: 'websiteUrl'
255
+ end
256
+ end
257
+
258
+ class CustomChannel
259
+ # @private
260
+ class Representation < Google::Apis::Core::JsonRepresentation
261
+ property :code, as: 'code'
262
+ property :id, as: 'id'
263
+ property :kind, as: 'kind'
264
+ property :name, as: 'name'
265
+ end
266
+ end
267
+
268
+ class CustomChannels
269
+ # @private
270
+ class Representation < Google::Apis::Core::JsonRepresentation
271
+ property :etag, as: 'etag'
272
+ collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::CustomChannel, decorator: Google::Apis::AdsensehostV4_1::CustomChannel::Representation
273
+
274
+ property :kind, as: 'kind'
275
+ property :next_page_token, as: 'nextPageToken'
276
+ end
277
+ end
278
+
279
+ class Report
280
+ # @private
281
+ class Representation < Google::Apis::Core::JsonRepresentation
282
+ collection :averages, as: 'averages'
283
+ collection :headers, as: 'headers', class: Google::Apis::AdsensehostV4_1::Report::Header, decorator: Google::Apis::AdsensehostV4_1::Report::Header::Representation
284
+
285
+ property :kind, as: 'kind'
286
+ collection :rows, as: 'rows', :class => Array do
287
+ include Representable::JSON::Collection
288
+ items
289
+ end
290
+
291
+ property :total_matched_rows, as: 'totalMatchedRows'
292
+ collection :totals, as: 'totals'
293
+ collection :warnings, as: 'warnings'
294
+ end
295
+
296
+ class Header
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :currency, as: 'currency'
300
+ property :name, as: 'name'
301
+ property :type, as: 'type'
302
+ end
303
+ end
304
+ end
305
+
306
+ class UrlChannel
307
+ # @private
308
+ class Representation < Google::Apis::Core::JsonRepresentation
309
+ property :id, as: 'id'
310
+ property :kind, as: 'kind'
311
+ property :url_pattern, as: 'urlPattern'
312
+ end
313
+ end
314
+
315
+ class UrlChannels
316
+ # @private
317
+ class Representation < Google::Apis::Core::JsonRepresentation
318
+ property :etag, as: 'etag'
319
+ collection :items, as: 'items', class: Google::Apis::AdsensehostV4_1::UrlChannel, decorator: Google::Apis::AdsensehostV4_1::UrlChannel::Representation
320
+
321
+ property :kind, as: 'kind'
322
+ property :next_page_token, as: 'nextPageToken'
323
+ end
324
+ end
325
+ end
326
+ end
327
+ end
@@ -0,0 +1,1190 @@
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 AdsensehostV4_1
23
+ # AdSense Host API
24
+ #
25
+ # Gives AdSense Hosts access to report generation, ad code generation, and
26
+ # publisher management capabilities.
27
+ #
28
+ # @example
29
+ # require 'google/apis/adsensehost_v4_1'
30
+ #
31
+ # Adsensehost = Google::Apis::AdsensehostV4_1 # Alias the module
32
+ # service = Adsensehost::AdSenseHostService.new
33
+ #
34
+ # @see https://developers.google.com/adsense/host/
35
+ class AdSenseHostService < 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/', 'adsensehost/v4.1/')
54
+ end
55
+
56
+ # Get information about the selected associated AdSense account.
57
+ # @param [String] account_id
58
+ # Account to get information about.
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # Overrides userIp if both are provided.
65
+ # @param [String] user_ip
66
+ # IP address of the site where the request originates. Use this if you want to
67
+ # enforce per-user limits.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::Account] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::AdsensehostV4_1::Account]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def get_account(account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
81
+ path = 'accounts/{accountId}'
82
+ command = make_simple_command(:get, path, options)
83
+ command.response_representation = Google::Apis::AdsensehostV4_1::Account::Representation
84
+ command.response_class = Google::Apis::AdsensehostV4_1::Account
85
+ command.params['accountId'] = account_id unless account_id.nil?
86
+ command.query['fields'] = fields unless fields.nil?
87
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
88
+ command.query['userIp'] = user_ip unless user_ip.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # List hosted accounts associated with this AdSense account by ad client id.
93
+ # @param [Array<String>, String] filter_ad_client_id
94
+ # Ad clients to list accounts for.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # Overrides userIp if both are provided.
101
+ # @param [String] user_ip
102
+ # IP address of the site where the request originates. Use this if you want to
103
+ # enforce per-user limits.
104
+ # @param [Google::Apis::RequestOptions] options
105
+ # Request-specific options
106
+ #
107
+ # @yield [result, err] Result & error if block supplied
108
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::Accounts] parsed result object
109
+ # @yieldparam err [StandardError] error object if request failed
110
+ #
111
+ # @return [Google::Apis::AdsensehostV4_1::Accounts]
112
+ #
113
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
114
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
115
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
116
+ def list_accounts(filter_ad_client_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
117
+ path = 'accounts'
118
+ command = make_simple_command(:get, path, options)
119
+ command.response_representation = Google::Apis::AdsensehostV4_1::Accounts::Representation
120
+ command.response_class = Google::Apis::AdsensehostV4_1::Accounts
121
+ command.query['filterAdClientId'] = filter_ad_client_id unless filter_ad_client_id.nil?
122
+ command.query['fields'] = fields unless fields.nil?
123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
124
+ command.query['userIp'] = user_ip unless user_ip.nil?
125
+ execute_or_queue_command(command, &block)
126
+ end
127
+
128
+ # Get information about one of the ad clients in the specified publisher's
129
+ # AdSense account.
130
+ # @param [String] account_id
131
+ # Account which contains the ad client.
132
+ # @param [String] ad_client_id
133
+ # Ad client to get.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # Overrides userIp if both are provided.
140
+ # @param [String] user_ip
141
+ # IP address of the site where the request originates. Use this if you want to
142
+ # enforce per-user limits.
143
+ # @param [Google::Apis::RequestOptions] options
144
+ # Request-specific options
145
+ #
146
+ # @yield [result, err] Result & error if block supplied
147
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object
148
+ # @yieldparam err [StandardError] error object if request failed
149
+ #
150
+ # @return [Google::Apis::AdsensehostV4_1::AdClient]
151
+ #
152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
155
+ def get_account_ad_client(account_id, ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
156
+ path = 'accounts/{accountId}/adclients/{adClientId}'
157
+ command = make_simple_command(:get, path, options)
158
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
159
+ command.response_class = Google::Apis::AdsensehostV4_1::AdClient
160
+ command.params['accountId'] = account_id unless account_id.nil?
161
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
162
+ command.query['fields'] = fields unless fields.nil?
163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
164
+ command.query['userIp'] = user_ip unless user_ip.nil?
165
+ execute_or_queue_command(command, &block)
166
+ end
167
+
168
+ # List all hosted ad clients in the specified hosted account.
169
+ # @param [String] account_id
170
+ # Account for which to list ad clients.
171
+ # @param [Fixnum] max_results
172
+ # The maximum number of ad clients to include in the response, used for paging.
173
+ # @param [String] page_token
174
+ # A continuation token, used to page through ad clients. To retrieve the next
175
+ # page, set this parameter to the value of "nextPageToken" from the previous
176
+ # response.
177
+ # @param [String] fields
178
+ # Selector specifying which fields to include in a partial response.
179
+ # @param [String] quota_user
180
+ # Available to use for quota purposes for server-side applications. Can be any
181
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
182
+ # Overrides userIp if both are provided.
183
+ # @param [String] user_ip
184
+ # IP address of the site where the request originates. Use this if you want to
185
+ # enforce per-user limits.
186
+ # @param [Google::Apis::RequestOptions] options
187
+ # Request-specific options
188
+ #
189
+ # @yield [result, err] Result & error if block supplied
190
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClients] parsed result object
191
+ # @yieldparam err [StandardError] error object if request failed
192
+ #
193
+ # @return [Google::Apis::AdsensehostV4_1::AdClients]
194
+ #
195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
198
+ def list_account_ad_clients(account_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
199
+ path = 'accounts/{accountId}/adclients'
200
+ command = make_simple_command(:get, path, options)
201
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
202
+ command.response_class = Google::Apis::AdsensehostV4_1::AdClients
203
+ command.params['accountId'] = account_id unless account_id.nil?
204
+ command.query['maxResults'] = max_results unless max_results.nil?
205
+ command.query['pageToken'] = page_token unless page_token.nil?
206
+ command.query['fields'] = fields unless fields.nil?
207
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
208
+ command.query['userIp'] = user_ip unless user_ip.nil?
209
+ execute_or_queue_command(command, &block)
210
+ end
211
+
212
+ # Delete the specified ad unit from the specified publisher AdSense account.
213
+ # @param [String] account_id
214
+ # Account which contains the ad unit.
215
+ # @param [String] ad_client_id
216
+ # Ad client for which to get ad unit.
217
+ # @param [String] ad_unit_id
218
+ # Ad unit to delete.
219
+ # @param [String] fields
220
+ # Selector specifying which fields to include in a partial response.
221
+ # @param [String] quota_user
222
+ # Available to use for quota purposes for server-side applications. Can be any
223
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
224
+ # Overrides userIp if both are provided.
225
+ # @param [String] user_ip
226
+ # IP address of the site where the request originates. Use this if you want to
227
+ # enforce per-user limits.
228
+ # @param [Google::Apis::RequestOptions] options
229
+ # Request-specific options
230
+ #
231
+ # @yield [result, err] Result & error if block supplied
232
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
233
+ # @yieldparam err [StandardError] error object if request failed
234
+ #
235
+ # @return [Google::Apis::AdsensehostV4_1::AdUnit]
236
+ #
237
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
238
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
239
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
240
+ def delete_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
241
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}'
242
+ command = make_simple_command(:delete, path, options)
243
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
244
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
245
+ command.params['accountId'] = account_id unless account_id.nil?
246
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
247
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
248
+ command.query['fields'] = fields unless fields.nil?
249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
250
+ command.query['userIp'] = user_ip unless user_ip.nil?
251
+ execute_or_queue_command(command, &block)
252
+ end
253
+
254
+ # Get the specified host ad unit in this AdSense account.
255
+ # @param [String] account_id
256
+ # Account which contains the ad unit.
257
+ # @param [String] ad_client_id
258
+ # Ad client for which to get ad unit.
259
+ # @param [String] ad_unit_id
260
+ # Ad unit to get.
261
+ # @param [String] fields
262
+ # Selector specifying which fields to include in a partial response.
263
+ # @param [String] quota_user
264
+ # Available to use for quota purposes for server-side applications. Can be any
265
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
266
+ # Overrides userIp if both are provided.
267
+ # @param [String] user_ip
268
+ # IP address of the site where the request originates. Use this if you want to
269
+ # enforce per-user limits.
270
+ # @param [Google::Apis::RequestOptions] options
271
+ # Request-specific options
272
+ #
273
+ # @yield [result, err] Result & error if block supplied
274
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
275
+ # @yieldparam err [StandardError] error object if request failed
276
+ #
277
+ # @return [Google::Apis::AdsensehostV4_1::AdUnit]
278
+ #
279
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
280
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
281
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
282
+ def get_account_ad_unit(account_id, ad_client_id, ad_unit_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
283
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}'
284
+ command = make_simple_command(:get, path, options)
285
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
286
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
287
+ command.params['accountId'] = account_id unless account_id.nil?
288
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
289
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
290
+ command.query['fields'] = fields unless fields.nil?
291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
292
+ command.query['userIp'] = user_ip unless user_ip.nil?
293
+ execute_or_queue_command(command, &block)
294
+ end
295
+
296
+ # Get ad code for the specified ad unit, attaching the specified host custom
297
+ # channels.
298
+ # @param [String] account_id
299
+ # Account which contains the ad client.
300
+ # @param [String] ad_client_id
301
+ # Ad client with contains the ad unit.
302
+ # @param [String] ad_unit_id
303
+ # Ad unit to get the code for.
304
+ # @param [Array<String>, String] host_custom_channel_id
305
+ # Host custom channel to attach to the ad code.
306
+ # @param [String] fields
307
+ # Selector specifying which fields to include in a partial response.
308
+ # @param [String] quota_user
309
+ # Available to use for quota purposes for server-side applications. Can be any
310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
311
+ # Overrides userIp if both are provided.
312
+ # @param [String] user_ip
313
+ # IP address of the site where the request originates. Use this if you want to
314
+ # enforce per-user limits.
315
+ # @param [Google::Apis::RequestOptions] options
316
+ # Request-specific options
317
+ #
318
+ # @yield [result, err] Result & error if block supplied
319
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdCode] parsed result object
320
+ # @yieldparam err [StandardError] error object if request failed
321
+ #
322
+ # @return [Google::Apis::AdsensehostV4_1::AdCode]
323
+ #
324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
327
+ def get_account_ad_unit_ad_code(account_id, ad_client_id, ad_unit_id, host_custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
328
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode'
329
+ command = make_simple_command(:get, path, options)
330
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdCode::Representation
331
+ command.response_class = Google::Apis::AdsensehostV4_1::AdCode
332
+ command.params['accountId'] = account_id unless account_id.nil?
333
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
334
+ command.params['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
335
+ command.query['hostCustomChannelId'] = host_custom_channel_id unless host_custom_channel_id.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ command.query['userIp'] = user_ip unless user_ip.nil?
339
+ execute_or_queue_command(command, &block)
340
+ end
341
+
342
+ # Insert the supplied ad unit into the specified publisher AdSense account.
343
+ # @param [String] account_id
344
+ # Account which will contain the ad unit.
345
+ # @param [String] ad_client_id
346
+ # Ad client into which to insert the ad unit.
347
+ # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
348
+ # @param [String] fields
349
+ # Selector specifying which fields to include in a partial response.
350
+ # @param [String] quota_user
351
+ # Available to use for quota purposes for server-side applications. Can be any
352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
353
+ # Overrides userIp if both are provided.
354
+ # @param [String] user_ip
355
+ # IP address of the site where the request originates. Use this if you want to
356
+ # enforce per-user limits.
357
+ # @param [Google::Apis::RequestOptions] options
358
+ # Request-specific options
359
+ #
360
+ # @yield [result, err] Result & error if block supplied
361
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
362
+ # @yieldparam err [StandardError] error object if request failed
363
+ #
364
+ # @return [Google::Apis::AdsensehostV4_1::AdUnit]
365
+ #
366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
369
+ def insert_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
370
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits'
371
+ command = make_simple_command(:post, path, options)
372
+ command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
373
+ command.request_object = ad_unit_object
374
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
375
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
376
+ command.params['accountId'] = account_id unless account_id.nil?
377
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
378
+ command.query['fields'] = fields unless fields.nil?
379
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
380
+ command.query['userIp'] = user_ip unless user_ip.nil?
381
+ execute_or_queue_command(command, &block)
382
+ end
383
+
384
+ # List all ad units in the specified publisher's AdSense account.
385
+ # @param [String] account_id
386
+ # Account which contains the ad client.
387
+ # @param [String] ad_client_id
388
+ # Ad client for which to list ad units.
389
+ # @param [Boolean] include_inactive
390
+ # Whether to include inactive ad units. Default: true.
391
+ # @param [Fixnum] max_results
392
+ # The maximum number of ad units to include in the response, used for paging.
393
+ # @param [String] page_token
394
+ # A continuation token, used to page through ad units. To retrieve the next page,
395
+ # set this parameter to the value of "nextPageToken" from the previous response.
396
+ # @param [String] fields
397
+ # Selector specifying which fields to include in a partial response.
398
+ # @param [String] quota_user
399
+ # Available to use for quota purposes for server-side applications. Can be any
400
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
401
+ # Overrides userIp if both are provided.
402
+ # @param [String] user_ip
403
+ # IP address of the site where the request originates. Use this if you want to
404
+ # enforce per-user limits.
405
+ # @param [Google::Apis::RequestOptions] options
406
+ # Request-specific options
407
+ #
408
+ # @yield [result, err] Result & error if block supplied
409
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnits] parsed result object
410
+ # @yieldparam err [StandardError] error object if request failed
411
+ #
412
+ # @return [Google::Apis::AdsensehostV4_1::AdUnits]
413
+ #
414
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
415
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
416
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
417
+ 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)
418
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits'
419
+ command = make_simple_command(:get, path, options)
420
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnits::Representation
421
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnits
422
+ command.params['accountId'] = account_id unless account_id.nil?
423
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
424
+ command.query['includeInactive'] = include_inactive unless include_inactive.nil?
425
+ command.query['maxResults'] = max_results unless max_results.nil?
426
+ command.query['pageToken'] = page_token unless page_token.nil?
427
+ command.query['fields'] = fields unless fields.nil?
428
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
429
+ command.query['userIp'] = user_ip unless user_ip.nil?
430
+ execute_or_queue_command(command, &block)
431
+ end
432
+
433
+ # Update the supplied ad unit in the specified publisher AdSense account. This
434
+ # method supports patch semantics.
435
+ # @param [String] account_id
436
+ # Account which contains the ad client.
437
+ # @param [String] ad_client_id
438
+ # Ad client which contains the ad unit.
439
+ # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
440
+ # @param [String] ad_unit_id
441
+ # Ad unit to get.
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::AdsensehostV4_1::AdUnit] parsed result object
456
+ # @yieldparam err [StandardError] error object if request failed
457
+ #
458
+ # @return [Google::Apis::AdsensehostV4_1::AdUnit]
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 patch_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, ad_unit_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
464
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits'
465
+ command = make_simple_command(:patch, path, options)
466
+ command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
467
+ command.request_object = ad_unit_object
468
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
469
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
470
+ command.params['accountId'] = account_id unless account_id.nil?
471
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
472
+ command.query['adUnitId'] = ad_unit_id unless ad_unit_id.nil?
473
+ command.query['fields'] = fields unless fields.nil?
474
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
475
+ command.query['userIp'] = user_ip unless user_ip.nil?
476
+ execute_or_queue_command(command, &block)
477
+ end
478
+
479
+ # Update the supplied ad unit in the specified publisher AdSense account.
480
+ # @param [String] account_id
481
+ # Account which contains the ad client.
482
+ # @param [String] ad_client_id
483
+ # Ad client which contains the ad unit.
484
+ # @param [Google::Apis::AdsensehostV4_1::AdUnit] ad_unit_object
485
+ # @param [String] fields
486
+ # Selector specifying which fields to include in a partial response.
487
+ # @param [String] quota_user
488
+ # Available to use for quota purposes for server-side applications. Can be any
489
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
490
+ # Overrides userIp if both are provided.
491
+ # @param [String] user_ip
492
+ # IP address of the site where the request originates. Use this if you want to
493
+ # enforce per-user limits.
494
+ # @param [Google::Apis::RequestOptions] options
495
+ # Request-specific options
496
+ #
497
+ # @yield [result, err] Result & error if block supplied
498
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdUnit] parsed result object
499
+ # @yieldparam err [StandardError] error object if request failed
500
+ #
501
+ # @return [Google::Apis::AdsensehostV4_1::AdUnit]
502
+ #
503
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
504
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
505
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
506
+ def update_account_ad_unit(account_id, ad_client_id, ad_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
507
+ path = 'accounts/{accountId}/adclients/{adClientId}/adunits'
508
+ command = make_simple_command(:put, path, options)
509
+ command.request_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
510
+ command.request_object = ad_unit_object
511
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdUnit::Representation
512
+ command.response_class = Google::Apis::AdsensehostV4_1::AdUnit
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['fields'] = fields unless fields.nil?
516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
517
+ command.query['userIp'] = user_ip unless user_ip.nil?
518
+ execute_or_queue_command(command, &block)
519
+ end
520
+
521
+ # Generate an AdSense report based on the report request sent in the query
522
+ # parameters. Returns the result as JSON; to retrieve output in CSV format
523
+ # specify "alt=csv" as a query parameter.
524
+ # @param [String] account_id
525
+ # Hosted account upon which to report.
526
+ # @param [Array<String>, String] dimension
527
+ # Dimensions to base the report on.
528
+ # @param [String] end_date
529
+ # End of the date range to report on in "YYYY-MM-DD" format, inclusive.
530
+ # @param [Array<String>, String] filter
531
+ # Filters to be run on the report.
532
+ # @param [String] locale
533
+ # Optional locale to use for translating report output to a local language.
534
+ # Defaults to "en_US" if not specified.
535
+ # @param [Fixnum] max_results
536
+ # The maximum number of rows of report data to return.
537
+ # @param [Array<String>, String] metric
538
+ # Numeric columns to include in the report.
539
+ # @param [Array<String>, String] sort
540
+ # The name of a dimension or metric to sort the resulting report on, optionally
541
+ # prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
542
+ # specified, the column is sorted ascending.
543
+ # @param [String] start_date
544
+ # Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
545
+ # @param [Fixnum] start_index
546
+ # Index of the first row of report data to return.
547
+ # @param [String] fields
548
+ # Selector specifying which fields to include in a partial response.
549
+ # @param [String] quota_user
550
+ # Available to use for quota purposes for server-side applications. Can be any
551
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
552
+ # Overrides userIp if both are provided.
553
+ # @param [String] user_ip
554
+ # IP address of the site where the request originates. Use this if you want to
555
+ # enforce per-user limits.
556
+ # @param [Google::Apis::RequestOptions] options
557
+ # Request-specific options
558
+ #
559
+ # @yield [result, err] Result & error if block supplied
560
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object
561
+ # @yieldparam err [StandardError] error object if request failed
562
+ #
563
+ # @return [Google::Apis::AdsensehostV4_1::Report]
564
+ #
565
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
568
+ def generate_account_report(account_id, dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
569
+ path = 'accounts/{accountId}/reports'
570
+ command = make_simple_command(:get, path, options)
571
+ command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
572
+ command.response_class = Google::Apis::AdsensehostV4_1::Report
573
+ command.params['accountId'] = account_id unless account_id.nil?
574
+ command.query['dimension'] = dimension unless dimension.nil?
575
+ command.query['endDate'] = end_date unless end_date.nil?
576
+ command.query['filter'] = filter unless filter.nil?
577
+ command.query['locale'] = locale unless locale.nil?
578
+ command.query['maxResults'] = max_results unless max_results.nil?
579
+ command.query['metric'] = metric unless metric.nil?
580
+ command.query['sort'] = sort unless sort.nil?
581
+ command.query['startDate'] = start_date unless start_date.nil?
582
+ command.query['startIndex'] = start_index unless start_index.nil?
583
+ command.query['fields'] = fields unless fields.nil?
584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
585
+ command.query['userIp'] = user_ip unless user_ip.nil?
586
+ execute_or_queue_command(command, &block)
587
+ end
588
+
589
+ # Get information about one of the ad clients in the Host AdSense account.
590
+ # @param [String] ad_client_id
591
+ # Ad client to get.
592
+ # @param [String] fields
593
+ # Selector specifying which fields to include in a partial response.
594
+ # @param [String] quota_user
595
+ # Available to use for quota purposes for server-side applications. Can be any
596
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
597
+ # Overrides userIp if both are provided.
598
+ # @param [String] user_ip
599
+ # IP address of the site where the request originates. Use this if you want to
600
+ # enforce per-user limits.
601
+ # @param [Google::Apis::RequestOptions] options
602
+ # Request-specific options
603
+ #
604
+ # @yield [result, err] Result & error if block supplied
605
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClient] parsed result object
606
+ # @yieldparam err [StandardError] error object if request failed
607
+ #
608
+ # @return [Google::Apis::AdsensehostV4_1::AdClient]
609
+ #
610
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
611
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
612
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
613
+ def get_ad_client(ad_client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
614
+ path = 'adclients/{adClientId}'
615
+ command = make_simple_command(:get, path, options)
616
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdClient::Representation
617
+ command.response_class = Google::Apis::AdsensehostV4_1::AdClient
618
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
619
+ command.query['fields'] = fields unless fields.nil?
620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
621
+ command.query['userIp'] = user_ip unless user_ip.nil?
622
+ execute_or_queue_command(command, &block)
623
+ end
624
+
625
+ # List all host ad clients in this AdSense account.
626
+ # @param [Fixnum] max_results
627
+ # The maximum number of ad clients to include in the response, used for paging.
628
+ # @param [String] page_token
629
+ # A continuation token, used to page through ad clients. To retrieve the next
630
+ # page, set this parameter to the value of "nextPageToken" from the previous
631
+ # response.
632
+ # @param [String] fields
633
+ # Selector specifying which fields to include in a partial response.
634
+ # @param [String] quota_user
635
+ # Available to use for quota purposes for server-side applications. Can be any
636
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
637
+ # Overrides userIp if both are provided.
638
+ # @param [String] user_ip
639
+ # IP address of the site where the request originates. Use this if you want to
640
+ # enforce per-user limits.
641
+ # @param [Google::Apis::RequestOptions] options
642
+ # Request-specific options
643
+ #
644
+ # @yield [result, err] Result & error if block supplied
645
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AdClients] parsed result object
646
+ # @yieldparam err [StandardError] error object if request failed
647
+ #
648
+ # @return [Google::Apis::AdsensehostV4_1::AdClients]
649
+ #
650
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
651
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
652
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
653
+ def list_ad_clients(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
654
+ path = 'adclients'
655
+ command = make_simple_command(:get, path, options)
656
+ command.response_representation = Google::Apis::AdsensehostV4_1::AdClients::Representation
657
+ command.response_class = Google::Apis::AdsensehostV4_1::AdClients
658
+ command.query['maxResults'] = max_results unless max_results.nil?
659
+ command.query['pageToken'] = page_token unless page_token.nil?
660
+ command.query['fields'] = fields unless fields.nil?
661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
662
+ command.query['userIp'] = user_ip unless user_ip.nil?
663
+ execute_or_queue_command(command, &block)
664
+ end
665
+
666
+ # Create an association session for initiating an association with an AdSense
667
+ # user.
668
+ # @param [Array<String>, String] product_code
669
+ # Products to associate with the user.
670
+ # @param [String] user_locale
671
+ # The preferred locale of the user.
672
+ # @param [String] website_locale
673
+ # The locale of the user's hosted website.
674
+ # @param [String] website_url
675
+ # The URL of the user's hosted website.
676
+ # @param [String] fields
677
+ # Selector specifying which fields to include in a partial response.
678
+ # @param [String] quota_user
679
+ # Available to use for quota purposes for server-side applications. Can be any
680
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
681
+ # Overrides userIp if both are provided.
682
+ # @param [String] user_ip
683
+ # IP address of the site where the request originates. Use this if you want to
684
+ # enforce per-user limits.
685
+ # @param [Google::Apis::RequestOptions] options
686
+ # Request-specific options
687
+ #
688
+ # @yield [result, err] Result & error if block supplied
689
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AssociationSession] parsed result object
690
+ # @yieldparam err [StandardError] error object if request failed
691
+ #
692
+ # @return [Google::Apis::AdsensehostV4_1::AssociationSession]
693
+ #
694
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
695
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
696
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
697
+ def start_association_session(product_code: nil, user_locale: nil, website_locale: nil, website_url: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
698
+ path = 'associationsessions/start'
699
+ command = make_simple_command(:get, path, options)
700
+ command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
701
+ command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
702
+ command.query['productCode'] = product_code unless product_code.nil?
703
+ command.query['userLocale'] = user_locale unless user_locale.nil?
704
+ command.query['websiteLocale'] = website_locale unless website_locale.nil?
705
+ command.query['websiteUrl'] = website_url unless website_url.nil?
706
+ command.query['fields'] = fields unless fields.nil?
707
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
708
+ command.query['userIp'] = user_ip unless user_ip.nil?
709
+ execute_or_queue_command(command, &block)
710
+ end
711
+
712
+ # Verify an association session after the association callback returns from
713
+ # AdSense signup.
714
+ # @param [String] token
715
+ # The token returned to the association callback URL.
716
+ # @param [String] fields
717
+ # Selector specifying which fields to include in a partial response.
718
+ # @param [String] quota_user
719
+ # Available to use for quota purposes for server-side applications. Can be any
720
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
721
+ # Overrides userIp if both are provided.
722
+ # @param [String] user_ip
723
+ # IP address of the site where the request originates. Use this if you want to
724
+ # enforce per-user limits.
725
+ # @param [Google::Apis::RequestOptions] options
726
+ # Request-specific options
727
+ #
728
+ # @yield [result, err] Result & error if block supplied
729
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::AssociationSession] parsed result object
730
+ # @yieldparam err [StandardError] error object if request failed
731
+ #
732
+ # @return [Google::Apis::AdsensehostV4_1::AssociationSession]
733
+ #
734
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
735
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
736
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
737
+ def verify_association_session(token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
738
+ path = 'associationsessions/verify'
739
+ command = make_simple_command(:get, path, options)
740
+ command.response_representation = Google::Apis::AdsensehostV4_1::AssociationSession::Representation
741
+ command.response_class = Google::Apis::AdsensehostV4_1::AssociationSession
742
+ command.query['token'] = token unless token.nil?
743
+ command.query['fields'] = fields unless fields.nil?
744
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
745
+ command.query['userIp'] = user_ip unless user_ip.nil?
746
+ execute_or_queue_command(command, &block)
747
+ end
748
+
749
+ # Delete a specific custom channel from the host AdSense account.
750
+ # @param [String] ad_client_id
751
+ # Ad client from which to delete the custom channel.
752
+ # @param [String] custom_channel_id
753
+ # Custom channel to delete.
754
+ # @param [String] fields
755
+ # Selector specifying which fields to include in a partial response.
756
+ # @param [String] quota_user
757
+ # Available to use for quota purposes for server-side applications. Can be any
758
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
759
+ # Overrides userIp if both are provided.
760
+ # @param [String] user_ip
761
+ # IP address of the site where the request originates. Use this if you want to
762
+ # enforce per-user limits.
763
+ # @param [Google::Apis::RequestOptions] options
764
+ # Request-specific options
765
+ #
766
+ # @yield [result, err] Result & error if block supplied
767
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
768
+ # @yieldparam err [StandardError] error object if request failed
769
+ #
770
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
771
+ #
772
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
773
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
774
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
775
+ def delete_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
776
+ path = 'adclients/{adClientId}/customchannels/{customChannelId}'
777
+ command = make_simple_command(:delete, path, options)
778
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
779
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
780
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
781
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
782
+ command.query['fields'] = fields unless fields.nil?
783
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
784
+ command.query['userIp'] = user_ip unless user_ip.nil?
785
+ execute_or_queue_command(command, &block)
786
+ end
787
+
788
+ # Get a specific custom channel from the host AdSense account.
789
+ # @param [String] ad_client_id
790
+ # Ad client from which to get the custom channel.
791
+ # @param [String] custom_channel_id
792
+ # Custom channel to get.
793
+ # @param [String] fields
794
+ # Selector specifying which fields to include in a partial response.
795
+ # @param [String] quota_user
796
+ # Available to use for quota purposes for server-side applications. Can be any
797
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
798
+ # Overrides userIp if both are provided.
799
+ # @param [String] user_ip
800
+ # IP address of the site where the request originates. Use this if you want to
801
+ # enforce per-user limits.
802
+ # @param [Google::Apis::RequestOptions] options
803
+ # Request-specific options
804
+ #
805
+ # @yield [result, err] Result & error if block supplied
806
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
807
+ # @yieldparam err [StandardError] error object if request failed
808
+ #
809
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
810
+ #
811
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
812
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
813
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
814
+ def get_custom_channel(ad_client_id, custom_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
815
+ path = 'adclients/{adClientId}/customchannels/{customChannelId}'
816
+ command = make_simple_command(:get, path, options)
817
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
818
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
819
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
820
+ command.params['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
821
+ command.query['fields'] = fields unless fields.nil?
822
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
823
+ command.query['userIp'] = user_ip unless user_ip.nil?
824
+ execute_or_queue_command(command, &block)
825
+ end
826
+
827
+ # Add a new custom channel to the host AdSense account.
828
+ # @param [String] ad_client_id
829
+ # Ad client to which the new custom channel will be added.
830
+ # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
831
+ # @param [String] fields
832
+ # Selector specifying which fields to include in a partial response.
833
+ # @param [String] quota_user
834
+ # Available to use for quota purposes for server-side applications. Can be any
835
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
836
+ # Overrides userIp if both are provided.
837
+ # @param [String] user_ip
838
+ # IP address of the site where the request originates. Use this if you want to
839
+ # enforce per-user limits.
840
+ # @param [Google::Apis::RequestOptions] options
841
+ # Request-specific options
842
+ #
843
+ # @yield [result, err] Result & error if block supplied
844
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
845
+ # @yieldparam err [StandardError] error object if request failed
846
+ #
847
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
848
+ #
849
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
850
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
851
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
852
+ def insert_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
853
+ path = 'adclients/{adClientId}/customchannels'
854
+ command = make_simple_command(:post, path, options)
855
+ command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
856
+ command.request_object = custom_channel_object
857
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
858
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
859
+ command.params['adClientId'] = ad_client_id unless ad_client_id.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 host custom channels in this AdSense account.
867
+ # @param [String] ad_client_id
868
+ # Ad client for which to list custom channels.
869
+ # @param [Fixnum] max_results
870
+ # The maximum number of custom channels to include in the response, used for
871
+ # paging.
872
+ # @param [String] page_token
873
+ # A continuation token, used to page through custom channels. To retrieve the
874
+ # next page, set this parameter to the value of "nextPageToken" from the
875
+ # previous response.
876
+ # @param [String] fields
877
+ # Selector specifying which fields to include in a partial response.
878
+ # @param [String] quota_user
879
+ # Available to use for quota purposes for server-side applications. Can be any
880
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
881
+ # Overrides userIp if both are provided.
882
+ # @param [String] user_ip
883
+ # IP address of the site where the request originates. Use this if you want to
884
+ # enforce per-user limits.
885
+ # @param [Google::Apis::RequestOptions] options
886
+ # Request-specific options
887
+ #
888
+ # @yield [result, err] Result & error if block supplied
889
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannels] parsed result object
890
+ # @yieldparam err [StandardError] error object if request failed
891
+ #
892
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannels]
893
+ #
894
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
895
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
896
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
897
+ def list_custom_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
898
+ path = 'adclients/{adClientId}/customchannels'
899
+ command = make_simple_command(:get, path, options)
900
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannels::Representation
901
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannels
902
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
903
+ command.query['maxResults'] = max_results unless max_results.nil?
904
+ command.query['pageToken'] = page_token unless page_token.nil?
905
+ command.query['fields'] = fields unless fields.nil?
906
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
907
+ command.query['userIp'] = user_ip unless user_ip.nil?
908
+ execute_or_queue_command(command, &block)
909
+ end
910
+
911
+ # Update a custom channel in the host AdSense account. This method supports
912
+ # patch semantics.
913
+ # @param [String] ad_client_id
914
+ # Ad client in which the custom channel will be updated.
915
+ # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
916
+ # @param [String] custom_channel_id
917
+ # Custom channel to get.
918
+ # @param [String] fields
919
+ # Selector specifying which fields to include in a partial response.
920
+ # @param [String] quota_user
921
+ # Available to use for quota purposes for server-side applications. Can be any
922
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
923
+ # Overrides userIp if both are provided.
924
+ # @param [String] user_ip
925
+ # IP address of the site where the request originates. Use this if you want to
926
+ # enforce per-user limits.
927
+ # @param [Google::Apis::RequestOptions] options
928
+ # Request-specific options
929
+ #
930
+ # @yield [result, err] Result & error if block supplied
931
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
932
+ # @yieldparam err [StandardError] error object if request failed
933
+ #
934
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
935
+ #
936
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
937
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
938
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
939
+ def patch_custom_channel(ad_client_id, custom_channel_object = nil, custom_channel_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
940
+ path = 'adclients/{adClientId}/customchannels'
941
+ command = make_simple_command(:patch, path, options)
942
+ command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
943
+ command.request_object = custom_channel_object
944
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
945
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
946
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
947
+ command.query['customChannelId'] = custom_channel_id unless custom_channel_id.nil?
948
+ command.query['fields'] = fields unless fields.nil?
949
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
950
+ command.query['userIp'] = user_ip unless user_ip.nil?
951
+ execute_or_queue_command(command, &block)
952
+ end
953
+
954
+ # Update a custom channel in the host AdSense account.
955
+ # @param [String] ad_client_id
956
+ # Ad client in which the custom channel will be updated.
957
+ # @param [Google::Apis::AdsensehostV4_1::CustomChannel] custom_channel_object
958
+ # @param [String] fields
959
+ # Selector specifying which fields to include in a partial response.
960
+ # @param [String] quota_user
961
+ # Available to use for quota purposes for server-side applications. Can be any
962
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
963
+ # Overrides userIp if both are provided.
964
+ # @param [String] user_ip
965
+ # IP address of the site where the request originates. Use this if you want to
966
+ # enforce per-user limits.
967
+ # @param [Google::Apis::RequestOptions] options
968
+ # Request-specific options
969
+ #
970
+ # @yield [result, err] Result & error if block supplied
971
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::CustomChannel] parsed result object
972
+ # @yieldparam err [StandardError] error object if request failed
973
+ #
974
+ # @return [Google::Apis::AdsensehostV4_1::CustomChannel]
975
+ #
976
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
977
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
978
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
979
+ def update_custom_channel(ad_client_id, custom_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
980
+ path = 'adclients/{adClientId}/customchannels'
981
+ command = make_simple_command(:put, path, options)
982
+ command.request_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
983
+ command.request_object = custom_channel_object
984
+ command.response_representation = Google::Apis::AdsensehostV4_1::CustomChannel::Representation
985
+ command.response_class = Google::Apis::AdsensehostV4_1::CustomChannel
986
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
987
+ command.query['fields'] = fields unless fields.nil?
988
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
989
+ command.query['userIp'] = user_ip unless user_ip.nil?
990
+ execute_or_queue_command(command, &block)
991
+ end
992
+
993
+ # Generate an AdSense report based on the report request sent in the query
994
+ # parameters. Returns the result as JSON; to retrieve output in CSV format
995
+ # specify "alt=csv" as a query parameter.
996
+ # @param [Array<String>, String] dimension
997
+ # Dimensions to base the report on.
998
+ # @param [String] end_date
999
+ # End of the date range to report on in "YYYY-MM-DD" format, inclusive.
1000
+ # @param [Array<String>, String] filter
1001
+ # Filters to be run on the report.
1002
+ # @param [String] locale
1003
+ # Optional locale to use for translating report output to a local language.
1004
+ # Defaults to "en_US" if not specified.
1005
+ # @param [Fixnum] max_results
1006
+ # The maximum number of rows of report data to return.
1007
+ # @param [Array<String>, String] metric
1008
+ # Numeric columns to include in the report.
1009
+ # @param [Array<String>, String] sort
1010
+ # The name of a dimension or metric to sort the resulting report on, optionally
1011
+ # prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is
1012
+ # specified, the column is sorted ascending.
1013
+ # @param [String] start_date
1014
+ # Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
1015
+ # @param [Fixnum] start_index
1016
+ # Index of the first row of report data to return.
1017
+ # @param [String] fields
1018
+ # Selector specifying which fields to include in a partial response.
1019
+ # @param [String] quota_user
1020
+ # Available to use for quota purposes for server-side applications. Can be any
1021
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1022
+ # Overrides userIp if both are provided.
1023
+ # @param [String] user_ip
1024
+ # IP address of the site where the request originates. Use this if you want to
1025
+ # enforce per-user limits.
1026
+ # @param [Google::Apis::RequestOptions] options
1027
+ # Request-specific options
1028
+ #
1029
+ # @yield [result, err] Result & error if block supplied
1030
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::Report] parsed result object
1031
+ # @yieldparam err [StandardError] error object if request failed
1032
+ #
1033
+ # @return [Google::Apis::AdsensehostV4_1::Report]
1034
+ #
1035
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1036
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1037
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1038
+ def generate_report(dimension: nil, end_date: nil, filter: nil, locale: nil, max_results: nil, metric: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1039
+ path = 'reports'
1040
+ command = make_simple_command(:get, path, options)
1041
+ command.response_representation = Google::Apis::AdsensehostV4_1::Report::Representation
1042
+ command.response_class = Google::Apis::AdsensehostV4_1::Report
1043
+ command.query['dimension'] = dimension unless dimension.nil?
1044
+ command.query['endDate'] = end_date unless end_date.nil?
1045
+ command.query['filter'] = filter unless filter.nil?
1046
+ command.query['locale'] = locale unless locale.nil?
1047
+ command.query['maxResults'] = max_results unless max_results.nil?
1048
+ command.query['metric'] = metric unless metric.nil?
1049
+ command.query['sort'] = sort unless sort.nil?
1050
+ command.query['startDate'] = start_date unless start_date.nil?
1051
+ command.query['startIndex'] = start_index unless start_index.nil?
1052
+ command.query['fields'] = fields unless fields.nil?
1053
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1054
+ command.query['userIp'] = user_ip unless user_ip.nil?
1055
+ execute_or_queue_command(command, &block)
1056
+ end
1057
+
1058
+ # Delete a URL channel from the host AdSense account.
1059
+ # @param [String] ad_client_id
1060
+ # Ad client from which to delete the URL channel.
1061
+ # @param [String] url_channel_id
1062
+ # URL channel to delete.
1063
+ # @param [String] fields
1064
+ # Selector specifying which fields to include in a partial response.
1065
+ # @param [String] quota_user
1066
+ # Available to use for quota purposes for server-side applications. Can be any
1067
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1068
+ # Overrides userIp if both are provided.
1069
+ # @param [String] user_ip
1070
+ # IP address of the site where the request originates. Use this if you want to
1071
+ # enforce per-user limits.
1072
+ # @param [Google::Apis::RequestOptions] options
1073
+ # Request-specific options
1074
+ #
1075
+ # @yield [result, err] Result & error if block supplied
1076
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannel] parsed result object
1077
+ # @yieldparam err [StandardError] error object if request failed
1078
+ #
1079
+ # @return [Google::Apis::AdsensehostV4_1::UrlChannel]
1080
+ #
1081
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1082
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1083
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1084
+ def delete_url_channel(ad_client_id, url_channel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1085
+ path = 'adclients/{adClientId}/urlchannels/{urlChannelId}'
1086
+ command = make_simple_command(:delete, path, options)
1087
+ command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
1088
+ command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
1089
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1090
+ command.params['urlChannelId'] = url_channel_id unless url_channel_id.nil?
1091
+ command.query['fields'] = fields unless fields.nil?
1092
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1093
+ command.query['userIp'] = user_ip unless user_ip.nil?
1094
+ execute_or_queue_command(command, &block)
1095
+ end
1096
+
1097
+ # Add a new URL channel to the host AdSense account.
1098
+ # @param [String] ad_client_id
1099
+ # Ad client to which the new URL channel will be added.
1100
+ # @param [Google::Apis::AdsensehostV4_1::UrlChannel] url_channel_object
1101
+ # @param [String] fields
1102
+ # Selector specifying which fields to include in a partial response.
1103
+ # @param [String] quota_user
1104
+ # Available to use for quota purposes for server-side applications. Can be any
1105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1106
+ # Overrides userIp if both are provided.
1107
+ # @param [String] user_ip
1108
+ # IP address of the site where the request originates. Use this if you want to
1109
+ # enforce per-user limits.
1110
+ # @param [Google::Apis::RequestOptions] options
1111
+ # Request-specific options
1112
+ #
1113
+ # @yield [result, err] Result & error if block supplied
1114
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannel] parsed result object
1115
+ # @yieldparam err [StandardError] error object if request failed
1116
+ #
1117
+ # @return [Google::Apis::AdsensehostV4_1::UrlChannel]
1118
+ #
1119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1122
+ def insert_url_channel(ad_client_id, url_channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1123
+ path = 'adclients/{adClientId}/urlchannels'
1124
+ command = make_simple_command(:post, path, options)
1125
+ command.request_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
1126
+ command.request_object = url_channel_object
1127
+ command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannel::Representation
1128
+ command.response_class = Google::Apis::AdsensehostV4_1::UrlChannel
1129
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1130
+ command.query['fields'] = fields unless fields.nil?
1131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1132
+ command.query['userIp'] = user_ip unless user_ip.nil?
1133
+ execute_or_queue_command(command, &block)
1134
+ end
1135
+
1136
+ # List all host URL channels in the host AdSense account.
1137
+ # @param [String] ad_client_id
1138
+ # Ad client for which to list URL channels.
1139
+ # @param [Fixnum] max_results
1140
+ # The maximum number of URL channels to include in the response, used for paging.
1141
+ # @param [String] page_token
1142
+ # A continuation token, used to page through URL channels. To retrieve the next
1143
+ # page, set this parameter to the value of "nextPageToken" from the previous
1144
+ # response.
1145
+ # @param [String] fields
1146
+ # Selector specifying which fields to include in a partial response.
1147
+ # @param [String] quota_user
1148
+ # Available to use for quota purposes for server-side applications. Can be any
1149
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1150
+ # Overrides userIp if both are provided.
1151
+ # @param [String] user_ip
1152
+ # IP address of the site where the request originates. Use this if you want to
1153
+ # enforce per-user limits.
1154
+ # @param [Google::Apis::RequestOptions] options
1155
+ # Request-specific options
1156
+ #
1157
+ # @yield [result, err] Result & error if block supplied
1158
+ # @yieldparam result [Google::Apis::AdsensehostV4_1::UrlChannels] parsed result object
1159
+ # @yieldparam err [StandardError] error object if request failed
1160
+ #
1161
+ # @return [Google::Apis::AdsensehostV4_1::UrlChannels]
1162
+ #
1163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1166
+ def list_url_channels(ad_client_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1167
+ path = 'adclients/{adClientId}/urlchannels'
1168
+ command = make_simple_command(:get, path, options)
1169
+ command.response_representation = Google::Apis::AdsensehostV4_1::UrlChannels::Representation
1170
+ command.response_class = Google::Apis::AdsensehostV4_1::UrlChannels
1171
+ command.params['adClientId'] = ad_client_id unless ad_client_id.nil?
1172
+ command.query['maxResults'] = max_results unless max_results.nil?
1173
+ command.query['pageToken'] = page_token unless page_token.nil?
1174
+ command.query['fields'] = fields unless fields.nil?
1175
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1176
+ command.query['userIp'] = user_ip unless user_ip.nil?
1177
+ execute_or_queue_command(command, &block)
1178
+ end
1179
+
1180
+ protected
1181
+
1182
+ def apply_command_defaults(command)
1183
+ command.query['key'] = key unless key.nil?
1184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1185
+ command.query['userIp'] = user_ip unless user_ip.nil?
1186
+ end
1187
+ end
1188
+ end
1189
+ end
1190
+ end