lemboy-google-api-client 0.9.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (555) hide show
  1. checksums.yaml +7 -0
  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 +27 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +309 -0
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +53 -0
  11. data/LICENSE +202 -0
  12. data/MIGRATING.md +171 -0
  13. data/README.md +327 -0
  14. data/Rakefile +2 -0
  15. data/api_names.yaml +36215 -0
  16. data/bin/generate-api +109 -0
  17. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  19. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  20. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  21. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  22. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  23. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  24. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  25. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  26. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +3550 -0
  27. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1421 -0
  28. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1538 -0
  29. data/generated/google/apis/adexchangeseller_v2_0.rb +37 -0
  30. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  31. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +347 -0
  32. data/generated/google/apis/adexchangeseller_v2_0/service.rb +667 -0
  33. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  34. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  35. data/generated/google/apis/admin_datatransfer_v1/representations.rb +130 -0
  36. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  37. data/generated/google/apis/admin_directory_v1.rb +113 -0
  38. data/generated/google/apis/admin_directory_v1/classes.rb +3241 -0
  39. data/generated/google/apis/admin_directory_v1/representations.rb +1172 -0
  40. data/generated/google/apis/admin_directory_v1/service.rb +3857 -0
  41. data/generated/google/apis/admin_reports_v1.rb +38 -0
  42. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  43. data/generated/google/apis/admin_reports_v1/representations.rb +257 -0
  44. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  45. data/generated/google/apis/adsense_v1_4.rb +37 -0
  46. data/generated/google/apis/adsense_v1_4/classes.rb +1280 -0
  47. data/generated/google/apis/adsense_v1_4/representations.rb +555 -0
  48. data/generated/google/apis/adsense_v1_4/service.rb +1713 -0
  49. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  50. data/generated/google/apis/adsensehost_v4_1/classes.rb +836 -0
  51. data/generated/google/apis/adsensehost_v4_1/representations.rb +367 -0
  52. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  53. data/generated/google/apis/analytics_v3.rb +49 -0
  54. data/generated/google/apis/analytics_v3/classes.rb +5536 -0
  55. data/generated/google/apis/analytics_v3/representations.rb +1992 -0
  56. data/generated/google/apis/analytics_v3/service.rb +3785 -0
  57. data/generated/google/apis/analyticsreporting_v4.rb +37 -0
  58. data/generated/google/apis/analyticsreporting_v4/classes.rb +1420 -0
  59. data/generated/google/apis/analyticsreporting_v4/representations.rb +598 -0
  60. data/generated/google/apis/analyticsreporting_v4/service.rb +88 -0
  61. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  62. data/generated/google/apis/androidenterprise_v1/classes.rb +2250 -0
  63. data/generated/google/apis/androidenterprise_v1/representations.rb +970 -0
  64. data/generated/google/apis/androidenterprise_v1/service.rb +3267 -0
  65. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  66. data/generated/google/apis/androidpublisher_v2/classes.rb +1941 -0
  67. data/generated/google/apis/androidpublisher_v2/representations.rb +975 -0
  68. data/generated/google/apis/androidpublisher_v2/service.rb +2572 -0
  69. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  70. data/generated/google/apis/appengine_v1beta4/classes.rb +1585 -0
  71. data/generated/google/apis/appengine_v1beta4/representations.rb +542 -0
  72. data/generated/google/apis/appengine_v1beta4/service.rb +477 -0
  73. data/generated/google/apis/appengine_v1beta5.rb +40 -0
  74. data/generated/google/apis/appengine_v1beta5/classes.rb +1984 -0
  75. data/generated/google/apis/appengine_v1beta5/representations.rb +765 -0
  76. data/generated/google/apis/appengine_v1beta5/service.rb +864 -0
  77. data/generated/google/apis/appsactivity_v1.rb +46 -0
  78. data/generated/google/apis/appsactivity_v1/classes.rb +415 -0
  79. data/generated/google/apis/appsactivity_v1/representations.rb +209 -0
  80. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  81. data/generated/google/apis/appstate_v1.rb +34 -0
  82. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  83. data/generated/google/apis/appstate_v1/representations.rb +87 -0
  84. data/generated/google/apis/appstate_v1/service.rb +260 -0
  85. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  86. data/generated/google/apis/autoscaler_v1beta2/classes.rb +710 -0
  87. data/generated/google/apis/autoscaler_v1beta2/representations.rb +296 -0
  88. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  89. data/generated/google/apis/bigquery_v2.rb +52 -0
  90. data/generated/google/apis/bigquery_v2/classes.rb +3081 -0
  91. data/generated/google/apis/bigquery_v2/representations.rb +1094 -0
  92. data/generated/google/apis/bigquery_v2/service.rb +988 -0
  93. data/generated/google/apis/blogger_v3.rb +37 -0
  94. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  95. data/generated/google/apis/blogger_v3/representations.rb +632 -0
  96. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  97. data/generated/google/apis/books_v1.rb +34 -0
  98. data/generated/google/apis/books_v1/classes.rb +4160 -0
  99. data/generated/google/apis/books_v1/representations.rb +1799 -0
  100. data/generated/google/apis/books_v1/service.rb +2300 -0
  101. data/generated/google/apis/calendar_v3.rb +37 -0
  102. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  103. data/generated/google/apis/calendar_v3/representations.rb +631 -0
  104. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  105. data/generated/google/apis/civicinfo_v2.rb +32 -0
  106. data/generated/google/apis/civicinfo_v2/classes.rb +1499 -0
  107. data/generated/google/apis/civicinfo_v2/representations.rb +572 -0
  108. data/generated/google/apis/civicinfo_v2/service.rb +300 -0
  109. data/generated/google/apis/classroom_v1.rb +70 -0
  110. data/generated/google/apis/classroom_v1/classes.rb +1572 -0
  111. data/generated/google/apis/classroom_v1/representations.rb +729 -0
  112. data/generated/google/apis/classroom_v1/service.rb +1945 -0
  113. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  114. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  115. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  116. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  117. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  118. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  119. data/generated/google/apis/cloudbilling_v1/representations.rb +87 -0
  120. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  121. data/generated/google/apis/cloudbuild_v1.rb +34 -0
  122. data/generated/google/apis/cloudbuild_v1/classes.rb +919 -0
  123. data/generated/google/apis/cloudbuild_v1/representations.rb +364 -0
  124. data/generated/google/apis/cloudbuild_v1/service.rb +492 -0
  125. data/generated/google/apis/clouddebugger_v2.rb +38 -0
  126. data/generated/google/apis/clouddebugger_v2/classes.rb +1081 -0
  127. data/generated/google/apis/clouddebugger_v2/representations.rb +465 -0
  128. data/generated/google/apis/clouddebugger_v2/service.rb +396 -0
  129. data/generated/google/apis/cloudkms_v1beta1.rb +34 -0
  130. data/generated/google/apis/cloudkms_v1beta1/classes.rb +999 -0
  131. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  132. data/generated/google/apis/cloudkms_v1beta1/service.rb +932 -0
  133. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  134. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  135. data/generated/google/apis/cloudlatencytest_v2/representations.rb +127 -0
  136. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  137. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  138. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  139. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +353 -0
  140. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  141. data/generated/google/apis/cloudresourcemanager_v1.rb +38 -0
  142. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +886 -0
  143. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +359 -0
  144. data/generated/google/apis/cloudresourcemanager_v1/service.rb +686 -0
  145. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  146. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +682 -0
  147. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +312 -0
  148. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +710 -0
  149. data/generated/google/apis/cloudtrace_v1.rb +43 -0
  150. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  151. data/generated/google/apis/cloudtrace_v1/representations.rb +102 -0
  152. data/generated/google/apis/cloudtrace_v1/service.rb +192 -0
  153. data/generated/google/apis/clouduseraccounts_beta.rb +44 -0
  154. data/generated/google/apis/clouduseraccounts_beta/classes.rb +845 -0
  155. data/generated/google/apis/clouduseraccounts_beta/representations.rb +352 -0
  156. data/generated/google/apis/clouduseraccounts_beta/service.rb +907 -0
  157. data/generated/google/apis/compute_beta.rb +49 -0
  158. data/generated/google/apis/compute_beta/classes.rb +12261 -0
  159. data/generated/google/apis/compute_beta/representations.rb +4615 -0
  160. data/generated/google/apis/compute_beta/service.rb +15330 -0
  161. data/generated/google/apis/compute_v1.rb +49 -0
  162. data/generated/google/apis/compute_v1/classes.rb +11179 -0
  163. data/generated/google/apis/compute_v1/representations.rb +4203 -0
  164. data/generated/google/apis/compute_v1/service.rb +12937 -0
  165. data/generated/google/apis/container_v1.rb +35 -0
  166. data/generated/google/apis/container_v1/classes.rb +1040 -0
  167. data/generated/google/apis/container_v1/representations.rb +415 -0
  168. data/generated/google/apis/container_v1/service.rb +659 -0
  169. data/generated/google/apis/container_v1beta1.rb +35 -0
  170. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  171. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  172. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  173. data/generated/google/apis/content_v2.rb +35 -0
  174. data/generated/google/apis/content_v2/classes.rb +6887 -0
  175. data/generated/google/apis/content_v2/representations.rb +2963 -0
  176. data/generated/google/apis/content_v2/service.rb +2653 -0
  177. data/generated/google/apis/coordinate_v1.rb +37 -0
  178. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  179. data/generated/google/apis/coordinate_v1/representations.rb +321 -0
  180. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  181. data/generated/google/apis/customsearch_v1.rb +31 -0
  182. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  183. data/generated/google/apis/customsearch_v1/representations.rb +302 -0
  184. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  185. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  186. data/generated/google/apis/dataflow_v1b3/classes.rb +4225 -0
  187. data/generated/google/apis/dataflow_v1b3/representations.rb +1809 -0
  188. data/generated/google/apis/dataflow_v1b3/service.rb +874 -0
  189. data/generated/google/apis/dataproc_v1.rb +34 -0
  190. data/generated/google/apis/dataproc_v1/classes.rb +1716 -0
  191. data/generated/google/apis/dataproc_v1/representations.rb +678 -0
  192. data/generated/google/apis/dataproc_v1/service.rb +670 -0
  193. data/generated/google/apis/datastore_v1.rb +38 -0
  194. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  195. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  196. data/generated/google/apis/datastore_v1/service.rb +259 -0
  197. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  198. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  199. data/generated/google/apis/datastore_v1beta2/representations.rb +594 -0
  200. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  201. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  202. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  203. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  204. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  205. data/generated/google/apis/deploymentmanager_v2.rb +43 -0
  206. data/generated/google/apis/deploymentmanager_v2/classes.rb +1582 -0
  207. data/generated/google/apis/deploymentmanager_v2/representations.rb +686 -0
  208. data/generated/google/apis/deploymentmanager_v2/service.rb +1026 -0
  209. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  210. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  211. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  212. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  213. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  214. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  215. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  216. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  217. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  218. data/generated/google/apis/dfareporting_v2_3/classes.rb +10839 -0
  219. data/generated/google/apis/dfareporting_v2_3/representations.rb +3829 -0
  220. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  221. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  222. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  223. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  224. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  225. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  226. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  227. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  228. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  229. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  230. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  231. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  232. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  233. data/generated/google/apis/discovery_v1.rb +32 -0
  234. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  235. data/generated/google/apis/discovery_v1/representations.rb +397 -0
  236. data/generated/google/apis/discovery_v1/service.rb +142 -0
  237. data/generated/google/apis/dns_v1.rb +43 -0
  238. data/generated/google/apis/dns_v1/classes.rb +406 -0
  239. data/generated/google/apis/dns_v1/representations.rb +167 -0
  240. data/generated/google/apis/dns_v1/service.rb +453 -0
  241. data/generated/google/apis/dns_v2beta1.rb +43 -0
  242. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  243. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  244. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  245. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  246. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +795 -0
  247. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +368 -0
  248. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +376 -0
  249. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  250. data/generated/google/apis/doubleclicksearch_v2/classes.rb +960 -0
  251. data/generated/google/apis/doubleclicksearch_v2/representations.rb +350 -0
  252. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  253. data/generated/google/apis/drive_v2.rb +59 -0
  254. data/generated/google/apis/drive_v2/classes.rb +2633 -0
  255. data/generated/google/apis/drive_v2/representations.rb +885 -0
  256. data/generated/google/apis/drive_v2/service.rb +2754 -0
  257. data/generated/google/apis/drive_v3.rb +56 -0
  258. data/generated/google/apis/drive_v3/classes.rb +1611 -0
  259. data/generated/google/apis/drive_v3/representations.rb +555 -0
  260. data/generated/google/apis/drive_v3/service.rb +1553 -0
  261. data/generated/google/apis/fitness_v1.rb +85 -0
  262. data/generated/google/apis/fitness_v1/classes.rb +943 -0
  263. data/generated/google/apis/fitness_v1/representations.rb +380 -0
  264. data/generated/google/apis/fitness_v1/service.rb +674 -0
  265. data/generated/google/apis/fusiontables_v2.rb +37 -0
  266. data/generated/google/apis/fusiontables_v2/classes.rb +1049 -0
  267. data/generated/google/apis/fusiontables_v2/representations.rb +457 -0
  268. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  269. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  270. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  271. data/generated/google/apis/games_configuration_v1configuration/representations.rb +228 -0
  272. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  273. data/generated/google/apis/games_management_v1management.rb +37 -0
  274. data/generated/google/apis/games_management_v1management/classes.rb +567 -0
  275. data/generated/google/apis/games_management_v1management/representations.rb +278 -0
  276. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  277. data/generated/google/apis/games_v1.rb +40 -0
  278. data/generated/google/apis/games_v1/classes.rb +4667 -0
  279. data/generated/google/apis/games_v1/representations.rb +1800 -0
  280. data/generated/google/apis/games_v1/service.rb +2449 -0
  281. data/generated/google/apis/gan_v1beta1.rb +31 -0
  282. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  283. data/generated/google/apis/gan_v1beta1/representations.rb +462 -0
  284. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  285. data/generated/google/apis/genomics_v1.rb +46 -0
  286. data/generated/google/apis/genomics_v1/classes.rb +3477 -0
  287. data/generated/google/apis/genomics_v1/representations.rb +1284 -0
  288. data/generated/google/apis/genomics_v1/service.rb +2207 -0
  289. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  290. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  291. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  292. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  293. data/generated/google/apis/gmail_v1.rb +61 -0
  294. data/generated/google/apis/gmail_v1/classes.rb +1382 -0
  295. data/generated/google/apis/gmail_v1/representations.rb +624 -0
  296. data/generated/google/apis/gmail_v1/service.rb +2447 -0
  297. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  298. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  299. data/generated/google/apis/groupsmigration_v1/representations.rb +40 -0
  300. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  301. data/generated/google/apis/groupssettings_v1.rb +34 -0
  302. data/generated/google/apis/groupssettings_v1/classes.rb +240 -0
  303. data/generated/google/apis/groupssettings_v1/representations.rb +69 -0
  304. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  305. data/generated/google/apis/iam_v1.rb +36 -0
  306. data/generated/google/apis/iam_v1/classes.rb +640 -0
  307. data/generated/google/apis/iam_v1/representations.rb +316 -0
  308. data/generated/google/apis/iam_v1/service.rb +554 -0
  309. data/generated/google/apis/identitytoolkit_v3.rb +37 -0
  310. data/generated/google/apis/identitytoolkit_v3/classes.rb +2182 -0
  311. data/generated/google/apis/identitytoolkit_v3/representations.rb +742 -0
  312. data/generated/google/apis/identitytoolkit_v3/service.rb +657 -0
  313. data/generated/google/apis/kgsearch_v1.rb +31 -0
  314. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  315. data/generated/google/apis/kgsearch_v1/representations.rb +41 -0
  316. data/generated/google/apis/kgsearch_v1/service.rb +113 -0
  317. data/generated/google/apis/language_v1beta1.rb +36 -0
  318. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  319. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  320. data/generated/google/apis/language_v1beta1/service.rb +184 -0
  321. data/generated/google/apis/licensing_v1.rb +34 -0
  322. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  323. data/generated/google/apis/licensing_v1/representations.rb +74 -0
  324. data/generated/google/apis/licensing_v1/service.rb +369 -0
  325. data/generated/google/apis/logging_v1beta3.rb +47 -0
  326. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  327. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  328. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  329. data/generated/google/apis/logging_v2beta1.rb +46 -0
  330. data/generated/google/apis/logging_v2beta1/classes.rb +1254 -0
  331. data/generated/google/apis/logging_v2beta1/representations.rb +421 -0
  332. data/generated/google/apis/logging_v2beta1/service.rb +788 -0
  333. data/generated/google/apis/manager_v1beta2.rb +53 -0
  334. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  335. data/generated/google/apis/manager_v1beta2/representations.rb +606 -0
  336. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  337. data/generated/google/apis/manufacturers_v1.rb +34 -0
  338. data/generated/google/apis/manufacturers_v1/classes.rb +258 -0
  339. data/generated/google/apis/manufacturers_v1/representations.rb +103 -0
  340. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  341. data/generated/google/apis/mirror_v1.rb +37 -0
  342. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  343. data/generated/google/apis/mirror_v1/representations.rb +390 -0
  344. data/generated/google/apis/mirror_v1/service.rb +977 -0
  345. data/generated/google/apis/monitoring_v3.rb +45 -0
  346. data/generated/google/apis/monitoring_v3/classes.rb +1335 -0
  347. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  348. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  349. data/generated/google/apis/mybusiness_v3.rb +32 -0
  350. data/generated/google/apis/mybusiness_v3/classes.rb +1864 -0
  351. data/generated/google/apis/mybusiness_v3/representations.rb +741 -0
  352. data/generated/google/apis/mybusiness_v3/service.rb +960 -0
  353. data/generated/google/apis/oauth2_v2.rb +43 -0
  354. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  355. data/generated/google/apis/oauth2_v2/representations.rb +102 -0
  356. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  357. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  358. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  359. data/generated/google/apis/pagespeedonline_v2/representations.rb +272 -0
  360. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  361. data/generated/google/apis/partners_v2.rb +32 -0
  362. data/generated/google/apis/partners_v2/classes.rb +942 -0
  363. data/generated/google/apis/partners_v2/representations.rb +454 -0
  364. data/generated/google/apis/partners_v2/service.rb +400 -0
  365. data/generated/google/apis/people_v1.rb +59 -0
  366. data/generated/google/apis/people_v1/classes.rb +1521 -0
  367. data/generated/google/apis/people_v1/representations.rb +663 -0
  368. data/generated/google/apis/people_v1/service.rb +189 -0
  369. data/generated/google/apis/plus_domains_v1.rb +61 -0
  370. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  371. data/generated/google/apis/plus_domains_v1/representations.rb +1111 -0
  372. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  373. data/generated/google/apis/plus_v1.rb +43 -0
  374. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  375. data/generated/google/apis/plus_v1/representations.rb +907 -0
  376. data/generated/google/apis/plus_v1/service.rb +470 -0
  377. data/generated/google/apis/prediction_v1_6.rb +47 -0
  378. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  379. data/generated/google/apis/prediction_v1_6/representations.rb +369 -0
  380. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  381. data/generated/google/apis/proximitybeacon_v1beta1.rb +34 -0
  382. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +786 -0
  383. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +347 -0
  384. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +806 -0
  385. data/generated/google/apis/pubsub_v1.rb +37 -0
  386. data/generated/google/apis/pubsub_v1/classes.rb +676 -0
  387. data/generated/google/apis/pubsub_v1/representations.rb +323 -0
  388. data/generated/google/apis/pubsub_v1/service.rb +900 -0
  389. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  390. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  391. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  392. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  393. data/generated/google/apis/qpx_express_v1.rb +31 -0
  394. data/generated/google/apis/qpx_express_v1/classes.rb +1274 -0
  395. data/generated/google/apis/qpx_express_v1/representations.rb +473 -0
  396. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  397. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  398. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  399. data/generated/google/apis/replicapool_v1beta2/representations.rb +264 -0
  400. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  401. data/generated/google/apis/replicapoolupdater_v1beta1.rb +45 -0
  402. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  403. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +294 -0
  404. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +509 -0
  405. data/generated/google/apis/reseller_v1.rb +37 -0
  406. data/generated/google/apis/reseller_v1/classes.rb +540 -0
  407. data/generated/google/apis/reseller_v1/representations.rb +225 -0
  408. data/generated/google/apis/reseller_v1/service.rb +623 -0
  409. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  410. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  411. data/generated/google/apis/resourceviews_v1beta2/representations.rb +301 -0
  412. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  413. data/generated/google/apis/script_v1.rb +64 -0
  414. data/generated/google/apis/script_v1/classes.rb +265 -0
  415. data/generated/google/apis/script_v1/representations.rb +119 -0
  416. data/generated/google/apis/script_v1/service.rb +98 -0
  417. data/generated/google/apis/sheets_v4.rb +43 -0
  418. data/generated/google/apis/sheets_v4/classes.rb +6368 -0
  419. data/generated/google/apis/sheets_v4/representations.rb +2289 -0
  420. data/generated/google/apis/sheets_v4/service.rb +569 -0
  421. data/generated/google/apis/site_verification_v1.rb +37 -0
  422. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  423. data/generated/google/apis/site_verification_v1/representations.rb +113 -0
  424. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  425. data/generated/google/apis/slides_v1.rb +49 -0
  426. data/generated/google/apis/slides_v1/classes.rb +4044 -0
  427. data/generated/google/apis/slides_v1/representations.rb +1765 -0
  428. data/generated/google/apis/slides_v1/service.rb +202 -0
  429. data/generated/google/apis/speech_v1beta1.rb +34 -0
  430. data/generated/google/apis/speech_v1beta1/classes.rb +513 -0
  431. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  432. data/generated/google/apis/speech_v1beta1/service.rb +273 -0
  433. data/generated/google/apis/sqladmin_v1beta4.rb +38 -0
  434. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2142 -0
  435. data/generated/google/apis/sqladmin_v1beta4/representations.rb +893 -0
  436. data/generated/google/apis/sqladmin_v1beta4/service.rb +1709 -0
  437. data/generated/google/apis/storage_v1.rb +46 -0
  438. data/generated/google/apis/storage_v1/classes.rb +1255 -0
  439. data/generated/google/apis/storage_v1/representations.rb +502 -0
  440. data/generated/google/apis/storage_v1/service.rb +1906 -0
  441. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  442. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  443. data/generated/google/apis/storagetransfer_v1/representations.rb +418 -0
  444. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  445. data/generated/google/apis/tagmanager_v1.rb +52 -0
  446. data/generated/google/apis/tagmanager_v1/classes.rb +1494 -0
  447. data/generated/google/apis/tagmanager_v1/representations.rb +611 -0
  448. data/generated/google/apis/tagmanager_v1/service.rb +2119 -0
  449. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  450. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  451. data/generated/google/apis/taskqueue_v1beta2/representations.rb +126 -0
  452. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  453. data/generated/google/apis/tasks_v1.rb +37 -0
  454. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  455. data/generated/google/apis/tasks_v1/representations.rb +125 -0
  456. data/generated/google/apis/tasks_v1/service.rb +643 -0
  457. data/generated/google/apis/translate_v2.rb +31 -0
  458. data/generated/google/apis/translate_v2/classes.rb +168 -0
  459. data/generated/google/apis/translate_v2/representations.rb +121 -0
  460. data/generated/google/apis/translate_v2/service.rb +182 -0
  461. data/generated/google/apis/urlshortener_v1.rb +34 -0
  462. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  463. data/generated/google/apis/urlshortener_v1/representations.rb +121 -0
  464. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  465. data/generated/google/apis/vision_v1.rb +36 -0
  466. data/generated/google/apis/vision_v1/classes.rb +1267 -0
  467. data/generated/google/apis/vision_v1/representations.rb +418 -0
  468. data/generated/google/apis/vision_v1/service.rb +90 -0
  469. data/generated/google/apis/webmasters_v3.rb +37 -0
  470. data/generated/google/apis/webmasters_v3/classes.rb +570 -0
  471. data/generated/google/apis/webmasters_v3/representations.rb +283 -0
  472. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  473. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  474. data/generated/google/apis/youtube_analytics_v1/classes.rb +337 -0
  475. data/generated/google/apis/youtube_analytics_v1/representations.rb +174 -0
  476. data/generated/google/apis/youtube_analytics_v1/service.rb +486 -0
  477. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  478. data/generated/google/apis/youtube_partner_v1/classes.rb +3854 -0
  479. data/generated/google/apis/youtube_partner_v1/representations.rb +1537 -0
  480. data/generated/google/apis/youtube_partner_v1/service.rb +3269 -0
  481. data/generated/google/apis/youtube_v3.rb +50 -0
  482. data/generated/google/apis/youtube_v3/classes.rb +8375 -0
  483. data/generated/google/apis/youtube_v3/representations.rb +3273 -0
  484. data/generated/google/apis/youtube_v3/service.rb +4440 -0
  485. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  486. data/generated/google/apis/youtubereporting_v1/classes.rb +302 -0
  487. data/generated/google/apis/youtubereporting_v1/representations.rb +149 -0
  488. data/generated/google/apis/youtubereporting_v1/service.rb +385 -0
  489. data/google-api-client.gemspec +33 -0
  490. data/lib/cacerts.pem +2183 -0
  491. data/lib/google/api_client/auth/installed_app.rb +128 -0
  492. data/lib/google/api_client/auth/key_utils.rb +94 -0
  493. data/lib/google/api_client/auth/storage.rb +104 -0
  494. data/lib/google/api_client/auth/storages/file_store.rb +57 -0
  495. data/lib/google/api_client/auth/storages/redis_store.rb +59 -0
  496. data/lib/google/api_client/client_secrets.rb +177 -0
  497. data/lib/google/apis.rb +58 -0
  498. data/lib/google/apis/core/api_command.rb +146 -0
  499. data/lib/google/apis/core/base_service.rb +401 -0
  500. data/lib/google/apis/core/batch.rb +239 -0
  501. data/lib/google/apis/core/download.rb +108 -0
  502. data/lib/google/apis/core/hashable.rb +44 -0
  503. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  504. data/lib/google/apis/core/http_command.rb +332 -0
  505. data/lib/google/apis/core/json_representation.rb +145 -0
  506. data/lib/google/apis/core/logging.rb +30 -0
  507. data/lib/google/apis/core/multipart.rb +187 -0
  508. data/lib/google/apis/core/upload.rb +295 -0
  509. data/lib/google/apis/errors.rb +80 -0
  510. data/lib/google/apis/generator.rb +70 -0
  511. data/lib/google/apis/generator/annotator.rb +301 -0
  512. data/lib/google/apis/generator/helpers.rb +74 -0
  513. data/lib/google/apis/generator/model.rb +143 -0
  514. data/lib/google/apis/generator/template.rb +124 -0
  515. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  516. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  517. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  518. data/lib/google/apis/generator/templates/_representation_stub.tmpl +17 -0
  519. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  520. data/lib/google/apis/generator/templates/classes.rb.tmpl +29 -0
  521. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  522. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  523. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  524. data/lib/google/apis/options.rb +85 -0
  525. data/lib/google/apis/version.rb +39 -0
  526. data/rakelib/metrics.rake +22 -0
  527. data/rakelib/rubocop.rake +10 -0
  528. data/rakelib/spec.rake +11 -0
  529. data/rakelib/yard.rake +11 -0
  530. data/samples/cli/.env +4 -0
  531. data/samples/cli/Gemfile +7 -0
  532. data/samples/cli/README.md +51 -0
  533. data/samples/cli/google-api-samples +32 -0
  534. data/samples/cli/lib/base_cli.rb +95 -0
  535. data/samples/cli/lib/samples/analytics.rb +62 -0
  536. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  537. data/samples/cli/lib/samples/bigquery.rb +101 -0
  538. data/samples/cli/lib/samples/calendar.rb +83 -0
  539. data/samples/cli/lib/samples/drive.rb +82 -0
  540. data/samples/cli/lib/samples/gmail.rb +124 -0
  541. data/samples/cli/lib/samples/pubsub.rb +114 -0
  542. data/samples/cli/lib/samples/sheets.rb +61 -0
  543. data/samples/cli/lib/samples/translate.rb +44 -0
  544. data/samples/cli/lib/samples/you_tube.rb +44 -0
  545. data/samples/web/.env +2 -0
  546. data/samples/web/Gemfile +7 -0
  547. data/samples/web/README.md +44 -0
  548. data/samples/web/app.rb +120 -0
  549. data/samples/web/views/calendar.erb +34 -0
  550. data/samples/web/views/drive.erb +33 -0
  551. data/samples/web/views/home.erb +34 -0
  552. data/samples/web/views/layout.erb +40 -0
  553. data/sync.rb +71 -0
  554. data/third_party/hurley_patches.rb +103 -0
  555. metadata +735 -0
@@ -0,0 +1,3269 @@
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 YoutubePartnerV1
23
+ # Youtube Content ID API
24
+ #
25
+ # API for YouTube partners. To use this API YouTube CMS account is required.
26
+ #
27
+ # @example
28
+ # require 'google/apis/youtube_partner_v1'
29
+ #
30
+ # YoutubePartner = Google::Apis::YoutubePartnerV1 # Alias the module
31
+ # service = YoutubePartner::YouTubePartnerService.new
32
+ #
33
+ # @see https://developers.google.com/youtube/partner/
34
+ class YouTubePartnerService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'youtube/partner/v1/')
53
+ end
54
+
55
+ # Insert an asset label for an owner.
56
+ # @param [Google::Apis::YoutubePartnerV1::AssetLabel] asset_label_object
57
+ # @param [String] on_behalf_of_content_owner
58
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
59
+ # user is acting on behalf of. This parameter supports users whose accounts are
60
+ # associated with multiple content owners.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # Overrides userIp if both are provided.
67
+ # @param [String] user_ip
68
+ # IP address of the site where the request originates. Use this if you want to
69
+ # enforce per-user limits.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabel] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::YoutubePartnerV1::AssetLabel]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def insert_asset_label(asset_label_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
83
+ command = make_simple_command(:post, 'assetLabels', options)
84
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
85
+ command.request_object = asset_label_object
86
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
87
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetLabel
88
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
89
+ command.query['fields'] = fields unless fields.nil?
90
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
91
+ command.query['userIp'] = user_ip unless user_ip.nil?
92
+ execute_or_queue_command(command, &block)
93
+ end
94
+
95
+ # Retrieves a list of all asset labels for an owner.
96
+ # @param [String] label_prefix
97
+ # The labelPrefix parameter identifies the prefix of asset labels to retrieve.
98
+ # @param [String] on_behalf_of_content_owner
99
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
100
+ # user is acting on behalf of. This parameter supports users whose accounts are
101
+ # associated with multiple content owners.
102
+ # @param [String] q
103
+ # The q parameter specifies the query string to use to filter search results.
104
+ # YouTube searches for the query string in the labelName field of asset labels.
105
+ # @param [String] fields
106
+ # Selector specifying which fields to include in a partial response.
107
+ # @param [String] quota_user
108
+ # Available to use for quota purposes for server-side applications. Can be any
109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
110
+ # Overrides userIp if both are provided.
111
+ # @param [String] user_ip
112
+ # IP address of the site where the request originates. Use this if you want to
113
+ # enforce per-user limits.
114
+ # @param [Google::Apis::RequestOptions] options
115
+ # Request-specific options
116
+ #
117
+ # @yield [result, err] Result & error if block supplied
118
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabelListResponse] parsed result object
119
+ # @yieldparam err [StandardError] error object if request failed
120
+ #
121
+ # @return [Google::Apis::YoutubePartnerV1::AssetLabelListResponse]
122
+ #
123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
126
+ def list_asset_labels(label_prefix: nil, on_behalf_of_content_owner: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
127
+ command = make_simple_command(:get, 'assetLabels', options)
128
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabelListResponse::Representation
129
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetLabelListResponse
130
+ command.query['labelPrefix'] = label_prefix unless label_prefix.nil?
131
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
132
+ command.query['q'] = q unless q.nil?
133
+ command.query['fields'] = fields unless fields.nil?
134
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
135
+ command.query['userIp'] = user_ip unless user_ip.nil?
136
+ execute_or_queue_command(command, &block)
137
+ end
138
+
139
+ # Retrieves the match policy assigned to the specified asset by the content
140
+ # owner associated with the authenticated user. This information is only
141
+ # accessible to an owner of the asset.
142
+ # @param [String] asset_id
143
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
144
+ # you are retrieving the match policy.
145
+ # @param [String] on_behalf_of_content_owner
146
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
147
+ # user is acting on behalf of. This parameter supports users whose accounts are
148
+ # associated with multiple content owners.
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # Overrides userIp if both are provided.
155
+ # @param [String] user_ip
156
+ # IP address of the site where the request originates. Use this if you want to
157
+ # enforce per-user limits.
158
+ # @param [Google::Apis::RequestOptions] options
159
+ # Request-specific options
160
+ #
161
+ # @yield [result, err] Result & error if block supplied
162
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
163
+ # @yieldparam err [StandardError] error object if request failed
164
+ #
165
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
166
+ #
167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
170
+ def get_asset_match_policy(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
171
+ command = make_simple_command(:get, 'assets/{assetId}/matchPolicy', options)
172
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
173
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
174
+ command.params['assetId'] = asset_id unless asset_id.nil?
175
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
176
+ command.query['fields'] = fields unless fields.nil?
177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
178
+ command.query['userIp'] = user_ip unless user_ip.nil?
179
+ execute_or_queue_command(command, &block)
180
+ end
181
+
182
+ # Updates the asset's match policy. If an asset has multiple owners, each owner
183
+ # may set its own match policy for the asset. YouTube then computes the match
184
+ # policy that is actually applied for the asset based on the territories where
185
+ # each owner owns the asset. This method supports patch semantics.
186
+ # @param [String] asset_id
187
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
188
+ # you are retrieving the match policy.
189
+ # @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
190
+ # @param [String] on_behalf_of_content_owner
191
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
192
+ # user is acting on behalf of. This parameter supports users whose accounts are
193
+ # associated with multiple content owners.
194
+ # @param [String] fields
195
+ # Selector specifying which fields to include in a partial response.
196
+ # @param [String] quota_user
197
+ # Available to use for quota purposes for server-side applications. Can be any
198
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # Overrides userIp if both are provided.
200
+ # @param [String] user_ip
201
+ # IP address of the site where the request originates. Use this if you want to
202
+ # enforce per-user limits.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def patch_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
216
+ command = make_simple_command(:patch, 'assets/{assetId}/matchPolicy', options)
217
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
218
+ command.request_object = asset_match_policy_object
219
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
220
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
221
+ command.params['assetId'] = asset_id unless asset_id.nil?
222
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ command.query['userIp'] = user_ip unless user_ip.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Updates the asset's match policy. If an asset has multiple owners, each owner
230
+ # may set its own match policy for the asset. YouTube then computes the match
231
+ # policy that is actually applied for the asset based on the territories where
232
+ # each owner owns the asset.
233
+ # @param [String] asset_id
234
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
235
+ # you are retrieving the match policy.
236
+ # @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
237
+ # @param [String] on_behalf_of_content_owner
238
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
239
+ # user is acting on behalf of. This parameter supports users whose accounts are
240
+ # associated with multiple content owners.
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
+ # Overrides userIp if both are provided.
247
+ # @param [String] user_ip
248
+ # IP address of the site where the request originates. Use this if you want to
249
+ # enforce per-user limits.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def update_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
263
+ command = make_simple_command(:put, 'assets/{assetId}/matchPolicy', options)
264
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
265
+ command.request_object = asset_match_policy_object
266
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
267
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
268
+ command.params['assetId'] = asset_id unless asset_id.nil?
269
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ command.query['userIp'] = user_ip unless user_ip.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Deletes a relationship between two assets.
277
+ # @param [String] asset_relationship_id
278
+ # The assetRelationshipId parameter specifies a value that uniquely identifies
279
+ # the relationship you are deleting.
280
+ # @param [String] on_behalf_of_content_owner
281
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
282
+ # user is acting on behalf of. This parameter supports users whose accounts are
283
+ # associated with multiple content owners.
284
+ # @param [String] fields
285
+ # Selector specifying which fields to include in a partial response.
286
+ # @param [String] quota_user
287
+ # Available to use for quota purposes for server-side applications. Can be any
288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
289
+ # Overrides userIp if both are provided.
290
+ # @param [String] user_ip
291
+ # IP address of the site where the request originates. Use this if you want to
292
+ # enforce per-user limits.
293
+ # @param [Google::Apis::RequestOptions] options
294
+ # Request-specific options
295
+ #
296
+ # @yield [result, err] Result & error if block supplied
297
+ # @yieldparam result [NilClass] No result returned for this method
298
+ # @yieldparam err [StandardError] error object if request failed
299
+ #
300
+ # @return [void]
301
+ #
302
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
303
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
304
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
305
+ def delete_asset_relationship(asset_relationship_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
306
+ command = make_simple_command(:delete, 'assetRelationships/{assetRelationshipId}', options)
307
+ command.params['assetRelationshipId'] = asset_relationship_id unless asset_relationship_id.nil?
308
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
309
+ command.query['fields'] = fields unless fields.nil?
310
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
+ command.query['userIp'] = user_ip unless user_ip.nil?
312
+ execute_or_queue_command(command, &block)
313
+ end
314
+
315
+ # Creates a relationship that links two assets.
316
+ # @param [Google::Apis::YoutubePartnerV1::AssetRelationship] asset_relationship_object
317
+ # @param [String] on_behalf_of_content_owner
318
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
319
+ # user is acting on behalf of. This parameter supports users whose accounts are
320
+ # associated with multiple content owners.
321
+ # @param [String] fields
322
+ # Selector specifying which fields to include in a partial response.
323
+ # @param [String] quota_user
324
+ # Available to use for quota purposes for server-side applications. Can be any
325
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
326
+ # Overrides userIp if both are provided.
327
+ # @param [String] user_ip
328
+ # IP address of the site where the request originates. Use this if you want to
329
+ # enforce per-user limits.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationship] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::YoutubePartnerV1::AssetRelationship]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def insert_asset_relationship(asset_relationship_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'assetRelationships', options)
344
+ command.request_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
345
+ command.request_object = asset_relationship_object
346
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
347
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationship
348
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
349
+ command.query['fields'] = fields unless fields.nil?
350
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
351
+ command.query['userIp'] = user_ip unless user_ip.nil?
352
+ execute_or_queue_command(command, &block)
353
+ end
354
+
355
+ # Retrieves a list of relationships for a given asset. The list contains
356
+ # relationships where the specified asset is either the parent (embedding) or
357
+ # child (embedded) asset in the relationship.
358
+ # @param [String] asset_id
359
+ # The assetId parameter specifies the asset ID of the asset for which you are
360
+ # retrieving relationships.
361
+ # @param [String] on_behalf_of_content_owner
362
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
363
+ # user is acting on behalf of. This parameter supports users whose accounts are
364
+ # associated with multiple content owners.
365
+ # @param [String] page_token
366
+ # The pageToken parameter specifies a token that identifies a particular page of
367
+ # results to return. Set this parameter to the value of the nextPageToken value
368
+ # from the previous API response to retrieve the next page of search results.
369
+ # @param [String] fields
370
+ # Selector specifying which fields to include in a partial response.
371
+ # @param [String] quota_user
372
+ # Available to use for quota purposes for server-side applications. Can be any
373
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
374
+ # Overrides userIp if both are provided.
375
+ # @param [String] user_ip
376
+ # IP address of the site where the request originates. Use this if you want to
377
+ # enforce per-user limits.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def list_asset_relationships(asset_id, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
391
+ command = make_simple_command(:get, 'assetRelationships', options)
392
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse::Representation
393
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse
394
+ command.query['assetId'] = asset_id unless asset_id.nil?
395
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
396
+ command.query['pageToken'] = page_token unless page_token.nil?
397
+ command.query['fields'] = fields unless fields.nil?
398
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
399
+ command.query['userIp'] = user_ip unless user_ip.nil?
400
+ execute_or_queue_command(command, &block)
401
+ end
402
+
403
+ # Searches for assets based on asset metadata. The method can retrieve all
404
+ # assets or only assets owned by the content owner. This method mimics the
405
+ # functionality of the advanced search feature on the Assets page in CMS.
406
+ # @param [DateTime] created_after
407
+ # The createdAfter parameter restricts the set of returned assets to ones
408
+ # originally created on or after the specified datetime. For example: 2015-01-
409
+ # 29T23:00:00Z
410
+ # @param [DateTime] created_before
411
+ # The createdBefore parameter restricts the set of returned assets to ones
412
+ # originally created on or before the specified datetime. For example: 2015-01-
413
+ # 29T23:00:00Z
414
+ # @param [Boolean] has_conflicts
415
+ # The hasConflicts parameter enables you to only retrieve assets that have
416
+ # ownership conflicts. The only valid value is true. Setting the parameter value
417
+ # to false does not affect the results.
418
+ # @param [Boolean] include_any_providedlabel
419
+ # If includeAnyProvidedlabel parameter is set to true, will search for assets
420
+ # that contain any of the provided labels; else will search for assets that
421
+ # contain all the provided labels.
422
+ # @param [String] isrcs
423
+ # A comma-separated list of up to 50 ISRCs. If you specify a value for this
424
+ # parameter, the API server ignores any values set for the following parameters:
425
+ # q, includeAnyProvidedLabel, hasConflicts, labels, metadataSearchFields, sort,
426
+ # and type.
427
+ # @param [String] labels
428
+ # The labels parameter specifies the assets with certain asset labels that you
429
+ # want to retrieve. The parameter value is a comma-separated list of asset
430
+ # labels.
431
+ # @param [String] metadata_search_fields
432
+ # The metadataSearchField parameter specifies which metadata fields to search by.
433
+ # It is a comma-separated list of metadata field and value pairs connected by
434
+ # colon(:). For example: customId:my_custom_id,artist:Dandexx
435
+ # @param [String] on_behalf_of_content_owner
436
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
437
+ # user is acting on behalf of. This parameter supports users whose accounts are
438
+ # associated with multiple content owners.
439
+ # @param [String] ownership_restriction
440
+ # The ownershipRestriction parameter specifies the ownership filtering option
441
+ # for the search. By default the search is performed in the assets owned by
442
+ # currently authenticated user only.
443
+ # @param [String] page_token
444
+ # The pageToken parameter specifies a token that identifies a particular page of
445
+ # results to return. Set this parameter to the value of the nextPageToken value
446
+ # from the previous API response to retrieve the next page of search results.
447
+ # @param [String] q
448
+ # YouTube searches within the id, type, and customId fields for all assets as
449
+ # well as in numerous other metadata fields – such as actor, album, director,
450
+ # isrc, and tmsId – that vary for different types of assets (movies, music
451
+ # videos, etc.).
452
+ # @param [String] sort
453
+ # The sort parameter specifies how the search results should be sorted. Note
454
+ # that results are always sorted in descending order.
455
+ # @param [String] type
456
+ # The type parameter specifies the types of assets that you want to retrieve.
457
+ # The parameter value is a comma-separated list of asset types.
458
+ # @param [String] fields
459
+ # Selector specifying which fields to include in a partial response.
460
+ # @param [String] quota_user
461
+ # Available to use for quota purposes for server-side applications. Can be any
462
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
463
+ # Overrides userIp if both are provided.
464
+ # @param [String] user_ip
465
+ # IP address of the site where the request originates. Use this if you want to
466
+ # enforce per-user limits.
467
+ # @param [Google::Apis::RequestOptions] options
468
+ # Request-specific options
469
+ #
470
+ # @yield [result, err] Result & error if block supplied
471
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetSearchResponse] parsed result object
472
+ # @yieldparam err [StandardError] error object if request failed
473
+ #
474
+ # @return [Google::Apis::YoutubePartnerV1::AssetSearchResponse]
475
+ #
476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
479
+ def list_asset_searches(created_after: nil, created_before: nil, has_conflicts: nil, include_any_providedlabel: nil, isrcs: nil, labels: nil, metadata_search_fields: nil, on_behalf_of_content_owner: nil, ownership_restriction: nil, page_token: nil, q: nil, sort: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
480
+ command = make_simple_command(:get, 'assetSearch', options)
481
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetSearchResponse::Representation
482
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetSearchResponse
483
+ command.query['createdAfter'] = created_after unless created_after.nil?
484
+ command.query['createdBefore'] = created_before unless created_before.nil?
485
+ command.query['hasConflicts'] = has_conflicts unless has_conflicts.nil?
486
+ command.query['includeAnyProvidedlabel'] = include_any_providedlabel unless include_any_providedlabel.nil?
487
+ command.query['isrcs'] = isrcs unless isrcs.nil?
488
+ command.query['labels'] = labels unless labels.nil?
489
+ command.query['metadataSearchFields'] = metadata_search_fields unless metadata_search_fields.nil?
490
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
491
+ command.query['ownershipRestriction'] = ownership_restriction unless ownership_restriction.nil?
492
+ command.query['pageToken'] = page_token unless page_token.nil?
493
+ command.query['q'] = q unless q.nil?
494
+ command.query['sort'] = sort unless sort.nil?
495
+ command.query['type'] = type unless type.nil?
496
+ command.query['fields'] = fields unless fields.nil?
497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
498
+ command.query['userIp'] = user_ip unless user_ip.nil?
499
+ execute_or_queue_command(command, &block)
500
+ end
501
+
502
+ # This method either retrieves a list of asset shares the partner owns and that
503
+ # map to a specified asset view ID or it retrieves a list of asset views
504
+ # associated with a specified asset share ID owned by the partner.
505
+ # @param [String] asset_id
506
+ # The assetId parameter specifies the asset ID for which you are retrieving data.
507
+ # The parameter can be an asset view ID or an asset share ID.
508
+ # - If the value is an asset view ID, the API response identifies any asset
509
+ # share ids mapped to the asset view.
510
+ # - If the value is an asset share ID, the API response identifies any asset
511
+ # view ids that maps to that asset share.
512
+ # @param [String] on_behalf_of_content_owner
513
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
514
+ # user is acting on behalf of. This parameter supports users whose accounts are
515
+ # associated with multiple content owners.
516
+ # @param [String] page_token
517
+ # The pageToken parameter specifies a token that identifies a particular page of
518
+ # results to return. Set this parameter to the value of the nextPageToken value
519
+ # from the previous API response to retrieve the next page of search results.
520
+ # @param [String] fields
521
+ # Selector specifying which fields to include in a partial response.
522
+ # @param [String] quota_user
523
+ # Available to use for quota purposes for server-side applications. Can be any
524
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
525
+ # Overrides userIp if both are provided.
526
+ # @param [String] user_ip
527
+ # IP address of the site where the request originates. Use this if you want to
528
+ # enforce per-user limits.
529
+ # @param [Google::Apis::RequestOptions] options
530
+ # Request-specific options
531
+ #
532
+ # @yield [result, err] Result & error if block supplied
533
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetShareListResponse] parsed result object
534
+ # @yieldparam err [StandardError] error object if request failed
535
+ #
536
+ # @return [Google::Apis::YoutubePartnerV1::AssetShareListResponse]
537
+ #
538
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
539
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
540
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
541
+ def list_asset_shares(asset_id, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
542
+ command = make_simple_command(:get, 'assetShares', options)
543
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetShareListResponse::Representation
544
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetShareListResponse
545
+ command.query['assetId'] = asset_id unless asset_id.nil?
546
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
547
+ command.query['pageToken'] = page_token unless page_token.nil?
548
+ command.query['fields'] = fields unless fields.nil?
549
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
550
+ command.query['userIp'] = user_ip unless user_ip.nil?
551
+ execute_or_queue_command(command, &block)
552
+ end
553
+
554
+ # Retrieves the metadata for the specified asset. Note that if the request
555
+ # identifies an asset that has been merged with another asset, meaning that
556
+ # YouTube identified the requested asset as a duplicate, then the request
557
+ # retrieves the merged, or synthesized, asset.
558
+ # @param [String] asset_id
559
+ # The assetId parameter specifies the YouTube asset ID of the asset being
560
+ # retrieved.
561
+ # @param [String] fetch_match_policy
562
+ # The fetchMatchPolicy parameter specifies the version of the asset's match
563
+ # policy that should be returned in the API response.
564
+ # @param [String] fetch_metadata
565
+ # The fetchMetadata parameter specifies the version of the asset's metadata that
566
+ # should be returned in the API response. In some cases, YouTube receives
567
+ # metadata for an asset from multiple sources, such as when different partners
568
+ # own the asset in different territories.
569
+ # @param [String] fetch_ownership
570
+ # The fetchOwnership parameter specifies the version of the asset's ownership
571
+ # data that should be returned in the API response. As with asset metadata,
572
+ # YouTube can receive asset ownership data from multiple sources.
573
+ # @param [Boolean] fetch_ownership_conflicts
574
+ # The fetchOwnershipConflicts parameter allows you to retrieve information about
575
+ # ownership conflicts.
576
+ # @param [String] on_behalf_of_content_owner
577
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
578
+ # user is acting on behalf of. This parameter supports users whose accounts are
579
+ # associated with multiple content owners.
580
+ # @param [String] fields
581
+ # Selector specifying which fields to include in a partial response.
582
+ # @param [String] quota_user
583
+ # Available to use for quota purposes for server-side applications. Can be any
584
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
585
+ # Overrides userIp if both are provided.
586
+ # @param [String] user_ip
587
+ # IP address of the site where the request originates. Use this if you want to
588
+ # enforce per-user limits.
589
+ # @param [Google::Apis::RequestOptions] options
590
+ # Request-specific options
591
+ #
592
+ # @yield [result, err] Result & error if block supplied
593
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
594
+ # @yieldparam err [StandardError] error object if request failed
595
+ #
596
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
597
+ #
598
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
599
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
600
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
601
+ def get_asset(asset_id, fetch_match_policy: nil, fetch_metadata: nil, fetch_ownership: nil, fetch_ownership_conflicts: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
602
+ command = make_simple_command(:get, 'assets/{assetId}', options)
603
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
604
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
605
+ command.params['assetId'] = asset_id unless asset_id.nil?
606
+ command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
607
+ command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
608
+ command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
609
+ command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
610
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
611
+ command.query['fields'] = fields unless fields.nil?
612
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
613
+ command.query['userIp'] = user_ip unless user_ip.nil?
614
+ execute_or_queue_command(command, &block)
615
+ end
616
+
617
+ # Inserts an asset with the specified metadata. After inserting an asset, you
618
+ # can set its ownership data and match policy.
619
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
620
+ # @param [String] on_behalf_of_content_owner
621
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
622
+ # user is acting on behalf of. This parameter supports users whose accounts are
623
+ # associated with multiple content owners.
624
+ # @param [String] fields
625
+ # Selector specifying which fields to include in a partial response.
626
+ # @param [String] quota_user
627
+ # Available to use for quota purposes for server-side applications. Can be any
628
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
629
+ # Overrides userIp if both are provided.
630
+ # @param [String] user_ip
631
+ # IP address of the site where the request originates. Use this if you want to
632
+ # enforce per-user limits.
633
+ # @param [Google::Apis::RequestOptions] options
634
+ # Request-specific options
635
+ #
636
+ # @yield [result, err] Result & error if block supplied
637
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
641
+ #
642
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
643
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
644
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
645
+ def insert_asset(asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
646
+ command = make_simple_command(:post, 'assets', options)
647
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
648
+ command.request_object = asset_object
649
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
650
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
651
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
652
+ command.query['fields'] = fields unless fields.nil?
653
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
654
+ command.query['userIp'] = user_ip unless user_ip.nil?
655
+ execute_or_queue_command(command, &block)
656
+ end
657
+
658
+ # Retrieves a list of assets based on asset metadata. The method can retrieve
659
+ # all assets or only assets owned by the content owner.
660
+ # Note that in cases where duplicate assets have been merged, the API response
661
+ # only contains the synthesized asset. (It does not contain the constituent
662
+ # assets that were merged into the synthesized asset.)
663
+ # @param [String] id
664
+ # The id parameter specifies a comma-separated list of YouTube Asset IDs that
665
+ # identify the assets you want to retrieve. As noted in the method description,
666
+ # if you try to retrieve an asset that YouTube identified as a duplicate and
667
+ # merged with another asset, the API response only returns the synthesized asset.
668
+ # In that case, the aliasId property in the asset resource specifies a list of
669
+ # other asset IDs that can be used to identify that asset.
670
+ # Also note that the API response does not contain duplicates. As such, if your
671
+ # request identifies three asset IDs, and all of those have been merged into a
672
+ # single asset, then the API response identifies one matching asset.
673
+ # @param [String] fetch_match_policy
674
+ # The fetchMatchPolicy parameter specifies the version of the asset's match
675
+ # policy that should be returned in the API response.
676
+ # @param [String] fetch_metadata
677
+ # The fetchMetadata parameter specifies the version of the asset's metadata that
678
+ # should be returned in the API response. In some cases, YouTube receives
679
+ # metadata for an asset from multiple sources, such as when different partners
680
+ # own the asset in different territories.
681
+ # @param [String] fetch_ownership
682
+ # The fetchOwnership parameter specifies the version of the asset's ownership
683
+ # data that should be returned in the API response. As with asset metadata,
684
+ # YouTube can receive asset ownership data from multiple sources.
685
+ # @param [Boolean] fetch_ownership_conflicts
686
+ # The fetchOwnershipConflicts parameter allows you to retrieve information about
687
+ # ownership conflicts.
688
+ # @param [String] on_behalf_of_content_owner
689
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
690
+ # user is acting on behalf of. This parameter supports users whose accounts are
691
+ # associated with multiple content owners.
692
+ # @param [String] fields
693
+ # Selector specifying which fields to include in a partial response.
694
+ # @param [String] quota_user
695
+ # Available to use for quota purposes for server-side applications. Can be any
696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
697
+ # Overrides userIp if both are provided.
698
+ # @param [String] user_ip
699
+ # IP address of the site where the request originates. Use this if you want to
700
+ # enforce per-user limits.
701
+ # @param [Google::Apis::RequestOptions] options
702
+ # Request-specific options
703
+ #
704
+ # @yield [result, err] Result & error if block supplied
705
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::AssetListResponse] parsed result object
706
+ # @yieldparam err [StandardError] error object if request failed
707
+ #
708
+ # @return [Google::Apis::YoutubePartnerV1::AssetListResponse]
709
+ #
710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
713
+ def list_assets(id, fetch_match_policy: nil, fetch_metadata: nil, fetch_ownership: nil, fetch_ownership_conflicts: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
714
+ command = make_simple_command(:get, 'assets', options)
715
+ command.response_representation = Google::Apis::YoutubePartnerV1::AssetListResponse::Representation
716
+ command.response_class = Google::Apis::YoutubePartnerV1::AssetListResponse
717
+ command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
718
+ command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
719
+ command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
720
+ command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
721
+ command.query['id'] = id unless id.nil?
722
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
723
+ command.query['fields'] = fields unless fields.nil?
724
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
725
+ command.query['userIp'] = user_ip unless user_ip.nil?
726
+ execute_or_queue_command(command, &block)
727
+ end
728
+
729
+ # Updates the metadata for the specified asset. This method supports patch
730
+ # semantics.
731
+ # @param [String] asset_id
732
+ # The assetId parameter specifies the YouTube asset ID of the asset being
733
+ # updated.
734
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
735
+ # @param [String] on_behalf_of_content_owner
736
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
737
+ # user is acting on behalf of. This parameter supports users whose accounts are
738
+ # associated with multiple content owners.
739
+ # @param [String] fields
740
+ # Selector specifying which fields to include in a partial response.
741
+ # @param [String] quota_user
742
+ # Available to use for quota purposes for server-side applications. Can be any
743
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
744
+ # Overrides userIp if both are provided.
745
+ # @param [String] user_ip
746
+ # IP address of the site where the request originates. Use this if you want to
747
+ # enforce per-user limits.
748
+ # @param [Google::Apis::RequestOptions] options
749
+ # Request-specific options
750
+ #
751
+ # @yield [result, err] Result & error if block supplied
752
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
753
+ # @yieldparam err [StandardError] error object if request failed
754
+ #
755
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
756
+ #
757
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
758
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
759
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
760
+ def patch_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
761
+ command = make_simple_command(:patch, 'assets/{assetId}', options)
762
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
763
+ command.request_object = asset_object
764
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
765
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
766
+ command.params['assetId'] = asset_id unless asset_id.nil?
767
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
768
+ command.query['fields'] = fields unless fields.nil?
769
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
770
+ command.query['userIp'] = user_ip unless user_ip.nil?
771
+ execute_or_queue_command(command, &block)
772
+ end
773
+
774
+ # Updates the metadata for the specified asset.
775
+ # @param [String] asset_id
776
+ # The assetId parameter specifies the YouTube asset ID of the asset being
777
+ # updated.
778
+ # @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
779
+ # @param [String] on_behalf_of_content_owner
780
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
781
+ # user is acting on behalf of. This parameter supports users whose accounts are
782
+ # associated with multiple content owners.
783
+ # @param [String] fields
784
+ # Selector specifying which fields to include in a partial response.
785
+ # @param [String] quota_user
786
+ # Available to use for quota purposes for server-side applications. Can be any
787
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
788
+ # Overrides userIp if both are provided.
789
+ # @param [String] user_ip
790
+ # IP address of the site where the request originates. Use this if you want to
791
+ # enforce per-user limits.
792
+ # @param [Google::Apis::RequestOptions] options
793
+ # Request-specific options
794
+ #
795
+ # @yield [result, err] Result & error if block supplied
796
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
797
+ # @yieldparam err [StandardError] error object if request failed
798
+ #
799
+ # @return [Google::Apis::YoutubePartnerV1::Asset]
800
+ #
801
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
802
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
803
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
804
+ def update_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
805
+ command = make_simple_command(:put, 'assets/{assetId}', options)
806
+ command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
807
+ command.request_object = asset_object
808
+ command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
809
+ command.response_class = Google::Apis::YoutubePartnerV1::Asset
810
+ command.params['assetId'] = asset_id unless asset_id.nil?
811
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
812
+ command.query['fields'] = fields unless fields.nil?
813
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
814
+ command.query['userIp'] = user_ip unless user_ip.nil?
815
+ execute_or_queue_command(command, &block)
816
+ end
817
+
818
+ # Deletes a specified campaign for an owner.
819
+ # @param [String] campaign_id
820
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
821
+ # being deleted.
822
+ # @param [String] on_behalf_of_content_owner
823
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
824
+ # user is acting on behalf of. This parameter supports users whose accounts are
825
+ # associated with multiple content owners.
826
+ # @param [String] fields
827
+ # Selector specifying which fields to include in a partial response.
828
+ # @param [String] quota_user
829
+ # Available to use for quota purposes for server-side applications. Can be any
830
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
831
+ # Overrides userIp if both are provided.
832
+ # @param [String] user_ip
833
+ # IP address of the site where the request originates. Use this if you want to
834
+ # enforce per-user limits.
835
+ # @param [Google::Apis::RequestOptions] options
836
+ # Request-specific options
837
+ #
838
+ # @yield [result, err] Result & error if block supplied
839
+ # @yieldparam result [NilClass] No result returned for this method
840
+ # @yieldparam err [StandardError] error object if request failed
841
+ #
842
+ # @return [void]
843
+ #
844
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
845
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
846
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
847
+ def delete_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
848
+ command = make_simple_command(:delete, 'campaigns/{campaignId}', options)
849
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
850
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
851
+ command.query['fields'] = fields unless fields.nil?
852
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
853
+ command.query['userIp'] = user_ip unless user_ip.nil?
854
+ execute_or_queue_command(command, &block)
855
+ end
856
+
857
+ # Retrieves a particular campaign for an owner.
858
+ # @param [String] campaign_id
859
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
860
+ # being retrieved.
861
+ # @param [String] on_behalf_of_content_owner
862
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
863
+ # user is acting on behalf of. This parameter supports users whose accounts are
864
+ # associated with multiple content owners.
865
+ # @param [String] fields
866
+ # Selector specifying which fields to include in a partial response.
867
+ # @param [String] quota_user
868
+ # Available to use for quota purposes for server-side applications. Can be any
869
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
870
+ # Overrides userIp if both are provided.
871
+ # @param [String] user_ip
872
+ # IP address of the site where the request originates. Use this if you want to
873
+ # enforce per-user limits.
874
+ # @param [Google::Apis::RequestOptions] options
875
+ # Request-specific options
876
+ #
877
+ # @yield [result, err] Result & error if block supplied
878
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
879
+ # @yieldparam err [StandardError] error object if request failed
880
+ #
881
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
882
+ #
883
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
884
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
885
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
886
+ def get_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
887
+ command = make_simple_command(:get, 'campaigns/{campaignId}', options)
888
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
889
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
890
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
891
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
892
+ command.query['fields'] = fields unless fields.nil?
893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
894
+ command.query['userIp'] = user_ip unless user_ip.nil?
895
+ execute_or_queue_command(command, &block)
896
+ end
897
+
898
+ # Insert a new campaign for an owner using the specified campaign data.
899
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
900
+ # @param [String] on_behalf_of_content_owner
901
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
902
+ # user is acting on behalf of. This parameter supports users whose accounts are
903
+ # associated with multiple content owners.
904
+ # @param [String] fields
905
+ # Selector specifying which fields to include in a partial response.
906
+ # @param [String] quota_user
907
+ # Available to use for quota purposes for server-side applications. Can be any
908
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
909
+ # Overrides userIp if both are provided.
910
+ # @param [String] user_ip
911
+ # IP address of the site where the request originates. Use this if you want to
912
+ # enforce per-user limits.
913
+ # @param [Google::Apis::RequestOptions] options
914
+ # Request-specific options
915
+ #
916
+ # @yield [result, err] Result & error if block supplied
917
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
918
+ # @yieldparam err [StandardError] error object if request failed
919
+ #
920
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
921
+ #
922
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
923
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
924
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
925
+ def insert_campaign(campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
926
+ command = make_simple_command(:post, 'campaigns', options)
927
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
928
+ command.request_object = campaign_object
929
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
930
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
931
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ command.query['userIp'] = user_ip unless user_ip.nil?
935
+ execute_or_queue_command(command, &block)
936
+ end
937
+
938
+ # Retrieves a list of campaigns for an owner.
939
+ # @param [String] on_behalf_of_content_owner
940
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
941
+ # user is acting on behalf of. This parameter supports users whose accounts are
942
+ # associated with multiple content owners.
943
+ # @param [String] page_token
944
+ # The pageToken parameter specifies a token that identifies a particular page of
945
+ # results to return. For example, set this parameter to the value of the
946
+ # nextPageToken value from the previous API response to retrieve the next page
947
+ # of search results.
948
+ # @param [String] fields
949
+ # Selector specifying which fields to include in a partial response.
950
+ # @param [String] quota_user
951
+ # Available to use for quota purposes for server-side applications. Can be any
952
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
953
+ # Overrides userIp if both are provided.
954
+ # @param [String] user_ip
955
+ # IP address of the site where the request originates. Use this if you want to
956
+ # enforce per-user limits.
957
+ # @param [Google::Apis::RequestOptions] options
958
+ # Request-specific options
959
+ #
960
+ # @yield [result, err] Result & error if block supplied
961
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::CampaignList] parsed result object
962
+ # @yieldparam err [StandardError] error object if request failed
963
+ #
964
+ # @return [Google::Apis::YoutubePartnerV1::CampaignList]
965
+ #
966
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
967
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
968
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
969
+ def list_campaigns(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
970
+ command = make_simple_command(:get, 'campaigns', options)
971
+ command.response_representation = Google::Apis::YoutubePartnerV1::CampaignList::Representation
972
+ command.response_class = Google::Apis::YoutubePartnerV1::CampaignList
973
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
974
+ command.query['pageToken'] = page_token unless page_token.nil?
975
+ command.query['fields'] = fields unless fields.nil?
976
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
977
+ command.query['userIp'] = user_ip unless user_ip.nil?
978
+ execute_or_queue_command(command, &block)
979
+ end
980
+
981
+ # Update the data for a specific campaign. This method supports patch semantics.
982
+ # @param [String] campaign_id
983
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
984
+ # being retrieved.
985
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
986
+ # @param [String] on_behalf_of_content_owner
987
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
988
+ # user is acting on behalf of. This parameter supports users whose accounts are
989
+ # associated with multiple content owners.
990
+ # @param [String] fields
991
+ # Selector specifying which fields to include in a partial response.
992
+ # @param [String] quota_user
993
+ # Available to use for quota purposes for server-side applications. Can be any
994
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
995
+ # Overrides userIp if both are provided.
996
+ # @param [String] user_ip
997
+ # IP address of the site where the request originates. Use this if you want to
998
+ # enforce per-user limits.
999
+ # @param [Google::Apis::RequestOptions] options
1000
+ # Request-specific options
1001
+ #
1002
+ # @yield [result, err] Result & error if block supplied
1003
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
1004
+ # @yieldparam err [StandardError] error object if request failed
1005
+ #
1006
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
1007
+ #
1008
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1009
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1010
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1011
+ def patch_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1012
+ command = make_simple_command(:patch, 'campaigns/{campaignId}', options)
1013
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1014
+ command.request_object = campaign_object
1015
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1016
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
1017
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
1018
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1019
+ command.query['fields'] = fields unless fields.nil?
1020
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1021
+ command.query['userIp'] = user_ip unless user_ip.nil?
1022
+ execute_or_queue_command(command, &block)
1023
+ end
1024
+
1025
+ # Update the data for a specific campaign.
1026
+ # @param [String] campaign_id
1027
+ # The campaignId parameter specifies the YouTube campaign ID of the campaign
1028
+ # being retrieved.
1029
+ # @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
1030
+ # @param [String] on_behalf_of_content_owner
1031
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1032
+ # user is acting on behalf of. This parameter supports users whose accounts are
1033
+ # associated with multiple content owners.
1034
+ # @param [String] fields
1035
+ # Selector specifying which fields to include in a partial response.
1036
+ # @param [String] quota_user
1037
+ # Available to use for quota purposes for server-side applications. Can be any
1038
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1039
+ # Overrides userIp if both are provided.
1040
+ # @param [String] user_ip
1041
+ # IP address of the site where the request originates. Use this if you want to
1042
+ # enforce per-user limits.
1043
+ # @param [Google::Apis::RequestOptions] options
1044
+ # Request-specific options
1045
+ #
1046
+ # @yield [result, err] Result & error if block supplied
1047
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
1048
+ # @yieldparam err [StandardError] error object if request failed
1049
+ #
1050
+ # @return [Google::Apis::YoutubePartnerV1::Campaign]
1051
+ #
1052
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1053
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1054
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1055
+ def update_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1056
+ command = make_simple_command(:put, 'campaigns/{campaignId}', options)
1057
+ command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1058
+ command.request_object = campaign_object
1059
+ command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
1060
+ command.response_class = Google::Apis::YoutubePartnerV1::Campaign
1061
+ command.params['campaignId'] = campaign_id unless campaign_id.nil?
1062
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1063
+ command.query['fields'] = fields unless fields.nil?
1064
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1065
+ command.query['userIp'] = user_ip unless user_ip.nil?
1066
+ execute_or_queue_command(command, &block)
1067
+ end
1068
+
1069
+ # Retrieves the claim history for a specified claim.
1070
+ # @param [String] claim_id
1071
+ # The claimId parameter specifies the YouTube claim ID of the claim for which
1072
+ # you are retrieving the claim history.
1073
+ # @param [String] on_behalf_of_content_owner
1074
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1075
+ # user is acting on behalf of. This parameter supports users whose accounts are
1076
+ # associated with multiple content owners.
1077
+ # @param [String] fields
1078
+ # Selector specifying which fields to include in a partial response.
1079
+ # @param [String] quota_user
1080
+ # Available to use for quota purposes for server-side applications. Can be any
1081
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1082
+ # Overrides userIp if both are provided.
1083
+ # @param [String] user_ip
1084
+ # IP address of the site where the request originates. Use this if you want to
1085
+ # enforce per-user limits.
1086
+ # @param [Google::Apis::RequestOptions] options
1087
+ # Request-specific options
1088
+ #
1089
+ # @yield [result, err] Result & error if block supplied
1090
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimHistory] parsed result object
1091
+ # @yieldparam err [StandardError] error object if request failed
1092
+ #
1093
+ # @return [Google::Apis::YoutubePartnerV1::ClaimHistory]
1094
+ #
1095
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1096
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1097
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1098
+ def get_claim_history(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1099
+ command = make_simple_command(:get, 'claimHistory/{claimId}', options)
1100
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimHistory::Representation
1101
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimHistory
1102
+ command.params['claimId'] = claim_id unless claim_id.nil?
1103
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1104
+ command.query['fields'] = fields unless fields.nil?
1105
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1106
+ command.query['userIp'] = user_ip unless user_ip.nil?
1107
+ execute_or_queue_command(command, &block)
1108
+ end
1109
+
1110
+ # Retrieves a list of claims that match the search criteria. You can search for
1111
+ # claims that are associated with a specific asset or video or that match a
1112
+ # specified query string.
1113
+ # @param [String] asset_id
1114
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
1115
+ # you are retrieving claims.
1116
+ # @param [String] content_type
1117
+ # The contentType parameter specifies the content type of claims that you want
1118
+ # to retrieve.
1119
+ # @param [DateTime] created_after
1120
+ # The createdAfter parameter allows you to restrict the set of returned claims
1121
+ # to ones created on or after the specified date (inclusive).
1122
+ # @param [DateTime] created_before
1123
+ # The createdBefore parameter allows you to restrict the set of returned claims
1124
+ # to ones created before the specified date (exclusive).
1125
+ # @param [String] inactive_reasons
1126
+ # The inactiveReasons parameter allows you to specify what kind of inactive
1127
+ # claims you want to find based on the reasons why the claims became inactive.
1128
+ # @param [Boolean] include_third_party_claims
1129
+ # Used along with the videoId parameter this parameter determines whether or not
1130
+ # to include third party claims in the search results.
1131
+ # @param [String] on_behalf_of_content_owner
1132
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1133
+ # user is acting on behalf of. This parameter supports users whose accounts are
1134
+ # associated with multiple content owners.
1135
+ # @param [String] origin
1136
+ # The origin parameter specifies the origins you want to find claims for. It is
1137
+ # a comma-separated list of origin values.
1138
+ # @param [String] page_token
1139
+ # The pageToken parameter specifies a token that identifies a particular page of
1140
+ # results to return. For example, set this parameter to the value of the
1141
+ # nextPageToken value from the previous API response to retrieve the next page
1142
+ # of search results.
1143
+ # @param [Boolean] partner_uploaded
1144
+ # The partnerUploaded parameter specifies whether you want to filter your search
1145
+ # results to only partner uploaded or non partner uploaded claims.
1146
+ # @param [String] q
1147
+ # The q parameter specifies the query string to use to filter search results.
1148
+ # YouTube searches for the query string in the following claim fields:
1149
+ # video_title, video_keywords, user_name, isrc, iswc, grid, custom_id, and in
1150
+ # the content owner's email address.
1151
+ # @param [String] reference_id
1152
+ # The referenceId parameter specifies the YouTube reference ID of the reference
1153
+ # for which you are retrieving claims.
1154
+ # @param [String] sort
1155
+ # The sort parameter specifies the method that will be used to order resources
1156
+ # in the API response. The default value is date. However, if the status
1157
+ # parameter value is either appealed, disputed, pending, potential, or
1158
+ # routedForReview, then results will be sorted by the time that the claim review
1159
+ # period expires.
1160
+ # @param [String] status
1161
+ # The status parameter restricts your results to only claims in the specified
1162
+ # status.
1163
+ # @param [DateTime] status_modified_after
1164
+ # The statusModifiedAfter parameter allows you to restrict the result set to
1165
+ # only include claims that have had their status modified on or after the
1166
+ # specified date (inclusive). The date specified must be on or after June 30,
1167
+ # 2016 (2016-06-30). The parameter value's format is YYYY-MM-DD.
1168
+ # @param [DateTime] status_modified_before
1169
+ # The statusModifiedBefore parameter allows you to restrict the result set to
1170
+ # only include claims that have had their status modified before the specified
1171
+ # date (exclusive). The date specified must be on or after July 1, 2016 (2016-07-
1172
+ # 01). The parameter value's format is YYYY-MM-DD.
1173
+ # @param [String] video_id
1174
+ # The videoId parameter specifies comma-separated list of YouTube video IDs for
1175
+ # which you are retrieving claims.
1176
+ # @param [String] fields
1177
+ # Selector specifying which fields to include in a partial response.
1178
+ # @param [String] quota_user
1179
+ # Available to use for quota purposes for server-side applications. Can be any
1180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1181
+ # Overrides userIp if both are provided.
1182
+ # @param [String] user_ip
1183
+ # IP address of the site where the request originates. Use this if you want to
1184
+ # enforce per-user limits.
1185
+ # @param [Google::Apis::RequestOptions] options
1186
+ # Request-specific options
1187
+ #
1188
+ # @yield [result, err] Result & error if block supplied
1189
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimSearchResponse] parsed result object
1190
+ # @yieldparam err [StandardError] error object if request failed
1191
+ #
1192
+ # @return [Google::Apis::YoutubePartnerV1::ClaimSearchResponse]
1193
+ #
1194
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1195
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1196
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1197
+ def list_claim_searches(asset_id: nil, content_type: nil, created_after: nil, created_before: nil, inactive_reasons: nil, include_third_party_claims: nil, on_behalf_of_content_owner: nil, origin: nil, page_token: nil, partner_uploaded: nil, q: nil, reference_id: nil, sort: nil, status: nil, status_modified_after: nil, status_modified_before: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1198
+ command = make_simple_command(:get, 'claimSearch', options)
1199
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimSearchResponse::Representation
1200
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimSearchResponse
1201
+ command.query['assetId'] = asset_id unless asset_id.nil?
1202
+ command.query['contentType'] = content_type unless content_type.nil?
1203
+ command.query['createdAfter'] = created_after unless created_after.nil?
1204
+ command.query['createdBefore'] = created_before unless created_before.nil?
1205
+ command.query['inactiveReasons'] = inactive_reasons unless inactive_reasons.nil?
1206
+ command.query['includeThirdPartyClaims'] = include_third_party_claims unless include_third_party_claims.nil?
1207
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1208
+ command.query['origin'] = origin unless origin.nil?
1209
+ command.query['pageToken'] = page_token unless page_token.nil?
1210
+ command.query['partnerUploaded'] = partner_uploaded unless partner_uploaded.nil?
1211
+ command.query['q'] = q unless q.nil?
1212
+ command.query['referenceId'] = reference_id unless reference_id.nil?
1213
+ command.query['sort'] = sort unless sort.nil?
1214
+ command.query['status'] = status unless status.nil?
1215
+ command.query['statusModifiedAfter'] = status_modified_after unless status_modified_after.nil?
1216
+ command.query['statusModifiedBefore'] = status_modified_before unless status_modified_before.nil?
1217
+ command.query['videoId'] = video_id unless video_id.nil?
1218
+ command.query['fields'] = fields unless fields.nil?
1219
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1220
+ command.query['userIp'] = user_ip unless user_ip.nil?
1221
+ execute_or_queue_command(command, &block)
1222
+ end
1223
+
1224
+ # Retrieves a specific claim by ID.
1225
+ # @param [String] claim_id
1226
+ # The claimId parameter specifies the claim ID of the claim being retrieved.
1227
+ # @param [String] on_behalf_of_content_owner
1228
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1229
+ # user is acting on behalf of. This parameter supports users whose accounts are
1230
+ # associated with multiple content owners.
1231
+ # @param [String] fields
1232
+ # Selector specifying which fields to include in a partial response.
1233
+ # @param [String] quota_user
1234
+ # Available to use for quota purposes for server-side applications. Can be any
1235
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1236
+ # Overrides userIp if both are provided.
1237
+ # @param [String] user_ip
1238
+ # IP address of the site where the request originates. Use this if you want to
1239
+ # enforce per-user limits.
1240
+ # @param [Google::Apis::RequestOptions] options
1241
+ # Request-specific options
1242
+ #
1243
+ # @yield [result, err] Result & error if block supplied
1244
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1245
+ # @yieldparam err [StandardError] error object if request failed
1246
+ #
1247
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1248
+ #
1249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1252
+ def get_claim(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1253
+ command = make_simple_command(:get, 'claims/{claimId}', options)
1254
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1255
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1256
+ command.params['claimId'] = claim_id unless claim_id.nil?
1257
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1258
+ command.query['fields'] = fields unless fields.nil?
1259
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1260
+ command.query['userIp'] = user_ip unless user_ip.nil?
1261
+ execute_or_queue_command(command, &block)
1262
+ end
1263
+
1264
+ # Creates a claim. The video being claimed must have been uploaded to a channel
1265
+ # associated with the same content owner as the API user sending the request.
1266
+ # You can set the claim's policy in any of the following ways:
1267
+ # - Use the claim resource's policy property to identify a saved policy by its
1268
+ # unique ID.
1269
+ # - Use the claim resource's policy property to specify a custom set of rules.
1270
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1271
+ # @param [Boolean] is_manual_claim
1272
+ # restricted
1273
+ # @param [String] on_behalf_of_content_owner
1274
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1275
+ # user is acting on behalf of. This parameter supports users whose accounts are
1276
+ # associated with multiple content owners.
1277
+ # @param [String] fields
1278
+ # Selector specifying which fields to include in a partial response.
1279
+ # @param [String] quota_user
1280
+ # Available to use for quota purposes for server-side applications. Can be any
1281
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1282
+ # Overrides userIp if both are provided.
1283
+ # @param [String] user_ip
1284
+ # IP address of the site where the request originates. Use this if you want to
1285
+ # enforce per-user limits.
1286
+ # @param [Google::Apis::RequestOptions] options
1287
+ # Request-specific options
1288
+ #
1289
+ # @yield [result, err] Result & error if block supplied
1290
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1291
+ # @yieldparam err [StandardError] error object if request failed
1292
+ #
1293
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1294
+ #
1295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1298
+ def insert_claim(claim_object = nil, is_manual_claim: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1299
+ command = make_simple_command(:post, 'claims', options)
1300
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1301
+ command.request_object = claim_object
1302
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1303
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1304
+ command.query['isManualClaim'] = is_manual_claim unless is_manual_claim.nil?
1305
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1306
+ command.query['fields'] = fields unless fields.nil?
1307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1308
+ command.query['userIp'] = user_ip unless user_ip.nil?
1309
+ execute_or_queue_command(command, &block)
1310
+ end
1311
+
1312
+ # Retrieves a list of claims administered by the content owner associated with
1313
+ # the currently authenticated user. Results are sorted in descending order of
1314
+ # creation time.
1315
+ # @param [String] asset_id
1316
+ # Use the claimSearch.list method's assetId parameter to search for claim
1317
+ # snippets by asset ID. You can then retrieve the claim resources for those
1318
+ # claims by using this method's id parameter to specify a comma-separated list
1319
+ # of claim IDs.
1320
+ # @param [String] id
1321
+ # The id parameter specifies a list of comma-separated YouTube claim IDs to
1322
+ # retrieve.
1323
+ # @param [String] on_behalf_of_content_owner
1324
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1325
+ # user is acting on behalf of. This parameter supports users whose accounts are
1326
+ # associated with multiple content owners.
1327
+ # @param [String] page_token
1328
+ # The pageToken parameter specifies a token that identifies a particular page of
1329
+ # results to return. For example, set this parameter to the value of the
1330
+ # nextPageToken value from the previous API response to retrieve the next page
1331
+ # of search results.
1332
+ # @param [String] q
1333
+ # Use the claimSearch.list method's q parameter to search for claim snippets
1334
+ # that match a particular query string. You can then retrieve the claim
1335
+ # resources for those claims by using this method's id parameter to specify a
1336
+ # comma-separated list of claim IDs.
1337
+ # @param [String] video_id
1338
+ # Use the claimSearch.list method's videoId parameter to search for claim
1339
+ # snippets by video ID. You can then retrieve the claim resources for those
1340
+ # claims by using this method's id parameter to specify a comma-separated list
1341
+ # of claim IDs.
1342
+ # @param [String] fields
1343
+ # Selector specifying which fields to include in a partial response.
1344
+ # @param [String] quota_user
1345
+ # Available to use for quota purposes for server-side applications. Can be any
1346
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1347
+ # Overrides userIp if both are provided.
1348
+ # @param [String] user_ip
1349
+ # IP address of the site where the request originates. Use this if you want to
1350
+ # enforce per-user limits.
1351
+ # @param [Google::Apis::RequestOptions] options
1352
+ # Request-specific options
1353
+ #
1354
+ # @yield [result, err] Result & error if block supplied
1355
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimListResponse] parsed result object
1356
+ # @yieldparam err [StandardError] error object if request failed
1357
+ #
1358
+ # @return [Google::Apis::YoutubePartnerV1::ClaimListResponse]
1359
+ #
1360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1363
+ def list_claims(asset_id: nil, id: nil, on_behalf_of_content_owner: nil, page_token: nil, q: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1364
+ command = make_simple_command(:get, 'claims', options)
1365
+ command.response_representation = Google::Apis::YoutubePartnerV1::ClaimListResponse::Representation
1366
+ command.response_class = Google::Apis::YoutubePartnerV1::ClaimListResponse
1367
+ command.query['assetId'] = asset_id unless asset_id.nil?
1368
+ command.query['id'] = id unless id.nil?
1369
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1370
+ command.query['pageToken'] = page_token unless page_token.nil?
1371
+ command.query['q'] = q unless q.nil?
1372
+ command.query['videoId'] = video_id unless video_id.nil?
1373
+ command.query['fields'] = fields unless fields.nil?
1374
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1375
+ command.query['userIp'] = user_ip unless user_ip.nil?
1376
+ execute_or_queue_command(command, &block)
1377
+ end
1378
+
1379
+ # Updates an existing claim by either changing its policy or its status. You can
1380
+ # update a claim's status from active to inactive to effectively release the
1381
+ # claim. This method supports patch semantics.
1382
+ # @param [String] claim_id
1383
+ # The claimId parameter specifies the claim ID of the claim being updated.
1384
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1385
+ # @param [String] on_behalf_of_content_owner
1386
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1387
+ # user is acting on behalf of. This parameter supports users whose accounts are
1388
+ # associated with multiple content owners.
1389
+ # @param [String] fields
1390
+ # Selector specifying which fields to include in a partial response.
1391
+ # @param [String] quota_user
1392
+ # Available to use for quota purposes for server-side applications. Can be any
1393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1394
+ # Overrides userIp if both are provided.
1395
+ # @param [String] user_ip
1396
+ # IP address of the site where the request originates. Use this if you want to
1397
+ # enforce per-user limits.
1398
+ # @param [Google::Apis::RequestOptions] options
1399
+ # Request-specific options
1400
+ #
1401
+ # @yield [result, err] Result & error if block supplied
1402
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1403
+ # @yieldparam err [StandardError] error object if request failed
1404
+ #
1405
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1406
+ #
1407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1410
+ def patch_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1411
+ command = make_simple_command(:patch, 'claims/{claimId}', options)
1412
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1413
+ command.request_object = claim_object
1414
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1415
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1416
+ command.params['claimId'] = claim_id unless claim_id.nil?
1417
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1418
+ command.query['fields'] = fields unless fields.nil?
1419
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1420
+ command.query['userIp'] = user_ip unless user_ip.nil?
1421
+ execute_or_queue_command(command, &block)
1422
+ end
1423
+
1424
+ # Updates an existing claim by either changing its policy or its status. You can
1425
+ # update a claim's status from active to inactive to effectively release the
1426
+ # claim.
1427
+ # @param [String] claim_id
1428
+ # The claimId parameter specifies the claim ID of the claim being updated.
1429
+ # @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
1430
+ # @param [String] on_behalf_of_content_owner
1431
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1432
+ # user is acting on behalf of. This parameter supports users whose accounts are
1433
+ # associated with multiple content owners.
1434
+ # @param [String] fields
1435
+ # Selector specifying which fields to include in a partial response.
1436
+ # @param [String] quota_user
1437
+ # Available to use for quota purposes for server-side applications. Can be any
1438
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1439
+ # Overrides userIp if both are provided.
1440
+ # @param [String] user_ip
1441
+ # IP address of the site where the request originates. Use this if you want to
1442
+ # enforce per-user limits.
1443
+ # @param [Google::Apis::RequestOptions] options
1444
+ # Request-specific options
1445
+ #
1446
+ # @yield [result, err] Result & error if block supplied
1447
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
1448
+ # @yieldparam err [StandardError] error object if request failed
1449
+ #
1450
+ # @return [Google::Apis::YoutubePartnerV1::Claim]
1451
+ #
1452
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1453
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1454
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1455
+ def update_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1456
+ command = make_simple_command(:put, 'claims/{claimId}', options)
1457
+ command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1458
+ command.request_object = claim_object
1459
+ command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
1460
+ command.response_class = Google::Apis::YoutubePartnerV1::Claim
1461
+ command.params['claimId'] = claim_id unless claim_id.nil?
1462
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1463
+ command.query['fields'] = fields unless fields.nil?
1464
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1465
+ command.query['userIp'] = user_ip unless user_ip.nil?
1466
+ execute_or_queue_command(command, &block)
1467
+ end
1468
+
1469
+ # Retrieves advertising options for the content owner associated with the
1470
+ # authenticated user.
1471
+ # @param [String] on_behalf_of_content_owner
1472
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1473
+ # user is acting on behalf of. This parameter supports users whose accounts are
1474
+ # associated with multiple content owners.
1475
+ # @param [String] fields
1476
+ # Selector specifying which fields to include in a partial response.
1477
+ # @param [String] quota_user
1478
+ # Available to use for quota purposes for server-side applications. Can be any
1479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1480
+ # Overrides userIp if both are provided.
1481
+ # @param [String] user_ip
1482
+ # IP address of the site where the request originates. Use this if you want to
1483
+ # enforce per-user limits.
1484
+ # @param [Google::Apis::RequestOptions] options
1485
+ # Request-specific options
1486
+ #
1487
+ # @yield [result, err] Result & error if block supplied
1488
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1489
+ # @yieldparam err [StandardError] error object if request failed
1490
+ #
1491
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1492
+ #
1493
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1494
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1495
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1496
+ def get_content_owner_advertising_option(on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1497
+ command = make_simple_command(:get, 'contentOwnerAdvertisingOptions', options)
1498
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1499
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1500
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1501
+ command.query['fields'] = fields unless fields.nil?
1502
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1503
+ command.query['userIp'] = user_ip unless user_ip.nil?
1504
+ execute_or_queue_command(command, &block)
1505
+ end
1506
+
1507
+ # Updates advertising options for the content owner associated with the
1508
+ # authenticated API user. This method supports patch semantics.
1509
+ # @param [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] content_owner_advertising_option_object
1510
+ # @param [String] on_behalf_of_content_owner
1511
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1512
+ # user is acting on behalf of. This parameter supports users whose accounts are
1513
+ # associated with multiple content owners.
1514
+ # @param [String] fields
1515
+ # Selector specifying which fields to include in a partial response.
1516
+ # @param [String] quota_user
1517
+ # Available to use for quota purposes for server-side applications. Can be any
1518
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1519
+ # Overrides userIp if both are provided.
1520
+ # @param [String] user_ip
1521
+ # IP address of the site where the request originates. Use this if you want to
1522
+ # enforce per-user limits.
1523
+ # @param [Google::Apis::RequestOptions] options
1524
+ # Request-specific options
1525
+ #
1526
+ # @yield [result, err] Result & error if block supplied
1527
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1528
+ # @yieldparam err [StandardError] error object if request failed
1529
+ #
1530
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1531
+ #
1532
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1533
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1534
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1535
+ def patch_content_owner_advertising_option(content_owner_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1536
+ command = make_simple_command(:patch, 'contentOwnerAdvertisingOptions', options)
1537
+ command.request_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1538
+ command.request_object = content_owner_advertising_option_object
1539
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1540
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1541
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1542
+ command.query['fields'] = fields unless fields.nil?
1543
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1544
+ command.query['userIp'] = user_ip unless user_ip.nil?
1545
+ execute_or_queue_command(command, &block)
1546
+ end
1547
+
1548
+ # Updates advertising options for the content owner associated with the
1549
+ # authenticated API user.
1550
+ # @param [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] content_owner_advertising_option_object
1551
+ # @param [String] on_behalf_of_content_owner
1552
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1553
+ # user is acting on behalf of. This parameter supports users whose accounts are
1554
+ # associated with multiple content owners.
1555
+ # @param [String] fields
1556
+ # Selector specifying which fields to include in a partial response.
1557
+ # @param [String] quota_user
1558
+ # Available to use for quota purposes for server-side applications. Can be any
1559
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1560
+ # Overrides userIp if both are provided.
1561
+ # @param [String] user_ip
1562
+ # IP address of the site where the request originates. Use this if you want to
1563
+ # enforce per-user limits.
1564
+ # @param [Google::Apis::RequestOptions] options
1565
+ # Request-specific options
1566
+ #
1567
+ # @yield [result, err] Result & error if block supplied
1568
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption] parsed result object
1569
+ # @yieldparam err [StandardError] error object if request failed
1570
+ #
1571
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption]
1572
+ #
1573
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1574
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1575
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1576
+ def update_content_owner_advertising_option(content_owner_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1577
+ command = make_simple_command(:put, 'contentOwnerAdvertisingOptions', options)
1578
+ command.request_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1579
+ command.request_object = content_owner_advertising_option_object
1580
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption::Representation
1581
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerAdvertisingOption
1582
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1583
+ command.query['fields'] = fields unless fields.nil?
1584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1585
+ command.query['userIp'] = user_ip unless user_ip.nil?
1586
+ execute_or_queue_command(command, &block)
1587
+ end
1588
+
1589
+ # Retrieves information about the specified content owner.
1590
+ # @param [String] content_owner_id
1591
+ # The contentOwnerId parameter specifies a value that uniquely identifies the
1592
+ # content owner.
1593
+ # @param [String] on_behalf_of_content_owner
1594
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1595
+ # user is acting on behalf of. This parameter supports users whose accounts are
1596
+ # associated with multiple content owners.
1597
+ # @param [String] fields
1598
+ # Selector specifying which fields to include in a partial response.
1599
+ # @param [String] quota_user
1600
+ # Available to use for quota purposes for server-side applications. Can be any
1601
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1602
+ # Overrides userIp if both are provided.
1603
+ # @param [String] user_ip
1604
+ # IP address of the site where the request originates. Use this if you want to
1605
+ # enforce per-user limits.
1606
+ # @param [Google::Apis::RequestOptions] options
1607
+ # Request-specific options
1608
+ #
1609
+ # @yield [result, err] Result & error if block supplied
1610
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwner] parsed result object
1611
+ # @yieldparam err [StandardError] error object if request failed
1612
+ #
1613
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwner]
1614
+ #
1615
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1616
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1617
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1618
+ def get_content_owner(content_owner_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1619
+ command = make_simple_command(:get, 'contentOwners/{contentOwnerId}', options)
1620
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwner::Representation
1621
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwner
1622
+ command.params['contentOwnerId'] = content_owner_id unless content_owner_id.nil?
1623
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1624
+ command.query['fields'] = fields unless fields.nil?
1625
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1626
+ command.query['userIp'] = user_ip unless user_ip.nil?
1627
+ execute_or_queue_command(command, &block)
1628
+ end
1629
+
1630
+ # Retrieves a list of content owners that match the request criteria.
1631
+ # @param [Boolean] fetch_mine
1632
+ # The fetchMine parameter restricts the result set to content owners associated
1633
+ # with the currently authenticated API user.
1634
+ # @param [String] id
1635
+ # The id parameter specifies a comma-separated list of YouTube content owner IDs
1636
+ # to retrieve.
1637
+ # @param [String] on_behalf_of_content_owner
1638
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1639
+ # user is acting on behalf of. This parameter supports users whose accounts are
1640
+ # associated with multiple content owners.
1641
+ # @param [String] fields
1642
+ # Selector specifying which fields to include in a partial response.
1643
+ # @param [String] quota_user
1644
+ # Available to use for quota purposes for server-side applications. Can be any
1645
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1646
+ # Overrides userIp if both are provided.
1647
+ # @param [String] user_ip
1648
+ # IP address of the site where the request originates. Use this if you want to
1649
+ # enforce per-user limits.
1650
+ # @param [Google::Apis::RequestOptions] options
1651
+ # Request-specific options
1652
+ #
1653
+ # @yield [result, err] Result & error if block supplied
1654
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse] parsed result object
1655
+ # @yieldparam err [StandardError] error object if request failed
1656
+ #
1657
+ # @return [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse]
1658
+ #
1659
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1660
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1661
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1662
+ def list_content_owners(fetch_mine: nil, id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1663
+ command = make_simple_command(:get, 'contentOwners', options)
1664
+ command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse::Representation
1665
+ command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse
1666
+ command.query['fetchMine'] = fetch_mine unless fetch_mine.nil?
1667
+ command.query['id'] = id unless id.nil?
1668
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1669
+ command.query['fields'] = fields unless fields.nil?
1670
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1671
+ command.query['userIp'] = user_ip unless user_ip.nil?
1672
+ execute_or_queue_command(command, &block)
1673
+ end
1674
+
1675
+ # Inserts a cuepoint into a live broadcast.
1676
+ # @param [String] channel_id
1677
+ # The channelId parameter identifies the channel that owns the broadcast into
1678
+ # which the cuepoint is being inserted.
1679
+ # @param [Google::Apis::YoutubePartnerV1::LiveCuepoint] live_cuepoint_object
1680
+ # @param [String] on_behalf_of_content_owner
1681
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1682
+ # user is acting on behalf of. This parameter supports users whose accounts are
1683
+ # associated with multiple content owners. You can obtain the content owner ID
1684
+ # that will serve as the parameter value by calling the YouTube Content ID API's
1685
+ # contentOwners.list method.
1686
+ # @param [String] fields
1687
+ # Selector specifying which fields to include in a partial response.
1688
+ # @param [String] quota_user
1689
+ # Available to use for quota purposes for server-side applications. Can be any
1690
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1691
+ # Overrides userIp if both are provided.
1692
+ # @param [String] user_ip
1693
+ # IP address of the site where the request originates. Use this if you want to
1694
+ # enforce per-user limits.
1695
+ # @param [Google::Apis::RequestOptions] options
1696
+ # Request-specific options
1697
+ #
1698
+ # @yield [result, err] Result & error if block supplied
1699
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::LiveCuepoint] parsed result object
1700
+ # @yieldparam err [StandardError] error object if request failed
1701
+ #
1702
+ # @return [Google::Apis::YoutubePartnerV1::LiveCuepoint]
1703
+ #
1704
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1705
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1706
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1707
+ def insert_live_cuepoint(channel_id, live_cuepoint_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1708
+ command = make_simple_command(:post, 'liveCuepoints', options)
1709
+ command.request_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
1710
+ command.request_object = live_cuepoint_object
1711
+ command.response_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
1712
+ command.response_class = Google::Apis::YoutubePartnerV1::LiveCuepoint
1713
+ command.query['channelId'] = channel_id unless channel_id.nil?
1714
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1715
+ command.query['fields'] = fields unless fields.nil?
1716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1717
+ command.query['userIp'] = user_ip unless user_ip.nil?
1718
+ execute_or_queue_command(command, &block)
1719
+ end
1720
+
1721
+ # Retrieves a list of all metadata provided for an asset, regardless of which
1722
+ # content owner provided the data.
1723
+ # @param [String] asset_id
1724
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
1725
+ # you are retrieving a metadata history.
1726
+ # @param [String] on_behalf_of_content_owner
1727
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
1728
+ # user is acting on behalf of. This parameter supports users whose accounts are
1729
+ # associated with multiple content owners.
1730
+ # @param [String] fields
1731
+ # Selector specifying which fields to include in a partial response.
1732
+ # @param [String] quota_user
1733
+ # Available to use for quota purposes for server-side applications. Can be any
1734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1735
+ # Overrides userIp if both are provided.
1736
+ # @param [String] user_ip
1737
+ # IP address of the site where the request originates. Use this if you want to
1738
+ # enforce per-user limits.
1739
+ # @param [Google::Apis::RequestOptions] options
1740
+ # Request-specific options
1741
+ #
1742
+ # @yield [result, err] Result & error if block supplied
1743
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse] parsed result object
1744
+ # @yieldparam err [StandardError] error object if request failed
1745
+ #
1746
+ # @return [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse]
1747
+ #
1748
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1749
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1750
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1751
+ def list_metadata_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1752
+ command = make_simple_command(:get, 'metadataHistory', options)
1753
+ command.response_representation = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse::Representation
1754
+ command.response_class = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse
1755
+ command.query['assetId'] = asset_id unless asset_id.nil?
1756
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1757
+ command.query['fields'] = fields unless fields.nil?
1758
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1759
+ command.query['userIp'] = user_ip unless user_ip.nil?
1760
+ execute_or_queue_command(command, &block)
1761
+ end
1762
+
1763
+ # Delete an order, which moves orders to inactive state and removes any
1764
+ # associated video.
1765
+ # @param [String] order_id
1766
+ # Id of the order to delete.
1767
+ # @param [String] on_behalf_of_content_owner
1768
+ # ContentOwnerId that super admin acts in behalf of.
1769
+ # @param [String] fields
1770
+ # Selector specifying which fields to include in a partial response.
1771
+ # @param [String] quota_user
1772
+ # Available to use for quota purposes for server-side applications. Can be any
1773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1774
+ # Overrides userIp if both are provided.
1775
+ # @param [String] user_ip
1776
+ # IP address of the site where the request originates. Use this if you want to
1777
+ # enforce per-user limits.
1778
+ # @param [Google::Apis::RequestOptions] options
1779
+ # Request-specific options
1780
+ #
1781
+ # @yield [result, err] Result & error if block supplied
1782
+ # @yieldparam result [NilClass] No result returned for this method
1783
+ # @yieldparam err [StandardError] error object if request failed
1784
+ #
1785
+ # @return [void]
1786
+ #
1787
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1788
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1789
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1790
+ def delete_order(order_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1791
+ command = make_simple_command(:delete, 'orders/{orderId}', options)
1792
+ command.params['orderId'] = order_id unless order_id.nil?
1793
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1794
+ command.query['fields'] = fields unless fields.nil?
1795
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1796
+ command.query['userIp'] = user_ip unless user_ip.nil?
1797
+ execute_or_queue_command(command, &block)
1798
+ end
1799
+
1800
+ # Retrieve the details of an existing order.
1801
+ # @param [String] order_id
1802
+ # The id of the order.
1803
+ # @param [String] on_behalf_of_content_owner
1804
+ # ContentOnwerId that super admin acts in behalf of.
1805
+ # @param [String] fields
1806
+ # Selector specifying which fields to include in a partial response.
1807
+ # @param [String] quota_user
1808
+ # Available to use for quota purposes for server-side applications. Can be any
1809
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1810
+ # Overrides userIp if both are provided.
1811
+ # @param [String] user_ip
1812
+ # IP address of the site where the request originates. Use this if you want to
1813
+ # enforce per-user limits.
1814
+ # @param [Google::Apis::RequestOptions] options
1815
+ # Request-specific options
1816
+ #
1817
+ # @yield [result, err] Result & error if block supplied
1818
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1819
+ # @yieldparam err [StandardError] error object if request failed
1820
+ #
1821
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1822
+ #
1823
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1824
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1825
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1826
+ def get_order(order_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1827
+ command = make_simple_command(:get, 'orders/{orderId}', options)
1828
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1829
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1830
+ command.params['orderId'] = order_id unless order_id.nil?
1831
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1832
+ command.query['fields'] = fields unless fields.nil?
1833
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1834
+ command.query['userIp'] = user_ip unless user_ip.nil?
1835
+ execute_or_queue_command(command, &block)
1836
+ end
1837
+
1838
+ # Creates a new basic order entry in the YouTube premium asset order management
1839
+ # system. You must supply at least a country and channel in the new order.
1840
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1841
+ # @param [String] on_behalf_of_content_owner
1842
+ # ContentOnwerId that super admin acts in behalf of.
1843
+ # @param [String] fields
1844
+ # Selector specifying which fields to include in a partial response.
1845
+ # @param [String] quota_user
1846
+ # Available to use for quota purposes for server-side applications. Can be any
1847
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1848
+ # Overrides userIp if both are provided.
1849
+ # @param [String] user_ip
1850
+ # IP address of the site where the request originates. Use this if you want to
1851
+ # enforce per-user limits.
1852
+ # @param [Google::Apis::RequestOptions] options
1853
+ # Request-specific options
1854
+ #
1855
+ # @yield [result, err] Result & error if block supplied
1856
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1857
+ # @yieldparam err [StandardError] error object if request failed
1858
+ #
1859
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1860
+ #
1861
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1862
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1863
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1864
+ def insert_order(order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1865
+ command = make_simple_command(:post, 'orders', options)
1866
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1867
+ command.request_object = order_object
1868
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1869
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1870
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1871
+ command.query['fields'] = fields unless fields.nil?
1872
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1873
+ command.query['userIp'] = user_ip unless user_ip.nil?
1874
+ execute_or_queue_command(command, &block)
1875
+ end
1876
+
1877
+ # Return a list of orders, filtered by the parameters below, may return more
1878
+ # than a single page of results.
1879
+ # @param [String] channel_id
1880
+ # Filter results to only a specific channel ( use encrypted ID).
1881
+ # @param [String] content_type
1882
+ # Filter the results by type, possible values are SHOW or MOVIE.
1883
+ # @param [String] country
1884
+ # Filter results by country, two letter ISO country codes are used.
1885
+ # @param [String] custom_id
1886
+ # Filter result by orders that have this custom ID.
1887
+ # @param [String] on_behalf_of_content_owner
1888
+ # ContentOnwerId that super admin acts in behalf of.
1889
+ # @param [String] page_token
1890
+ # The continuation token is an optional value that is only used to page through
1891
+ # large result sets.
1892
+ # - To retrieve the next page of results for a request, set this parameter to
1893
+ # the value of the nextPageToken value from the previous response.
1894
+ # - To get the previous page of results, set this parameter to the value of the
1895
+ # previousPageToken value from the previous response.
1896
+ # @param [String] priority
1897
+ # Filter results by priority. P0, P1, P2, P3 and P4 are the acceptable options.
1898
+ # @param [String] production_house
1899
+ # Filter results by a particular production house. Specified by the name of the
1900
+ # production house.
1901
+ # @param [String] q
1902
+ # Filter results to only orders that contain this string in the title.
1903
+ # @param [String] status
1904
+ # Filter results to have this status, available options are STATUS_AVAILED,
1905
+ # STATUS_ORDERED, STATUS_RECEIVED, STATUS_READY_FOR_QC, STATUS_MOC_FIX,
1906
+ # STATUS_PARTNER_FIX, STATUS_YOUTUBE_FIX, STATUS_QC_APPROVED, STATUS_INACTIVE,
1907
+ # STATUS_INGESTION_COMPLETE, STATUS_REORDERED
1908
+ # @param [String] video_id
1909
+ # Filter results to orders that are associated with this YouTube external video
1910
+ # id.
1911
+ # @param [String] fields
1912
+ # Selector specifying which fields to include in a partial response.
1913
+ # @param [String] quota_user
1914
+ # Available to use for quota purposes for server-side applications. Can be any
1915
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1916
+ # Overrides userIp if both are provided.
1917
+ # @param [String] user_ip
1918
+ # IP address of the site where the request originates. Use this if you want to
1919
+ # enforce per-user limits.
1920
+ # @param [Google::Apis::RequestOptions] options
1921
+ # Request-specific options
1922
+ #
1923
+ # @yield [result, err] Result & error if block supplied
1924
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::OrderListResponse] parsed result object
1925
+ # @yieldparam err [StandardError] error object if request failed
1926
+ #
1927
+ # @return [Google::Apis::YoutubePartnerV1::OrderListResponse]
1928
+ #
1929
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1930
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1931
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1932
+ def list_orders(channel_id: nil, content_type: nil, country: nil, custom_id: nil, on_behalf_of_content_owner: nil, page_token: nil, priority: nil, production_house: nil, q: nil, status: nil, video_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1933
+ command = make_simple_command(:get, 'orders', options)
1934
+ command.response_representation = Google::Apis::YoutubePartnerV1::OrderListResponse::Representation
1935
+ command.response_class = Google::Apis::YoutubePartnerV1::OrderListResponse
1936
+ command.query['channelId'] = channel_id unless channel_id.nil?
1937
+ command.query['contentType'] = content_type unless content_type.nil?
1938
+ command.query['country'] = country unless country.nil?
1939
+ command.query['customId'] = custom_id unless custom_id.nil?
1940
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1941
+ command.query['pageToken'] = page_token unless page_token.nil?
1942
+ command.query['priority'] = priority unless priority.nil?
1943
+ command.query['productionHouse'] = production_house unless production_house.nil?
1944
+ command.query['q'] = q unless q.nil?
1945
+ command.query['status'] = status unless status.nil?
1946
+ command.query['videoId'] = video_id unless video_id.nil?
1947
+ command.query['fields'] = fields unless fields.nil?
1948
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1949
+ command.query['userIp'] = user_ip unless user_ip.nil?
1950
+ execute_or_queue_command(command, &block)
1951
+ end
1952
+
1953
+ # Update the values in an existing order. This method supports patch semantics.
1954
+ # @param [String] order_id
1955
+ # The id of the order.
1956
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1957
+ # @param [String] on_behalf_of_content_owner
1958
+ # ContentOwnerId that super admin acts in behalf of.
1959
+ # @param [String] fields
1960
+ # Selector specifying which fields to include in a partial response.
1961
+ # @param [String] quota_user
1962
+ # Available to use for quota purposes for server-side applications. Can be any
1963
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1964
+ # Overrides userIp if both are provided.
1965
+ # @param [String] user_ip
1966
+ # IP address of the site where the request originates. Use this if you want to
1967
+ # enforce per-user limits.
1968
+ # @param [Google::Apis::RequestOptions] options
1969
+ # Request-specific options
1970
+ #
1971
+ # @yield [result, err] Result & error if block supplied
1972
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
1973
+ # @yieldparam err [StandardError] error object if request failed
1974
+ #
1975
+ # @return [Google::Apis::YoutubePartnerV1::Order]
1976
+ #
1977
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1978
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1979
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1980
+ def patch_order(order_id, order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1981
+ command = make_simple_command(:patch, 'orders/{orderId}', options)
1982
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1983
+ command.request_object = order_object
1984
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
1985
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
1986
+ command.params['orderId'] = order_id unless order_id.nil?
1987
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
1988
+ command.query['fields'] = fields unless fields.nil?
1989
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1990
+ command.query['userIp'] = user_ip unless user_ip.nil?
1991
+ execute_or_queue_command(command, &block)
1992
+ end
1993
+
1994
+ # Update the values in an existing order.
1995
+ # @param [String] order_id
1996
+ # The id of the order.
1997
+ # @param [Google::Apis::YoutubePartnerV1::Order] order_object
1998
+ # @param [String] on_behalf_of_content_owner
1999
+ # ContentOwnerId that super admin acts in behalf of.
2000
+ # @param [String] fields
2001
+ # Selector specifying which fields to include in a partial response.
2002
+ # @param [String] quota_user
2003
+ # Available to use for quota purposes for server-side applications. Can be any
2004
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2005
+ # Overrides userIp if both are provided.
2006
+ # @param [String] user_ip
2007
+ # IP address of the site where the request originates. Use this if you want to
2008
+ # enforce per-user limits.
2009
+ # @param [Google::Apis::RequestOptions] options
2010
+ # Request-specific options
2011
+ #
2012
+ # @yield [result, err] Result & error if block supplied
2013
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Order] parsed result object
2014
+ # @yieldparam err [StandardError] error object if request failed
2015
+ #
2016
+ # @return [Google::Apis::YoutubePartnerV1::Order]
2017
+ #
2018
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2019
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2020
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2021
+ def update_order(order_id, order_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2022
+ command = make_simple_command(:put, 'orders/{orderId}', options)
2023
+ command.request_representation = Google::Apis::YoutubePartnerV1::Order::Representation
2024
+ command.request_object = order_object
2025
+ command.response_representation = Google::Apis::YoutubePartnerV1::Order::Representation
2026
+ command.response_class = Google::Apis::YoutubePartnerV1::Order
2027
+ command.params['orderId'] = order_id unless order_id.nil?
2028
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2029
+ command.query['fields'] = fields unless fields.nil?
2030
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2031
+ command.query['userIp'] = user_ip unless user_ip.nil?
2032
+ execute_or_queue_command(command, &block)
2033
+ end
2034
+
2035
+ # Retrieves the ownership data provided for the specified asset by the content
2036
+ # owner associated with the authenticated user.
2037
+ # @param [String] asset_id
2038
+ # The assetId parameter specifies the YouTube asset ID for which you are
2039
+ # retrieving ownership data.
2040
+ # @param [String] on_behalf_of_content_owner
2041
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2042
+ # user is acting on behalf of. This parameter supports users whose accounts are
2043
+ # associated with multiple content owners.
2044
+ # @param [String] fields
2045
+ # Selector specifying which fields to include in a partial response.
2046
+ # @param [String] quota_user
2047
+ # Available to use for quota purposes for server-side applications. Can be any
2048
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2049
+ # Overrides userIp if both are provided.
2050
+ # @param [String] user_ip
2051
+ # IP address of the site where the request originates. Use this if you want to
2052
+ # enforce per-user limits.
2053
+ # @param [Google::Apis::RequestOptions] options
2054
+ # Request-specific options
2055
+ #
2056
+ # @yield [result, err] Result & error if block supplied
2057
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
2058
+ # @yieldparam err [StandardError] error object if request failed
2059
+ #
2060
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
2061
+ #
2062
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2063
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2064
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2065
+ def get_ownership(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2066
+ command = make_simple_command(:get, 'assets/{assetId}/ownership', options)
2067
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2068
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2069
+ command.params['assetId'] = asset_id unless asset_id.nil?
2070
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2071
+ command.query['fields'] = fields unless fields.nil?
2072
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2073
+ command.query['userIp'] = user_ip unless user_ip.nil?
2074
+ execute_or_queue_command(command, &block)
2075
+ end
2076
+
2077
+ # Provides new ownership information for the specified asset. Note that YouTube
2078
+ # may receive ownership information from multiple sources. For example, if an
2079
+ # asset has multiple owners, each owner might send ownership data for the asset.
2080
+ # YouTube algorithmically combines the ownership data received from all of those
2081
+ # sources to generate the asset's canonical ownership data, which should provide
2082
+ # the most comprehensive and accurate representation of the asset's ownership.
2083
+ # This method supports patch semantics.
2084
+ # @param [String] asset_id
2085
+ # The assetId parameter specifies the YouTube asset ID of the asset being
2086
+ # updated.
2087
+ # @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
2088
+ # @param [String] on_behalf_of_content_owner
2089
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2090
+ # user is acting on behalf of. This parameter supports users whose accounts are
2091
+ # associated with multiple content owners.
2092
+ # @param [String] fields
2093
+ # Selector specifying which fields to include in a partial response.
2094
+ # @param [String] quota_user
2095
+ # Available to use for quota purposes for server-side applications. Can be any
2096
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2097
+ # Overrides userIp if both are provided.
2098
+ # @param [String] user_ip
2099
+ # IP address of the site where the request originates. Use this if you want to
2100
+ # enforce per-user limits.
2101
+ # @param [Google::Apis::RequestOptions] options
2102
+ # Request-specific options
2103
+ #
2104
+ # @yield [result, err] Result & error if block supplied
2105
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
2106
+ # @yieldparam err [StandardError] error object if request failed
2107
+ #
2108
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
2109
+ #
2110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2113
+ def patch_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2114
+ command = make_simple_command(:patch, 'assets/{assetId}/ownership', options)
2115
+ command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2116
+ command.request_object = rights_ownership_object
2117
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2118
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2119
+ command.params['assetId'] = asset_id unless asset_id.nil?
2120
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2121
+ command.query['fields'] = fields unless fields.nil?
2122
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2123
+ command.query['userIp'] = user_ip unless user_ip.nil?
2124
+ execute_or_queue_command(command, &block)
2125
+ end
2126
+
2127
+ # Provides new ownership information for the specified asset. Note that YouTube
2128
+ # may receive ownership information from multiple sources. For example, if an
2129
+ # asset has multiple owners, each owner might send ownership data for the asset.
2130
+ # YouTube algorithmically combines the ownership data received from all of those
2131
+ # sources to generate the asset's canonical ownership data, which should provide
2132
+ # the most comprehensive and accurate representation of the asset's ownership.
2133
+ # @param [String] asset_id
2134
+ # The assetId parameter specifies the YouTube asset ID of the asset being
2135
+ # updated.
2136
+ # @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
2137
+ # @param [String] on_behalf_of_content_owner
2138
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2139
+ # user is acting on behalf of. This parameter supports users whose accounts are
2140
+ # associated with multiple content owners.
2141
+ # @param [String] fields
2142
+ # Selector specifying which fields to include in a partial response.
2143
+ # @param [String] quota_user
2144
+ # Available to use for quota purposes for server-side applications. Can be any
2145
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2146
+ # Overrides userIp if both are provided.
2147
+ # @param [String] user_ip
2148
+ # IP address of the site where the request originates. Use this if you want to
2149
+ # enforce per-user limits.
2150
+ # @param [Google::Apis::RequestOptions] options
2151
+ # Request-specific options
2152
+ #
2153
+ # @yield [result, err] Result & error if block supplied
2154
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
2155
+ # @yieldparam err [StandardError] error object if request failed
2156
+ #
2157
+ # @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
2158
+ #
2159
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2160
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2161
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2162
+ def update_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2163
+ command = make_simple_command(:put, 'assets/{assetId}/ownership', options)
2164
+ command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2165
+ command.request_object = rights_ownership_object
2166
+ command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
2167
+ command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
2168
+ command.params['assetId'] = asset_id unless asset_id.nil?
2169
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2170
+ command.query['fields'] = fields unless fields.nil?
2171
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2172
+ command.query['userIp'] = user_ip unless user_ip.nil?
2173
+ execute_or_queue_command(command, &block)
2174
+ end
2175
+
2176
+ # Retrieves a list of the ownership data for an asset, regardless of which
2177
+ # content owner provided the data. The list only includes the most recent
2178
+ # ownership data for each content owner. However, if the content owner has
2179
+ # submitted ownership data through multiple data sources (API, content feeds,
2180
+ # etc.), the list will contain the most recent data for each content owner and
2181
+ # data source.
2182
+ # @param [String] asset_id
2183
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
2184
+ # you are retrieving an ownership data history.
2185
+ # @param [String] on_behalf_of_content_owner
2186
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2187
+ # user is acting on behalf of. This parameter supports users whose accounts are
2188
+ # associated with multiple content owners.
2189
+ # @param [String] fields
2190
+ # Selector specifying which fields to include in a partial response.
2191
+ # @param [String] quota_user
2192
+ # Available to use for quota purposes for server-side applications. Can be any
2193
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2194
+ # Overrides userIp if both are provided.
2195
+ # @param [String] user_ip
2196
+ # IP address of the site where the request originates. Use this if you want to
2197
+ # enforce per-user limits.
2198
+ # @param [Google::Apis::RequestOptions] options
2199
+ # Request-specific options
2200
+ #
2201
+ # @yield [result, err] Result & error if block supplied
2202
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse] parsed result object
2203
+ # @yieldparam err [StandardError] error object if request failed
2204
+ #
2205
+ # @return [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse]
2206
+ #
2207
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2208
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2209
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2210
+ def list_ownership_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2211
+ command = make_simple_command(:get, 'ownershipHistory', options)
2212
+ command.response_representation = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse::Representation
2213
+ command.response_class = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse
2214
+ command.query['assetId'] = asset_id unless asset_id.nil?
2215
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2216
+ command.query['fields'] = fields unless fields.nil?
2217
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2218
+ command.query['userIp'] = user_ip unless user_ip.nil?
2219
+ execute_or_queue_command(command, &block)
2220
+ end
2221
+
2222
+ # Retrieves the specified saved policy.
2223
+ # @param [String] policy_id
2224
+ # The policyId parameter specifies a value that uniquely identifies the policy
2225
+ # being retrieved.
2226
+ # @param [String] on_behalf_of_content_owner
2227
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2228
+ # user is acting on behalf of. This parameter supports users whose accounts are
2229
+ # associated with multiple content owners.
2230
+ # @param [String] fields
2231
+ # Selector specifying which fields to include in a partial response.
2232
+ # @param [String] quota_user
2233
+ # Available to use for quota purposes for server-side applications. Can be any
2234
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2235
+ # Overrides userIp if both are provided.
2236
+ # @param [String] user_ip
2237
+ # IP address of the site where the request originates. Use this if you want to
2238
+ # enforce per-user limits.
2239
+ # @param [Google::Apis::RequestOptions] options
2240
+ # Request-specific options
2241
+ #
2242
+ # @yield [result, err] Result & error if block supplied
2243
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2244
+ # @yieldparam err [StandardError] error object if request failed
2245
+ #
2246
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2247
+ #
2248
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2249
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2250
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2251
+ def get_policy(policy_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2252
+ command = make_simple_command(:get, 'policies/{policyId}', options)
2253
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2254
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2255
+ command.params['policyId'] = policy_id unless policy_id.nil?
2256
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2257
+ command.query['fields'] = fields unless fields.nil?
2258
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2259
+ command.query['userIp'] = user_ip unless user_ip.nil?
2260
+ execute_or_queue_command(command, &block)
2261
+ end
2262
+
2263
+ # Creates a saved policy.
2264
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2265
+ # @param [String] on_behalf_of_content_owner
2266
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2267
+ # user is acting on behalf of. This parameter supports users whose accounts are
2268
+ # associated with multiple content owners.
2269
+ # @param [String] fields
2270
+ # Selector specifying which fields to include in a partial response.
2271
+ # @param [String] quota_user
2272
+ # Available to use for quota purposes for server-side applications. Can be any
2273
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2274
+ # Overrides userIp if both are provided.
2275
+ # @param [String] user_ip
2276
+ # IP address of the site where the request originates. Use this if you want to
2277
+ # enforce per-user limits.
2278
+ # @param [Google::Apis::RequestOptions] options
2279
+ # Request-specific options
2280
+ #
2281
+ # @yield [result, err] Result & error if block supplied
2282
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2283
+ # @yieldparam err [StandardError] error object if request failed
2284
+ #
2285
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2286
+ #
2287
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2288
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2289
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2290
+ def insert_policy(policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2291
+ command = make_simple_command(:post, 'policies', options)
2292
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2293
+ command.request_object = policy_object
2294
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2295
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2296
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2297
+ command.query['fields'] = fields unless fields.nil?
2298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2299
+ command.query['userIp'] = user_ip unless user_ip.nil?
2300
+ execute_or_queue_command(command, &block)
2301
+ end
2302
+
2303
+ # Retrieves a list of the content owner's saved policies.
2304
+ # @param [String] id
2305
+ # The id parameter specifies a comma-separated list of saved policy IDs to
2306
+ # retrieve. Only policies belonging to the currently authenticated content owner
2307
+ # will be available.
2308
+ # @param [String] on_behalf_of_content_owner
2309
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2310
+ # user is acting on behalf of. This parameter supports users whose accounts are
2311
+ # associated with multiple content owners.
2312
+ # @param [String] sort
2313
+ # The sort parameter specifies how the search results should be sorted.
2314
+ # @param [String] fields
2315
+ # Selector specifying which fields to include in a partial response.
2316
+ # @param [String] quota_user
2317
+ # Available to use for quota purposes for server-side applications. Can be any
2318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2319
+ # Overrides userIp if both are provided.
2320
+ # @param [String] user_ip
2321
+ # IP address of the site where the request originates. Use this if you want to
2322
+ # enforce per-user limits.
2323
+ # @param [Google::Apis::RequestOptions] options
2324
+ # Request-specific options
2325
+ #
2326
+ # @yield [result, err] Result & error if block supplied
2327
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::PolicyList] parsed result object
2328
+ # @yieldparam err [StandardError] error object if request failed
2329
+ #
2330
+ # @return [Google::Apis::YoutubePartnerV1::PolicyList]
2331
+ #
2332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2335
+ def list_policies(id: nil, on_behalf_of_content_owner: nil, sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2336
+ command = make_simple_command(:get, 'policies', options)
2337
+ command.response_representation = Google::Apis::YoutubePartnerV1::PolicyList::Representation
2338
+ command.response_class = Google::Apis::YoutubePartnerV1::PolicyList
2339
+ command.query['id'] = id unless id.nil?
2340
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2341
+ command.query['sort'] = sort unless sort.nil?
2342
+ command.query['fields'] = fields unless fields.nil?
2343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2344
+ command.query['userIp'] = user_ip unless user_ip.nil?
2345
+ execute_or_queue_command(command, &block)
2346
+ end
2347
+
2348
+ # Updates the specified saved policy. This method supports patch semantics.
2349
+ # @param [String] policy_id
2350
+ # The policyId parameter specifies a value that uniquely identifies the policy
2351
+ # being updated.
2352
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2353
+ # @param [String] on_behalf_of_content_owner
2354
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2355
+ # user is acting on behalf of. This parameter supports users whose accounts are
2356
+ # associated with multiple content owners.
2357
+ # @param [String] fields
2358
+ # Selector specifying which fields to include in a partial response.
2359
+ # @param [String] quota_user
2360
+ # Available to use for quota purposes for server-side applications. Can be any
2361
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2362
+ # Overrides userIp if both are provided.
2363
+ # @param [String] user_ip
2364
+ # IP address of the site where the request originates. Use this if you want to
2365
+ # enforce per-user limits.
2366
+ # @param [Google::Apis::RequestOptions] options
2367
+ # Request-specific options
2368
+ #
2369
+ # @yield [result, err] Result & error if block supplied
2370
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2371
+ # @yieldparam err [StandardError] error object if request failed
2372
+ #
2373
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2374
+ #
2375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2378
+ def patch_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2379
+ command = make_simple_command(:patch, 'policies/{policyId}', options)
2380
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2381
+ command.request_object = policy_object
2382
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2383
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2384
+ command.params['policyId'] = policy_id unless policy_id.nil?
2385
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2386
+ command.query['fields'] = fields unless fields.nil?
2387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2388
+ command.query['userIp'] = user_ip unless user_ip.nil?
2389
+ execute_or_queue_command(command, &block)
2390
+ end
2391
+
2392
+ # Updates the specified saved policy.
2393
+ # @param [String] policy_id
2394
+ # The policyId parameter specifies a value that uniquely identifies the policy
2395
+ # being updated.
2396
+ # @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
2397
+ # @param [String] on_behalf_of_content_owner
2398
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2399
+ # user is acting on behalf of. This parameter supports users whose accounts are
2400
+ # associated with multiple content owners.
2401
+ # @param [String] fields
2402
+ # Selector specifying which fields to include in a partial response.
2403
+ # @param [String] quota_user
2404
+ # Available to use for quota purposes for server-side applications. Can be any
2405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2406
+ # Overrides userIp if both are provided.
2407
+ # @param [String] user_ip
2408
+ # IP address of the site where the request originates. Use this if you want to
2409
+ # enforce per-user limits.
2410
+ # @param [Google::Apis::RequestOptions] options
2411
+ # Request-specific options
2412
+ #
2413
+ # @yield [result, err] Result & error if block supplied
2414
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
2415
+ # @yieldparam err [StandardError] error object if request failed
2416
+ #
2417
+ # @return [Google::Apis::YoutubePartnerV1::Policy]
2418
+ #
2419
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2420
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2421
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2422
+ def update_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2423
+ command = make_simple_command(:put, 'policies/{policyId}', options)
2424
+ command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2425
+ command.request_object = policy_object
2426
+ command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
2427
+ command.response_class = Google::Apis::YoutubePartnerV1::Policy
2428
+ command.params['policyId'] = policy_id unless policy_id.nil?
2429
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2430
+ command.query['fields'] = fields unless fields.nil?
2431
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2432
+ command.query['userIp'] = user_ip unless user_ip.nil?
2433
+ execute_or_queue_command(command, &block)
2434
+ end
2435
+
2436
+ # Retrieves information about the specified publisher.
2437
+ # @param [String] publisher_id
2438
+ # The publisherId parameter specifies a publisher ID that uniquely identifies
2439
+ # the publisher being retrieved.
2440
+ # @param [String] on_behalf_of_content_owner
2441
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2442
+ # user is acting on behalf of. This parameter supports users whose accounts are
2443
+ # associated with multiple content owners.
2444
+ # @param [String] fields
2445
+ # Selector specifying which fields to include in a partial response.
2446
+ # @param [String] quota_user
2447
+ # Available to use for quota purposes for server-side applications. Can be any
2448
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2449
+ # Overrides userIp if both are provided.
2450
+ # @param [String] user_ip
2451
+ # IP address of the site where the request originates. Use this if you want to
2452
+ # enforce per-user limits.
2453
+ # @param [Google::Apis::RequestOptions] options
2454
+ # Request-specific options
2455
+ #
2456
+ # @yield [result, err] Result & error if block supplied
2457
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Publisher] parsed result object
2458
+ # @yieldparam err [StandardError] error object if request failed
2459
+ #
2460
+ # @return [Google::Apis::YoutubePartnerV1::Publisher]
2461
+ #
2462
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2463
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2464
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2465
+ def get_publisher(publisher_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2466
+ command = make_simple_command(:get, 'publishers/{publisherId}', options)
2467
+ command.response_representation = Google::Apis::YoutubePartnerV1::Publisher::Representation
2468
+ command.response_class = Google::Apis::YoutubePartnerV1::Publisher
2469
+ command.params['publisherId'] = publisher_id unless publisher_id.nil?
2470
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2471
+ command.query['fields'] = fields unless fields.nil?
2472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2473
+ command.query['userIp'] = user_ip unless user_ip.nil?
2474
+ execute_or_queue_command(command, &block)
2475
+ end
2476
+
2477
+ # Retrieves a list of publishers that match the request criteria. This method is
2478
+ # analogous to a publisher search function.
2479
+ # @param [String] cae_number
2480
+ # The caeNumber parameter specifies the CAE number of the publisher that you
2481
+ # want to retrieve.
2482
+ # @param [String] id
2483
+ # The id parameter specifies a comma-separated list of YouTube publisher IDs to
2484
+ # retrieve.
2485
+ # @param [String] ipi_number
2486
+ # The ipiNumber parameter specifies the IPI number of the publisher that you
2487
+ # want to retrieve.
2488
+ # @param [Fixnum] max_results
2489
+ # The maxResults parameter specifies the maximum number of results to return per
2490
+ # page.
2491
+ # @param [String] name_prefix
2492
+ # The namePrefix parameter indicates that the API should only return publishers
2493
+ # whose name starts with this prefix.
2494
+ # @param [String] on_behalf_of_content_owner
2495
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2496
+ # user is acting on behalf of. This parameter supports users whose accounts are
2497
+ # associated with multiple content owners.
2498
+ # @param [String] page_token
2499
+ # The pageToken parameter specifies a token that identifies a particular page of
2500
+ # results to return. Set this parameter to the value of the nextPageToken value
2501
+ # from the previous API response to retrieve the next page of search results.
2502
+ # @param [String] fields
2503
+ # Selector specifying which fields to include in a partial response.
2504
+ # @param [String] quota_user
2505
+ # Available to use for quota purposes for server-side applications. Can be any
2506
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2507
+ # Overrides userIp if both are provided.
2508
+ # @param [String] user_ip
2509
+ # IP address of the site where the request originates. Use this if you want to
2510
+ # enforce per-user limits.
2511
+ # @param [Google::Apis::RequestOptions] options
2512
+ # Request-specific options
2513
+ #
2514
+ # @yield [result, err] Result & error if block supplied
2515
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::PublisherList] parsed result object
2516
+ # @yieldparam err [StandardError] error object if request failed
2517
+ #
2518
+ # @return [Google::Apis::YoutubePartnerV1::PublisherList]
2519
+ #
2520
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2521
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2522
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2523
+ def list_publishers(cae_number: nil, id: nil, ipi_number: nil, max_results: nil, name_prefix: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2524
+ command = make_simple_command(:get, 'publishers', options)
2525
+ command.response_representation = Google::Apis::YoutubePartnerV1::PublisherList::Representation
2526
+ command.response_class = Google::Apis::YoutubePartnerV1::PublisherList
2527
+ command.query['caeNumber'] = cae_number unless cae_number.nil?
2528
+ command.query['id'] = id unless id.nil?
2529
+ command.query['ipiNumber'] = ipi_number unless ipi_number.nil?
2530
+ command.query['maxResults'] = max_results unless max_results.nil?
2531
+ command.query['namePrefix'] = name_prefix unless name_prefix.nil?
2532
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2533
+ command.query['pageToken'] = page_token unless page_token.nil?
2534
+ command.query['fields'] = fields unless fields.nil?
2535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2536
+ command.query['userIp'] = user_ip unless user_ip.nil?
2537
+ execute_or_queue_command(command, &block)
2538
+ end
2539
+
2540
+ # Retrieves information about the specified reference conflict.
2541
+ # @param [String] reference_conflict_id
2542
+ # The referenceConflictId parameter specifies the YouTube reference conflict ID
2543
+ # of the reference conflict being retrieved.
2544
+ # @param [String] on_behalf_of_content_owner
2545
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2546
+ # user is acting on behalf of. This parameter supports users whose accounts are
2547
+ # associated with multiple content owners.
2548
+ # @param [String] fields
2549
+ # Selector specifying which fields to include in a partial response.
2550
+ # @param [String] quota_user
2551
+ # Available to use for quota purposes for server-side applications. Can be any
2552
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2553
+ # Overrides userIp if both are provided.
2554
+ # @param [String] user_ip
2555
+ # IP address of the site where the request originates. Use this if you want to
2556
+ # enforce per-user limits.
2557
+ # @param [Google::Apis::RequestOptions] options
2558
+ # Request-specific options
2559
+ #
2560
+ # @yield [result, err] Result & error if block supplied
2561
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflict] parsed result object
2562
+ # @yieldparam err [StandardError] error object if request failed
2563
+ #
2564
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceConflict]
2565
+ #
2566
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2567
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2568
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2569
+ def get_reference_conflict(reference_conflict_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2570
+ command = make_simple_command(:get, 'referenceConflicts/{referenceConflictId}', options)
2571
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflict::Representation
2572
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflict
2573
+ command.params['referenceConflictId'] = reference_conflict_id unless reference_conflict_id.nil?
2574
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2575
+ command.query['fields'] = fields unless fields.nil?
2576
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2577
+ command.query['userIp'] = user_ip unless user_ip.nil?
2578
+ execute_or_queue_command(command, &block)
2579
+ end
2580
+
2581
+ # Retrieves a list of unresolved reference conflicts.
2582
+ # @param [String] on_behalf_of_content_owner
2583
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2584
+ # user is acting on behalf of. This parameter supports users whose accounts are
2585
+ # associated with multiple content owners.
2586
+ # @param [String] page_token
2587
+ # The pageToken parameter specifies a token that identifies a particular page of
2588
+ # results to return. Set this parameter to the value of the nextPageToken value
2589
+ # from the previous API response to retrieve the next page of search results.
2590
+ # @param [String] fields
2591
+ # Selector specifying which fields to include in a partial response.
2592
+ # @param [String] quota_user
2593
+ # Available to use for quota purposes for server-side applications. Can be any
2594
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2595
+ # Overrides userIp if both are provided.
2596
+ # @param [String] user_ip
2597
+ # IP address of the site where the request originates. Use this if you want to
2598
+ # enforce per-user limits.
2599
+ # @param [Google::Apis::RequestOptions] options
2600
+ # Request-specific options
2601
+ #
2602
+ # @yield [result, err] Result & error if block supplied
2603
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse] parsed result object
2604
+ # @yieldparam err [StandardError] error object if request failed
2605
+ #
2606
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse]
2607
+ #
2608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2611
+ def list_reference_conflicts(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2612
+ command = make_simple_command(:get, 'referenceConflicts', options)
2613
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse::Representation
2614
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse
2615
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2616
+ command.query['pageToken'] = page_token unless page_token.nil?
2617
+ command.query['fields'] = fields unless fields.nil?
2618
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2619
+ command.query['userIp'] = user_ip unless user_ip.nil?
2620
+ execute_or_queue_command(command, &block)
2621
+ end
2622
+
2623
+ # Retrieves information about the specified reference.
2624
+ # @param [String] reference_id
2625
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2626
+ # being retrieved.
2627
+ # @param [String] on_behalf_of_content_owner
2628
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2629
+ # user is acting on behalf of. This parameter supports users whose accounts are
2630
+ # associated with multiple content owners.
2631
+ # @param [String] fields
2632
+ # Selector specifying which fields to include in a partial response.
2633
+ # @param [String] quota_user
2634
+ # Available to use for quota purposes for server-side applications. Can be any
2635
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2636
+ # Overrides userIp if both are provided.
2637
+ # @param [String] user_ip
2638
+ # IP address of the site where the request originates. Use this if you want to
2639
+ # enforce per-user limits.
2640
+ # @param [Google::Apis::RequestOptions] options
2641
+ # Request-specific options
2642
+ #
2643
+ # @yield [result, err] Result & error if block supplied
2644
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2645
+ # @yieldparam err [StandardError] error object if request failed
2646
+ #
2647
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2648
+ #
2649
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2650
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2651
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2652
+ def get_reference(reference_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2653
+ command = make_simple_command(:get, 'references/{referenceId}', options)
2654
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2655
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2656
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2657
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2658
+ command.query['fields'] = fields unless fields.nil?
2659
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2660
+ command.query['userIp'] = user_ip unless user_ip.nil?
2661
+ execute_or_queue_command(command, &block)
2662
+ end
2663
+
2664
+ # Creates a reference in one of the following ways:
2665
+ # - If your request is uploading a reference file, YouTube creates the reference
2666
+ # from the provided content. You can provide either a video/audio file or a pre-
2667
+ # generated fingerprint. If you are providing a pre-generated fingerprint, set
2668
+ # the reference resource's fpDirect property to true in the request body. In
2669
+ # this flow, you can use either the multipart or resumable upload flows to
2670
+ # provide the reference content.
2671
+ # - If you want to create a reference using a claimed video as the reference
2672
+ # content, use the claimId parameter to identify the claim.
2673
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2674
+ # @param [String] claim_id
2675
+ # The claimId parameter specifies the YouTube claim ID of an existing claim from
2676
+ # which a reference should be created. (The claimed video is used as the
2677
+ # reference content.)
2678
+ # @param [String] on_behalf_of_content_owner
2679
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2680
+ # user is acting on behalf of. This parameter supports users whose accounts are
2681
+ # associated with multiple content owners.
2682
+ # @param [String] fields
2683
+ # Selector specifying which fields to include in a partial response.
2684
+ # @param [String] quota_user
2685
+ # Available to use for quota purposes for server-side applications. Can be any
2686
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2687
+ # Overrides userIp if both are provided.
2688
+ # @param [String] user_ip
2689
+ # IP address of the site where the request originates. Use this if you want to
2690
+ # enforce per-user limits.
2691
+ # @param [IO, String] upload_source
2692
+ # IO stream or filename containing content to upload
2693
+ # @param [String] content_type
2694
+ # Content type of the uploaded content.
2695
+ # @param [Google::Apis::RequestOptions] options
2696
+ # Request-specific options
2697
+ #
2698
+ # @yield [result, err] Result & error if block supplied
2699
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2700
+ # @yieldparam err [StandardError] error object if request failed
2701
+ #
2702
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2703
+ #
2704
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2705
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2706
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2707
+ def insert_reference(reference_object = nil, claim_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
2708
+ if upload_source.nil?
2709
+ command = make_simple_command(:post, 'references', options)
2710
+ else
2711
+ command = make_upload_command(:post, 'references', options)
2712
+ command.upload_source = upload_source
2713
+ command.upload_content_type = content_type
2714
+ end
2715
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2716
+ command.request_object = reference_object
2717
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2718
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2719
+ command.query['claimId'] = claim_id unless claim_id.nil?
2720
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2721
+ command.query['fields'] = fields unless fields.nil?
2722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2723
+ command.query['userIp'] = user_ip unless user_ip.nil?
2724
+ execute_or_queue_command(command, &block)
2725
+ end
2726
+
2727
+ # Retrieves a list of references by ID or the list of references for the
2728
+ # specified asset.
2729
+ # @param [String] asset_id
2730
+ # The assetId parameter specifies the YouTube asset ID of the asset for which
2731
+ # you are retrieving references.
2732
+ # @param [String] id
2733
+ # The id parameter specifies a comma-separated list of YouTube reference IDs to
2734
+ # retrieve.
2735
+ # @param [String] on_behalf_of_content_owner
2736
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2737
+ # user is acting on behalf of. This parameter supports users whose accounts are
2738
+ # associated with multiple content owners.
2739
+ # @param [String] page_token
2740
+ # The pageToken parameter specifies a token that identifies a particular page of
2741
+ # results to return. Set this parameter to the value of the nextPageToken value
2742
+ # from the previous API response to retrieve the next page of search results.
2743
+ # @param [String] fields
2744
+ # Selector specifying which fields to include in a partial response.
2745
+ # @param [String] quota_user
2746
+ # Available to use for quota purposes for server-side applications. Can be any
2747
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2748
+ # Overrides userIp if both are provided.
2749
+ # @param [String] user_ip
2750
+ # IP address of the site where the request originates. Use this if you want to
2751
+ # enforce per-user limits.
2752
+ # @param [Google::Apis::RequestOptions] options
2753
+ # Request-specific options
2754
+ #
2755
+ # @yield [result, err] Result & error if block supplied
2756
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceListResponse] parsed result object
2757
+ # @yieldparam err [StandardError] error object if request failed
2758
+ #
2759
+ # @return [Google::Apis::YoutubePartnerV1::ReferenceListResponse]
2760
+ #
2761
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2762
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2763
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2764
+ def list_references(asset_id: nil, id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2765
+ command = make_simple_command(:get, 'references', options)
2766
+ command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceListResponse::Representation
2767
+ command.response_class = Google::Apis::YoutubePartnerV1::ReferenceListResponse
2768
+ command.query['assetId'] = asset_id unless asset_id.nil?
2769
+ command.query['id'] = id unless id.nil?
2770
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2771
+ command.query['pageToken'] = page_token unless page_token.nil?
2772
+ command.query['fields'] = fields unless fields.nil?
2773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2774
+ command.query['userIp'] = user_ip unless user_ip.nil?
2775
+ execute_or_queue_command(command, &block)
2776
+ end
2777
+
2778
+ # Updates a reference. This method supports patch semantics.
2779
+ # @param [String] reference_id
2780
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2781
+ # being updated.
2782
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2783
+ # @param [String] on_behalf_of_content_owner
2784
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2785
+ # user is acting on behalf of. This parameter supports users whose accounts are
2786
+ # associated with multiple content owners.
2787
+ # @param [Boolean] release_claims
2788
+ # The releaseClaims parameter indicates that you want to release all match
2789
+ # claims associated with this reference. This parameter only works when the
2790
+ # claim's status is being updated to 'inactive' - you can then set the parameter'
2791
+ # s value to true to release all match claims produced by this reference.
2792
+ # @param [String] fields
2793
+ # Selector specifying which fields to include in a partial response.
2794
+ # @param [String] quota_user
2795
+ # Available to use for quota purposes for server-side applications. Can be any
2796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2797
+ # Overrides userIp if both are provided.
2798
+ # @param [String] user_ip
2799
+ # IP address of the site where the request originates. Use this if you want to
2800
+ # enforce per-user limits.
2801
+ # @param [Google::Apis::RequestOptions] options
2802
+ # Request-specific options
2803
+ #
2804
+ # @yield [result, err] Result & error if block supplied
2805
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2806
+ # @yieldparam err [StandardError] error object if request failed
2807
+ #
2808
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2809
+ #
2810
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2811
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2812
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2813
+ def patch_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2814
+ command = make_simple_command(:patch, 'references/{referenceId}', options)
2815
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2816
+ command.request_object = reference_object
2817
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2818
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2819
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2820
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2821
+ command.query['releaseClaims'] = release_claims unless release_claims.nil?
2822
+ command.query['fields'] = fields unless fields.nil?
2823
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2824
+ command.query['userIp'] = user_ip unless user_ip.nil?
2825
+ execute_or_queue_command(command, &block)
2826
+ end
2827
+
2828
+ # Updates a reference.
2829
+ # @param [String] reference_id
2830
+ # The referenceId parameter specifies the YouTube reference ID of the reference
2831
+ # being updated.
2832
+ # @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
2833
+ # @param [String] on_behalf_of_content_owner
2834
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2835
+ # user is acting on behalf of. This parameter supports users whose accounts are
2836
+ # associated with multiple content owners.
2837
+ # @param [Boolean] release_claims
2838
+ # The releaseClaims parameter indicates that you want to release all match
2839
+ # claims associated with this reference. This parameter only works when the
2840
+ # claim's status is being updated to 'inactive' - you can then set the parameter'
2841
+ # s value to true to release all match claims produced by this reference.
2842
+ # @param [String] fields
2843
+ # Selector specifying which fields to include in a partial response.
2844
+ # @param [String] quota_user
2845
+ # Available to use for quota purposes for server-side applications. Can be any
2846
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2847
+ # Overrides userIp if both are provided.
2848
+ # @param [String] user_ip
2849
+ # IP address of the site where the request originates. Use this if you want to
2850
+ # enforce per-user limits.
2851
+ # @param [Google::Apis::RequestOptions] options
2852
+ # Request-specific options
2853
+ #
2854
+ # @yield [result, err] Result & error if block supplied
2855
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
2856
+ # @yieldparam err [StandardError] error object if request failed
2857
+ #
2858
+ # @return [Google::Apis::YoutubePartnerV1::Reference]
2859
+ #
2860
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2861
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2862
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2863
+ def update_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2864
+ command = make_simple_command(:put, 'references/{referenceId}', options)
2865
+ command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2866
+ command.request_object = reference_object
2867
+ command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
2868
+ command.response_class = Google::Apis::YoutubePartnerV1::Reference
2869
+ command.params['referenceId'] = reference_id unless reference_id.nil?
2870
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2871
+ command.query['releaseClaims'] = release_claims unless release_claims.nil?
2872
+ command.query['fields'] = fields unless fields.nil?
2873
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2874
+ command.query['userIp'] = user_ip unless user_ip.nil?
2875
+ execute_or_queue_command(command, &block)
2876
+ end
2877
+
2878
+ # Validate a metadata file.
2879
+ # @param [Google::Apis::YoutubePartnerV1::ValidateRequest] validate_request_object
2880
+ # @param [String] on_behalf_of_content_owner
2881
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2882
+ # user is acting on behalf of. This parameter supports users whose accounts are
2883
+ # associated with multiple content owners.
2884
+ # @param [String] fields
2885
+ # Selector specifying which fields to include in a partial response.
2886
+ # @param [String] quota_user
2887
+ # Available to use for quota purposes for server-side applications. Can be any
2888
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2889
+ # Overrides userIp if both are provided.
2890
+ # @param [String] user_ip
2891
+ # IP address of the site where the request originates. Use this if you want to
2892
+ # enforce per-user limits.
2893
+ # @param [Google::Apis::RequestOptions] options
2894
+ # Request-specific options
2895
+ #
2896
+ # @yield [result, err] Result & error if block supplied
2897
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::ValidateResponse] parsed result object
2898
+ # @yieldparam err [StandardError] error object if request failed
2899
+ #
2900
+ # @return [Google::Apis::YoutubePartnerV1::ValidateResponse]
2901
+ #
2902
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2903
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2904
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2905
+ def validate_validator(validate_request_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2906
+ command = make_simple_command(:post, 'validator', options)
2907
+ command.request_representation = Google::Apis::YoutubePartnerV1::ValidateRequest::Representation
2908
+ command.request_object = validate_request_object
2909
+ command.response_representation = Google::Apis::YoutubePartnerV1::ValidateResponse::Representation
2910
+ command.response_class = Google::Apis::YoutubePartnerV1::ValidateResponse
2911
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2912
+ command.query['fields'] = fields unless fields.nil?
2913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2914
+ command.query['userIp'] = user_ip unless user_ip.nil?
2915
+ execute_or_queue_command(command, &block)
2916
+ end
2917
+
2918
+ # Retrieves advertising settings for the specified video.
2919
+ # @param [String] video_id
2920
+ # The videoId parameter specifies the YouTube video ID of the video for which
2921
+ # you are retrieving advertising settings.
2922
+ # @param [String] on_behalf_of_content_owner
2923
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2924
+ # user is acting on behalf of. This parameter supports users whose accounts are
2925
+ # associated with multiple content owners.
2926
+ # @param [String] fields
2927
+ # Selector specifying which fields to include in a partial response.
2928
+ # @param [String] quota_user
2929
+ # Available to use for quota purposes for server-side applications. Can be any
2930
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2931
+ # Overrides userIp if both are provided.
2932
+ # @param [String] user_ip
2933
+ # IP address of the site where the request originates. Use this if you want to
2934
+ # enforce per-user limits.
2935
+ # @param [Google::Apis::RequestOptions] options
2936
+ # Request-specific options
2937
+ #
2938
+ # @yield [result, err] Result & error if block supplied
2939
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
2940
+ # @yieldparam err [StandardError] error object if request failed
2941
+ #
2942
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
2943
+ #
2944
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2945
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2946
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2947
+ def get_video_advertising_option(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2948
+ command = make_simple_command(:get, 'videoAdvertisingOptions/{videoId}', options)
2949
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
2950
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
2951
+ command.params['videoId'] = video_id unless video_id.nil?
2952
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2953
+ command.query['fields'] = fields unless fields.nil?
2954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2955
+ command.query['userIp'] = user_ip unless user_ip.nil?
2956
+ execute_or_queue_command(command, &block)
2957
+ end
2958
+
2959
+ # Retrieves details about the types of allowed ads for a specified partner- or
2960
+ # user-uploaded video.
2961
+ # @param [String] video_id
2962
+ # The videoId parameter specifies the YouTube video ID of the video for which
2963
+ # you are retrieving advertising options.
2964
+ # @param [String] on_behalf_of_content_owner
2965
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
2966
+ # user is acting on behalf of. This parameter supports users whose accounts are
2967
+ # associated with multiple content owners.
2968
+ # @param [String] fields
2969
+ # Selector specifying which fields to include in a partial response.
2970
+ # @param [String] quota_user
2971
+ # Available to use for quota purposes for server-side applications. Can be any
2972
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2973
+ # Overrides userIp if both are provided.
2974
+ # @param [String] user_ip
2975
+ # IP address of the site where the request originates. Use this if you want to
2976
+ # enforce per-user limits.
2977
+ # @param [Google::Apis::RequestOptions] options
2978
+ # Request-specific options
2979
+ #
2980
+ # @yield [result, err] Result & error if block supplied
2981
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse] parsed result object
2982
+ # @yieldparam err [StandardError] error object if request failed
2983
+ #
2984
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse]
2985
+ #
2986
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2987
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2988
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2989
+ def get_video_advertising_option_enabled_ads(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2990
+ command = make_simple_command(:get, 'videoAdvertisingOptions/{videoId}/getEnabledAds', options)
2991
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse::Representation
2992
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse
2993
+ command.params['videoId'] = video_id unless video_id.nil?
2994
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
2995
+ command.query['fields'] = fields unless fields.nil?
2996
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2997
+ command.query['userIp'] = user_ip unless user_ip.nil?
2998
+ execute_or_queue_command(command, &block)
2999
+ end
3000
+
3001
+ # Updates the advertising settings for the specified video. This method supports
3002
+ # patch semantics.
3003
+ # @param [String] video_id
3004
+ # The videoId parameter specifies the YouTube video ID of the video for which
3005
+ # you are updating advertising settings.
3006
+ # @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
3007
+ # @param [String] on_behalf_of_content_owner
3008
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3009
+ # user is acting on behalf of. This parameter supports users whose accounts are
3010
+ # associated with multiple content owners.
3011
+ # @param [String] fields
3012
+ # Selector specifying which fields to include in a partial response.
3013
+ # @param [String] quota_user
3014
+ # Available to use for quota purposes for server-side applications. Can be any
3015
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3016
+ # Overrides userIp if both are provided.
3017
+ # @param [String] user_ip
3018
+ # IP address of the site where the request originates. Use this if you want to
3019
+ # enforce per-user limits.
3020
+ # @param [Google::Apis::RequestOptions] options
3021
+ # Request-specific options
3022
+ #
3023
+ # @yield [result, err] Result & error if block supplied
3024
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
3025
+ # @yieldparam err [StandardError] error object if request failed
3026
+ #
3027
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
3028
+ #
3029
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3030
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3031
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3032
+ def patch_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3033
+ command = make_simple_command(:patch, 'videoAdvertisingOptions/{videoId}', options)
3034
+ command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
3035
+ command.request_object = video_advertising_option_object
3036
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
3037
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
3038
+ command.params['videoId'] = video_id unless video_id.nil?
3039
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3040
+ command.query['fields'] = fields unless fields.nil?
3041
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3042
+ command.query['userIp'] = user_ip unless user_ip.nil?
3043
+ execute_or_queue_command(command, &block)
3044
+ end
3045
+
3046
+ # Updates the advertising settings for the specified video.
3047
+ # @param [String] video_id
3048
+ # The videoId parameter specifies the YouTube video ID of the video for which
3049
+ # you are updating advertising settings.
3050
+ # @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
3051
+ # @param [String] on_behalf_of_content_owner
3052
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3053
+ # user is acting on behalf of. This parameter supports users whose accounts are
3054
+ # associated with multiple content owners.
3055
+ # @param [String] fields
3056
+ # Selector specifying which fields to include in a partial response.
3057
+ # @param [String] quota_user
3058
+ # Available to use for quota purposes for server-side applications. Can be any
3059
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3060
+ # Overrides userIp if both are provided.
3061
+ # @param [String] user_ip
3062
+ # IP address of the site where the request originates. Use this if you want to
3063
+ # enforce per-user limits.
3064
+ # @param [Google::Apis::RequestOptions] options
3065
+ # Request-specific options
3066
+ #
3067
+ # @yield [result, err] Result & error if block supplied
3068
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
3069
+ # @yieldparam err [StandardError] error object if request failed
3070
+ #
3071
+ # @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
3072
+ #
3073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3076
+ def update_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3077
+ command = make_simple_command(:put, 'videoAdvertisingOptions/{videoId}', options)
3078
+ command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
3079
+ command.request_object = video_advertising_option_object
3080
+ command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
3081
+ command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
3082
+ command.params['videoId'] = video_id unless video_id.nil?
3083
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3084
+ command.query['fields'] = fields unless fields.nil?
3085
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3086
+ command.query['userIp'] = user_ip unless user_ip.nil?
3087
+ execute_or_queue_command(command, &block)
3088
+ end
3089
+
3090
+ # Removes a whitelisted channel for a content owner.
3091
+ # @param [String] id
3092
+ # The id parameter specifies the YouTube channel ID of the channel being removed
3093
+ # from whitelist.
3094
+ # @param [String] on_behalf_of_content_owner
3095
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3096
+ # user is acting on behalf of. This parameter supports users whose accounts are
3097
+ # associated with multiple content owners.
3098
+ # @param [String] fields
3099
+ # Selector specifying which fields to include in a partial response.
3100
+ # @param [String] quota_user
3101
+ # Available to use for quota purposes for server-side applications. Can be any
3102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3103
+ # Overrides userIp if both are provided.
3104
+ # @param [String] user_ip
3105
+ # IP address of the site where the request originates. Use this if you want to
3106
+ # enforce per-user limits.
3107
+ # @param [Google::Apis::RequestOptions] options
3108
+ # Request-specific options
3109
+ #
3110
+ # @yield [result, err] Result & error if block supplied
3111
+ # @yieldparam result [NilClass] No result returned for this method
3112
+ # @yieldparam err [StandardError] error object if request failed
3113
+ #
3114
+ # @return [void]
3115
+ #
3116
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3117
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3118
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3119
+ def delete_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3120
+ command = make_simple_command(:delete, 'whitelists/{id}', options)
3121
+ command.params['id'] = id unless id.nil?
3122
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3123
+ command.query['fields'] = fields unless fields.nil?
3124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3125
+ command.query['userIp'] = user_ip unless user_ip.nil?
3126
+ execute_or_queue_command(command, &block)
3127
+ end
3128
+
3129
+ # Retrieves a specific whitelisted channel by ID.
3130
+ # @param [String] id
3131
+ # The id parameter specifies the YouTube channel ID of the whitelisted channel
3132
+ # being retrieved.
3133
+ # @param [String] on_behalf_of_content_owner
3134
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3135
+ # user is acting on behalf of. This parameter supports users whose accounts are
3136
+ # associated with multiple content owners.
3137
+ # @param [String] fields
3138
+ # Selector specifying which fields to include in a partial response.
3139
+ # @param [String] quota_user
3140
+ # Available to use for quota purposes for server-side applications. Can be any
3141
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3142
+ # Overrides userIp if both are provided.
3143
+ # @param [String] user_ip
3144
+ # IP address of the site where the request originates. Use this if you want to
3145
+ # enforce per-user limits.
3146
+ # @param [Google::Apis::RequestOptions] options
3147
+ # Request-specific options
3148
+ #
3149
+ # @yield [result, err] Result & error if block supplied
3150
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
3151
+ # @yieldparam err [StandardError] error object if request failed
3152
+ #
3153
+ # @return [Google::Apis::YoutubePartnerV1::Whitelist]
3154
+ #
3155
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3156
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3157
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3158
+ def get_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3159
+ command = make_simple_command(:get, 'whitelists/{id}', options)
3160
+ command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3161
+ command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
3162
+ command.params['id'] = id unless id.nil?
3163
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3164
+ command.query['fields'] = fields unless fields.nil?
3165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3166
+ command.query['userIp'] = user_ip unless user_ip.nil?
3167
+ execute_or_queue_command(command, &block)
3168
+ end
3169
+
3170
+ # Whitelist a YouTube channel for your content owner. Whitelisted channels are
3171
+ # channels that are not owned or managed by you, but you would like to whitelist
3172
+ # so that no claims from your assets are placed on videos uploaded to these
3173
+ # channels.
3174
+ # @param [Google::Apis::YoutubePartnerV1::Whitelist] whitelist_object
3175
+ # @param [String] on_behalf_of_content_owner
3176
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3177
+ # user is acting on behalf of. This parameter supports users whose accounts are
3178
+ # associated with multiple content owners.
3179
+ # @param [String] fields
3180
+ # Selector specifying which fields to include in a partial response.
3181
+ # @param [String] quota_user
3182
+ # Available to use for quota purposes for server-side applications. Can be any
3183
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3184
+ # Overrides userIp if both are provided.
3185
+ # @param [String] user_ip
3186
+ # IP address of the site where the request originates. Use this if you want to
3187
+ # enforce per-user limits.
3188
+ # @param [Google::Apis::RequestOptions] options
3189
+ # Request-specific options
3190
+ #
3191
+ # @yield [result, err] Result & error if block supplied
3192
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
3193
+ # @yieldparam err [StandardError] error object if request failed
3194
+ #
3195
+ # @return [Google::Apis::YoutubePartnerV1::Whitelist]
3196
+ #
3197
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3198
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3199
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3200
+ def insert_whitelist(whitelist_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3201
+ command = make_simple_command(:post, 'whitelists', options)
3202
+ command.request_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3203
+ command.request_object = whitelist_object
3204
+ command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
3205
+ command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
3206
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3207
+ command.query['fields'] = fields unless fields.nil?
3208
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3209
+ command.query['userIp'] = user_ip unless user_ip.nil?
3210
+ execute_or_queue_command(command, &block)
3211
+ end
3212
+
3213
+ # Retrieves a list of whitelisted channels for a content owner.
3214
+ # @param [String] id
3215
+ # The id parameter specifies a comma-separated list of YouTube channel IDs that
3216
+ # identify the whitelisted channels you want to retrieve.
3217
+ # @param [String] on_behalf_of_content_owner
3218
+ # The onBehalfOfContentOwner parameter identifies the content owner that the
3219
+ # user is acting on behalf of. This parameter supports users whose accounts are
3220
+ # associated with multiple content owners.
3221
+ # @param [String] page_token
3222
+ # The pageToken parameter specifies a token that identifies a particular page of
3223
+ # results to return. Set this parameter to the value of the nextPageToken value
3224
+ # from the previous API response to retrieve the next page of results.
3225
+ # @param [String] fields
3226
+ # Selector specifying which fields to include in a partial response.
3227
+ # @param [String] quota_user
3228
+ # Available to use for quota purposes for server-side applications. Can be any
3229
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3230
+ # Overrides userIp if both are provided.
3231
+ # @param [String] user_ip
3232
+ # IP address of the site where the request originates. Use this if you want to
3233
+ # enforce per-user limits.
3234
+ # @param [Google::Apis::RequestOptions] options
3235
+ # Request-specific options
3236
+ #
3237
+ # @yield [result, err] Result & error if block supplied
3238
+ # @yieldparam result [Google::Apis::YoutubePartnerV1::WhitelistListResponse] parsed result object
3239
+ # @yieldparam err [StandardError] error object if request failed
3240
+ #
3241
+ # @return [Google::Apis::YoutubePartnerV1::WhitelistListResponse]
3242
+ #
3243
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3244
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3245
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3246
+ def list_whitelists(id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3247
+ command = make_simple_command(:get, 'whitelists', options)
3248
+ command.response_representation = Google::Apis::YoutubePartnerV1::WhitelistListResponse::Representation
3249
+ command.response_class = Google::Apis::YoutubePartnerV1::WhitelistListResponse
3250
+ command.query['id'] = id unless id.nil?
3251
+ command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
3252
+ command.query['pageToken'] = page_token unless page_token.nil?
3253
+ command.query['fields'] = fields unless fields.nil?
3254
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3255
+ command.query['userIp'] = user_ip unless user_ip.nil?
3256
+ execute_or_queue_command(command, &block)
3257
+ end
3258
+
3259
+ protected
3260
+
3261
+ def apply_command_defaults(command)
3262
+ command.query['key'] = key unless key.nil?
3263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3264
+ command.query['userIp'] = user_ip unless user_ip.nil?
3265
+ end
3266
+ end
3267
+ end
3268
+ end
3269
+ end