google-api-client 0.9.8 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -0,0 +1,844 @@
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 Adexchangebuyer2V2beta1
23
+ # Ad Exchange Buyer API II
24
+ #
25
+ # Accesses the latest features for managing Ad Exchange accounts, Real-Time
26
+ # Bidding configurations and auction metrics, and Marketplace programmatic deals.
27
+ #
28
+ # @example
29
+ # require 'google/apis/adexchangebuyer2_v2beta1'
30
+ #
31
+ # Adexchangebuyer2 = Google::Apis::Adexchangebuyer2V2beta1 # Alias the module
32
+ # service = Adexchangebuyer2::AdExchangeBuyerIIService.new
33
+ #
34
+ # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/
35
+ class AdExchangeBuyerIIService < 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
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://adexchangebuyer.googleapis.com/', '')
48
+ end
49
+
50
+ # Gets a client buyer with a given client account ID.
51
+ # @param [String] account_id
52
+ # Numerical account ID of the client's sponsor buyer. (required)
53
+ # @param [String] client_account_id
54
+ # Numerical account ID of the client buyer to retrieve. (required)
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_account_client(account_id, client_account_id, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options)
74
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
75
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
76
+ command.params['accountId'] = account_id unless account_id.nil?
77
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists all the clients for the current sponsor buyer.
84
+ # @param [String] account_id
85
+ # Unique numerical account ID of the sponsor buyer to list the clients for.
86
+ # @param [String] page_token
87
+ # A token identifying a page of results the server should return.
88
+ # Typically, this is the value of
89
+ # ListClientsResponse.nextPageToken
90
+ # returned from the previous call to the
91
+ # accounts.clients.list method.
92
+ # @param [Fixnum] page_size
93
+ # Requested page size. The server may return fewer clients than requested.
94
+ # If unspecified, the server will pick an appropriate default.
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
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_account_clients(account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients', options)
114
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse::Representation
115
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse
116
+ command.params['accountId'] = account_id unless account_id.nil?
117
+ command.query['pageToken'] = page_token unless page_token.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Updates an existing client buyer.
125
+ # @param [String] account_id
126
+ # Unique numerical account ID for the buyer of which the client buyer
127
+ # is a customer; the sponsor buyer to update a client for. (required)
128
+ # @param [String] client_account_id
129
+ # Unique numerical account ID of the client to update. (required)
130
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def update_account_client(account_id, client_account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options)
150
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
151
+ command.request_object = client_object
152
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
153
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
154
+ command.params['accountId'] = account_id unless account_id.nil?
155
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
156
+ command.query['fields'] = fields unless fields.nil?
157
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
+ execute_or_queue_command(command, &block)
159
+ end
160
+
161
+ # Creates a new client buyer.
162
+ # @param [String] account_id
163
+ # Unique numerical account ID for the buyer of which the client buyer
164
+ # is a customer; the sponsor buyer to create a client for. (required)
165
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object
166
+ # @param [String] fields
167
+ # Selector specifying which fields to include in a partial response.
168
+ # @param [String] quota_user
169
+ # Available to use for quota purposes for server-side applications. Can be any
170
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
171
+ # @param [Google::Apis::RequestOptions] options
172
+ # Request-specific options
173
+ #
174
+ # @yield [result, err] Result & error if block supplied
175
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object
176
+ # @yieldparam err [StandardError] error object if request failed
177
+ #
178
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Client]
179
+ #
180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
183
+ def create_account_client(account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options)
185
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
186
+ command.request_object = client_object
187
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation
188
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client
189
+ command.params['accountId'] = account_id unless account_id.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Creates and sends out an email invitation to access
196
+ # an Ad Exchange client buyer account.
197
+ # @param [String] account_id
198
+ # Numerical account ID of the client's sponsor buyer. (required)
199
+ # @param [String] client_account_id
200
+ # Numerical account ID of the client buyer that the user
201
+ # should be associated with. (required)
202
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_object
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
205
+ # @param [String] quota_user
206
+ # Available to use for quota purposes for server-side applications. Can be any
207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
208
+ # @param [Google::Apis::RequestOptions] options
209
+ # Request-specific options
210
+ #
211
+ # @yield [result, err] Result & error if block supplied
212
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] parsed result object
213
+ # @yieldparam err [StandardError] error object if request failed
214
+ #
215
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation]
216
+ #
217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
220
+ def create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
221
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options)
222
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
223
+ command.request_object = client_user_invitation_object
224
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
225
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation
226
+ command.params['accountId'] = account_id unless account_id.nil?
227
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ execute_or_queue_command(command, &block)
231
+ end
232
+
233
+ # Retrieves an existing client user invitation.
234
+ # @param [String] account_id
235
+ # Numerical account ID of the client's sponsor buyer. (required)
236
+ # @param [String] client_account_id
237
+ # Numerical account ID of the client buyer that the user invitation
238
+ # to be retrieved is associated with. (required)
239
+ # @param [String] invitation_id
240
+ # Numerical identifier of the user invitation to retrieve. (required)
241
+ # @param [String] fields
242
+ # Selector specifying which fields to include in a partial response.
243
+ # @param [String] quota_user
244
+ # Available to use for quota purposes for server-side applications. Can be any
245
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
246
+ # @param [Google::Apis::RequestOptions] options
247
+ # Request-specific options
248
+ #
249
+ # @yield [result, err] Result & error if block supplied
250
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] parsed result object
251
+ # @yieldparam err [StandardError] error object if request failed
252
+ #
253
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation]
254
+ #
255
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
256
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
257
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
258
+ def get_account_client_invitation(account_id, client_account_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
259
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}', options)
260
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation
261
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation
262
+ command.params['accountId'] = account_id unless account_id.nil?
263
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
264
+ command.params['invitationId'] = invitation_id unless invitation_id.nil?
265
+ command.query['fields'] = fields unless fields.nil?
266
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
267
+ execute_or_queue_command(command, &block)
268
+ end
269
+
270
+ # Lists all the client users invitations for a client
271
+ # with a given account ID.
272
+ # @param [String] account_id
273
+ # Numerical account ID of the client's sponsor buyer. (required)
274
+ # @param [String] client_account_id
275
+ # Numerical account ID of the client buyer to list invitations for.
276
+ # (required)
277
+ # You must either specify a string representation of a
278
+ # numerical account identifier or the `-` character
279
+ # to list all the invitations for all the clients
280
+ # of a given sponsor buyer.
281
+ # @param [String] page_token
282
+ # A token identifying a page of results the server should return.
283
+ # Typically, this is the value of
284
+ # ListClientUserInvitationsResponse.nextPageToken
285
+ # returned from the previous call to the
286
+ # clients.invitations.list
287
+ # method.
288
+ # @param [Fixnum] page_size
289
+ # Requested page size. Server may return fewer clients than requested.
290
+ # If unspecified, server will pick an appropriate default.
291
+ # @param [String] fields
292
+ # Selector specifying which fields to include in a partial response.
293
+ # @param [String] quota_user
294
+ # Available to use for quota purposes for server-side applications. Can be any
295
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
296
+ # @param [Google::Apis::RequestOptions] options
297
+ # Request-specific options
298
+ #
299
+ # @yield [result, err] Result & error if block supplied
300
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse] parsed result object
301
+ # @yieldparam err [StandardError] error object if request failed
302
+ #
303
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse]
304
+ #
305
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
306
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
307
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
308
+ def list_account_client_invitations(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
309
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options)
310
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse::Representation
311
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse
312
+ command.params['accountId'] = account_id unless account_id.nil?
313
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
314
+ command.query['pageToken'] = page_token unless page_token.nil?
315
+ command.query['pageSize'] = page_size unless page_size.nil?
316
+ command.query['fields'] = fields unless fields.nil?
317
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
318
+ execute_or_queue_command(command, &block)
319
+ end
320
+
321
+ # Updates an existing client user.
322
+ # Only the user status can be changed on update.
323
+ # @param [String] account_id
324
+ # Numerical account ID of the client's sponsor buyer. (required)
325
+ # @param [String] client_account_id
326
+ # Numerical account ID of the client buyer that the user to be retrieved
327
+ # is associated with. (required)
328
+ # @param [String] user_id
329
+ # Numerical identifier of the user to retrieve. (required)
330
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_object
331
+ # @param [String] fields
332
+ # Selector specifying which fields to include in a partial response.
333
+ # @param [String] quota_user
334
+ # Available to use for quota purposes for server-side applications. Can be any
335
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
336
+ # @param [Google::Apis::RequestOptions] options
337
+ # Request-specific options
338
+ #
339
+ # @yield [result, err] Result & error if block supplied
340
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object
341
+ # @yieldparam err [StandardError] error object if request failed
342
+ #
343
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser]
344
+ #
345
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
346
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
347
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
348
+ def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
349
+ command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options)
350
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
351
+ command.request_object = client_user_object
352
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
353
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser
354
+ command.params['accountId'] = account_id unless account_id.nil?
355
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
356
+ command.params['userId'] = user_id unless user_id.nil?
357
+ command.query['fields'] = fields unless fields.nil?
358
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
359
+ execute_or_queue_command(command, &block)
360
+ end
361
+
362
+ # Lists all the known client users for a specified
363
+ # sponsor buyer account ID.
364
+ # @param [String] account_id
365
+ # Numerical account ID of the sponsor buyer of the client to list users for.
366
+ # (required)
367
+ # @param [String] client_account_id
368
+ # The account ID of the client buyer to list users for. (required)
369
+ # You must specify either a string representation of a
370
+ # numerical account identifier or the `-` character
371
+ # to list all the client users for all the clients
372
+ # of a given sponsor buyer.
373
+ # @param [String] page_token
374
+ # A token identifying a page of results the server should return.
375
+ # Typically, this is the value of
376
+ # ListClientUsersResponse.nextPageToken
377
+ # returned from the previous call to the
378
+ # accounts.clients.users.list method.
379
+ # @param [Fixnum] page_size
380
+ # Requested page size. The server may return fewer clients than requested.
381
+ # If unspecified, the server will pick an appropriate default.
382
+ # @param [String] fields
383
+ # Selector specifying which fields to include in a partial response.
384
+ # @param [String] quota_user
385
+ # Available to use for quota purposes for server-side applications. Can be any
386
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
387
+ # @param [Google::Apis::RequestOptions] options
388
+ # Request-specific options
389
+ #
390
+ # @yield [result, err] Result & error if block supplied
391
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse] parsed result object
392
+ # @yieldparam err [StandardError] error object if request failed
393
+ #
394
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse]
395
+ #
396
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
397
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
398
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
399
+ def list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
400
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options)
401
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation
402
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse
403
+ command.params['accountId'] = account_id unless account_id.nil?
404
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
405
+ command.query['pageToken'] = page_token unless page_token.nil?
406
+ command.query['pageSize'] = page_size unless page_size.nil?
407
+ command.query['fields'] = fields unless fields.nil?
408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
409
+ execute_or_queue_command(command, &block)
410
+ end
411
+
412
+ # Retrieves an existing client user.
413
+ # @param [String] account_id
414
+ # Numerical account ID of the client's sponsor buyer. (required)
415
+ # @param [String] client_account_id
416
+ # Numerical account ID of the client buyer
417
+ # that the user to be retrieved is associated with. (required)
418
+ # @param [String] user_id
419
+ # Numerical identifier of the user to retrieve. (required)
420
+ # @param [String] fields
421
+ # Selector specifying which fields to include in a partial response.
422
+ # @param [String] quota_user
423
+ # Available to use for quota purposes for server-side applications. Can be any
424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
425
+ # @param [Google::Apis::RequestOptions] options
426
+ # Request-specific options
427
+ #
428
+ # @yield [result, err] Result & error if block supplied
429
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object
430
+ # @yieldparam err [StandardError] error object if request failed
431
+ #
432
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser]
433
+ #
434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
437
+ def get_account_client_user(account_id, client_account_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
438
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options)
439
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation
440
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser
441
+ command.params['accountId'] = account_id unless account_id.nil?
442
+ command.params['clientAccountId'] = client_account_id unless client_account_id.nil?
443
+ command.params['userId'] = user_id unless user_id.nil?
444
+ command.query['fields'] = fields unless fields.nil?
445
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
446
+ execute_or_queue_command(command, &block)
447
+ end
448
+
449
+ # Creates a creative.
450
+ # @param [String] account_id
451
+ # The account that this creative belongs to.
452
+ # Can be used to filter the response of the
453
+ # creatives.list
454
+ # method.
455
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object
456
+ # @param [String] duplicate_id_mode
457
+ # Indicates if multiple creatives can share an ID or not. Default is
458
+ # NO_DUPLICATES (one ID per creative).
459
+ # @param [String] fields
460
+ # Selector specifying which fields to include in a partial response.
461
+ # @param [String] quota_user
462
+ # Available to use for quota purposes for server-side applications. Can be any
463
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
464
+ # @param [Google::Apis::RequestOptions] options
465
+ # Request-specific options
466
+ #
467
+ # @yield [result, err] Result & error if block supplied
468
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object
469
+ # @yieldparam err [StandardError] error object if request failed
470
+ #
471
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
472
+ #
473
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
474
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
475
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
476
+ def create_account_creative(account_id, creative_object = nil, duplicate_id_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
477
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives', options)
478
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
479
+ command.request_object = creative_object
480
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
481
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
482
+ command.params['accountId'] = account_id unless account_id.nil?
483
+ command.query['duplicateIdMode'] = duplicate_id_mode unless duplicate_id_mode.nil?
484
+ command.query['fields'] = fields unless fields.nil?
485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
486
+ execute_or_queue_command(command, &block)
487
+ end
488
+
489
+ # Stops watching a creative. Will stop push notifications being sent to the
490
+ # topics when the creative changes status.
491
+ # @param [String] account_id
492
+ # The account of the creative to stop notifications for.
493
+ # @param [String] creative_id
494
+ # The creative ID of the creative to stop notifications for.
495
+ # Specify "-" to specify stopping account level notifications.
496
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest] stop_watching_creative_request_object
497
+ # @param [String] fields
498
+ # Selector specifying which fields to include in a partial response.
499
+ # @param [String] quota_user
500
+ # Available to use for quota purposes for server-side applications. Can be any
501
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
502
+ # @param [Google::Apis::RequestOptions] options
503
+ # Request-specific options
504
+ #
505
+ # @yield [result, err] Result & error if block supplied
506
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object
507
+ # @yieldparam err [StandardError] error object if request failed
508
+ #
509
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Empty]
510
+ #
511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
514
+ def stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
515
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching', options)
516
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest::Representation
517
+ command.request_object = stop_watching_creative_request_object
518
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
519
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
520
+ command.params['accountId'] = account_id unless account_id.nil?
521
+ command.params['creativeId'] = creative_id unless creative_id.nil?
522
+ command.query['fields'] = fields unless fields.nil?
523
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
524
+ execute_or_queue_command(command, &block)
525
+ end
526
+
527
+ # Gets a creative.
528
+ # @param [String] account_id
529
+ # The account the creative belongs to.
530
+ # @param [String] creative_id
531
+ # The ID of the creative to retrieve.
532
+ # @param [String] fields
533
+ # Selector specifying which fields to include in a partial response.
534
+ # @param [String] quota_user
535
+ # Available to use for quota purposes for server-side applications. Can be any
536
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
537
+ # @param [Google::Apis::RequestOptions] options
538
+ # Request-specific options
539
+ #
540
+ # @yield [result, err] Result & error if block supplied
541
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object
542
+ # @yieldparam err [StandardError] error object if request failed
543
+ #
544
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
545
+ #
546
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
547
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
548
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
549
+ def get_account_creative(account_id, creative_id, fields: nil, quota_user: nil, options: nil, &block)
550
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options)
551
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
552
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
553
+ command.params['accountId'] = account_id unless account_id.nil?
554
+ command.params['creativeId'] = creative_id unless creative_id.nil?
555
+ command.query['fields'] = fields unless fields.nil?
556
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
557
+ execute_or_queue_command(command, &block)
558
+ end
559
+
560
+ # Watches a creative. Will result in push notifications being sent to the
561
+ # topic when the creative changes status.
562
+ # @param [String] account_id
563
+ # The account of the creative to watch.
564
+ # @param [String] creative_id
565
+ # The creative ID to watch for status changes.
566
+ # Specify "-" to watch all creatives under the above account.
567
+ # If both creative-level and account-level notifications are
568
+ # sent, only a single notification will be sent to the
569
+ # creative-level notification topic.
570
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest] watch_creative_request_object
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Empty]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def watch_creative(account_id, creative_id, watch_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:watch', options)
590
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest::Representation
591
+ command.request_object = watch_creative_request_object
592
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
593
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
594
+ command.params['accountId'] = account_id unless account_id.nil?
595
+ command.params['creativeId'] = creative_id unless creative_id.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Updates a creative.
602
+ # @param [String] account_id
603
+ # The account that this creative belongs to.
604
+ # Can be used to filter the response of the
605
+ # creatives.list
606
+ # method.
607
+ # @param [String] creative_id
608
+ # The buyer-defined creative ID of this creative.
609
+ # Can be used to filter the response of the
610
+ # creatives.list
611
+ # method.
612
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object
613
+ # @param [String] fields
614
+ # Selector specifying which fields to include in a partial response.
615
+ # @param [String] quota_user
616
+ # Available to use for quota purposes for server-side applications. Can be any
617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
618
+ # @param [Google::Apis::RequestOptions] options
619
+ # Request-specific options
620
+ #
621
+ # @yield [result, err] Result & error if block supplied
622
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object
623
+ # @yieldparam err [StandardError] error object if request failed
624
+ #
625
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative]
626
+ #
627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
630
+ def update_account_creative(account_id, creative_id, creative_object = nil, fields: nil, quota_user: nil, options: nil, &block)
631
+ command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options)
632
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
633
+ command.request_object = creative_object
634
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation
635
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative
636
+ command.params['accountId'] = account_id unless account_id.nil?
637
+ command.params['creativeId'] = creative_id unless creative_id.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ execute_or_queue_command(command, &block)
641
+ end
642
+
643
+ # Lists creatives.
644
+ # @param [String] account_id
645
+ # The account to list the creatives from.
646
+ # Specify "-" to list all creatives the current user has access to.
647
+ # @param [String] page_token
648
+ # A token identifying a page of results the server should return.
649
+ # Typically, this is the value of
650
+ # ListCreativesResponse.next_page_token
651
+ # returned from the previous call to 'ListCreatives' method.
652
+ # @param [Fixnum] page_size
653
+ # Requested page size. The server may return fewer creatives than requested
654
+ # (due to timeout constraint) even if more are available via another call.
655
+ # If unspecified, server will pick an appropriate default.
656
+ # Acceptable values are 1 to 1000, inclusive.
657
+ # @param [String] query
658
+ # An optional query string to filter creatives. If no filter is specified,
659
+ # all active creatives will be returned.
660
+ # Supported queries are:
661
+ # <ul>
662
+ # <li>accountId=<i>account_id_string</i>
663
+ # <li>creativeId=<i>creative_id_string</i>
664
+ # <li>dealsStatus: `approved, conditionally_approved, disapproved,
665
+ # not_checked`
666
+ # <li>openAuctionStatus: `approved, conditionally_approved, disapproved,
667
+ # not_checked`
668
+ # <li>attribute: `a numeric attribute from the list of attributes`
669
+ # <li>disapprovalReason: `a reason from DisapprovalReason
670
+ # </ul>
671
+ # Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:
672
+ # unacceptable_content) OR attribute:47'
673
+ # @param [String] fields
674
+ # Selector specifying which fields to include in a partial response.
675
+ # @param [String] quota_user
676
+ # Available to use for quota purposes for server-side applications. Can be any
677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
678
+ # @param [Google::Apis::RequestOptions] options
679
+ # Request-specific options
680
+ #
681
+ # @yield [result, err] Result & error if block supplied
682
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse] parsed result object
683
+ # @yieldparam err [StandardError] error object if request failed
684
+ #
685
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse]
686
+ #
687
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
688
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
689
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
690
+ def list_account_creatives(account_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
691
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives', options)
692
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse::Representation
693
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse
694
+ command.params['accountId'] = account_id unless account_id.nil?
695
+ command.query['pageToken'] = page_token unless page_token.nil?
696
+ command.query['pageSize'] = page_size unless page_size.nil?
697
+ command.query['query'] = query unless query.nil?
698
+ command.query['fields'] = fields unless fields.nil?
699
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
700
+ execute_or_queue_command(command, &block)
701
+ end
702
+
703
+ # List all creative-deal associations.
704
+ # @param [String] account_id
705
+ # The account to list the associations from.
706
+ # Specify "-" to list all creatives the current user has access to.
707
+ # @param [String] creative_id
708
+ # The creative ID to list the associations from.
709
+ # Specify "-" to list all creatives under the above account.
710
+ # @param [String] page_token
711
+ # A token identifying a page of results the server should return.
712
+ # Typically, this is the value of
713
+ # ListDealAssociationsResponse.next_page_token
714
+ # returned from the previous call to 'ListDealAssociations' method.
715
+ # @param [Fixnum] page_size
716
+ # Requested page size. Server may return fewer associations than requested.
717
+ # If unspecified, server will pick an appropriate default.
718
+ # @param [String] query
719
+ # An optional query string to filter deal associations. If no filter is
720
+ # specified, all associations will be returned.
721
+ # Supported queries are:
722
+ # <ul>
723
+ # <li>accountId=<i>account_id_string</i>
724
+ # <li>creativeId=<i>creative_id_string</i>
725
+ # <li>dealsId=<i>deals_id_string</i>
726
+ # <li>dealsStatus:`approved, conditionally_approved, disapproved,
727
+ # not_checked`
728
+ # <li>openAuctionStatus:`approved, conditionally_approved, disapproved,
729
+ # not_checked`
730
+ # </ul>
731
+ # Example: 'dealsId=12345 AND dealsStatus:disapproved'
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [String] quota_user
735
+ # Available to use for quota purposes for server-side applications. Can be any
736
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
737
+ # @param [Google::Apis::RequestOptions] options
738
+ # Request-specific options
739
+ #
740
+ # @yield [result, err] Result & error if block supplied
741
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse] parsed result object
742
+ # @yieldparam err [StandardError] error object if request failed
743
+ #
744
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse]
745
+ #
746
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
749
+ def list_account_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
750
+ command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations', options)
751
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse::Representation
752
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse
753
+ command.params['accountId'] = account_id unless account_id.nil?
754
+ command.params['creativeId'] = creative_id unless creative_id.nil?
755
+ command.query['pageToken'] = page_token unless page_token.nil?
756
+ command.query['pageSize'] = page_size unless page_size.nil?
757
+ command.query['query'] = query unless query.nil?
758
+ command.query['fields'] = fields unless fields.nil?
759
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
760
+ execute_or_queue_command(command, &block)
761
+ end
762
+
763
+ # Associate an existing deal with a creative.
764
+ # @param [String] account_id
765
+ # The account the creative belongs to.
766
+ # @param [String] creative_id
767
+ # The ID of the creative associated with the deal.
768
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest] add_deal_association_request_object
769
+ # @param [String] fields
770
+ # Selector specifying which fields to include in a partial response.
771
+ # @param [String] quota_user
772
+ # Available to use for quota purposes for server-side applications. Can be any
773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
774
+ # @param [Google::Apis::RequestOptions] options
775
+ # Request-specific options
776
+ #
777
+ # @yield [result, err] Result & error if block supplied
778
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object
779
+ # @yieldparam err [StandardError] error object if request failed
780
+ #
781
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Empty]
782
+ #
783
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
784
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
785
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
786
+ def add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
787
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add', options)
788
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest::Representation
789
+ command.request_object = add_deal_association_request_object
790
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
791
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
792
+ command.params['accountId'] = account_id unless account_id.nil?
793
+ command.params['creativeId'] = creative_id unless creative_id.nil?
794
+ command.query['fields'] = fields unless fields.nil?
795
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
796
+ execute_or_queue_command(command, &block)
797
+ end
798
+
799
+ # Remove the association between a deal and a creative.
800
+ # @param [String] account_id
801
+ # The account the creative belongs to.
802
+ # @param [String] creative_id
803
+ # The ID of the creative associated with the deal.
804
+ # @param [Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest] remove_deal_association_request_object
805
+ # @param [String] fields
806
+ # Selector specifying which fields to include in a partial response.
807
+ # @param [String] quota_user
808
+ # Available to use for quota purposes for server-side applications. Can be any
809
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
810
+ # @param [Google::Apis::RequestOptions] options
811
+ # Request-specific options
812
+ #
813
+ # @yield [result, err] Result & error if block supplied
814
+ # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object
815
+ # @yieldparam err [StandardError] error object if request failed
816
+ #
817
+ # @return [Google::Apis::Adexchangebuyer2V2beta1::Empty]
818
+ #
819
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
820
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
821
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
822
+ def remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
823
+ command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove', options)
824
+ command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest::Representation
825
+ command.request_object = remove_deal_association_request_object
826
+ command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation
827
+ command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty
828
+ command.params['accountId'] = account_id unless account_id.nil?
829
+ command.params['creativeId'] = creative_id unless creative_id.nil?
830
+ command.query['fields'] = fields unless fields.nil?
831
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
832
+ execute_or_queue_command(command, &block)
833
+ end
834
+
835
+ protected
836
+
837
+ def apply_command_defaults(command)
838
+ command.query['key'] = key unless key.nil?
839
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
840
+ end
841
+ end
842
+ end
843
+ end
844
+ end