1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699
|
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module YoutubePartnerV1
# YouTube Content ID API
#
# The YouTube Content ID API allows the management of YouTube assets along with
# their associated content, references, ownership, rights and policies.
#
# @example
# require 'google/apis/youtube_partner_v1'
#
# YoutubePartner = Google::Apis::YoutubePartnerV1 # Alias the module
# service = YoutubePartner::YouTubePartnerService.new
#
# @see https://devsite.googleplex.com/youtube/partner/docs/v1/
class YouTubePartnerService < Google::Apis::Core::BaseService
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super('https://www.googleapis.com/', '')
@batch_path = 'batch/youtubePartner/v1'
end
# Insert an asset label for an owner.
# @param [Google::Apis::YoutubePartnerV1::AssetLabel] asset_label_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabel] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetLabel]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_asset_label(asset_label_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/assetLabels', options)
command.request_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
command.request_object = asset_label_object
command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabel::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetLabel
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of all asset labels for an owner.
# @param [String] label_prefix
# The *labelPrefix* parameter identifies the prefix of asset labels to retrieve.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] q
# The *q* parameter specifies the query string to use to filter search results.
# YouTube searches for the query string in the *labelName* field of asset labels.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetLabelListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetLabelListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_asset_labels(label_prefix: nil, on_behalf_of_content_owner: nil, q: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assetLabels', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetLabelListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetLabelListResponse
command.query['labelPrefix'] = label_prefix unless label_prefix.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['q'] = q unless q.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the match policy assigned to the specified asset by the content
# owner associated with the authenticated user. This information is only
# accessible to an owner of the asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving the match policy.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_asset_match_policy(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assets/{assetId}/matchPolicy', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches the asset's match policy. If an asset has multiple owners, each owner
# may set its own match policy for the asset. YouTube then computes the match
# policy that is actually applied for the asset based on the territories where
# each owner owns the asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving the match policy.
# @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/assets/{assetId}/matchPolicy', options)
command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
command.request_object = asset_match_policy_object
command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the asset's match policy. If an asset has multiple owners, each owner
# may set its own match policy for the asset. YouTube then computes the match
# policy that is actually applied for the asset based on the territories where
# each owner owns the asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving the match policy.
# @param [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] asset_match_policy_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetMatchPolicy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetMatchPolicy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_asset_match_policy(asset_id, asset_match_policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/assets/{assetId}/matchPolicy', options)
command.request_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
command.request_object = asset_match_policy_object
command.response_representation = Google::Apis::YoutubePartnerV1::AssetMatchPolicy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetMatchPolicy
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a relationship between two assets.
# @param [String] asset_relationship_id
# The *assetRelationshipId* parameter specifies a value that uniquely identifies
# the relationship you are deleting.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_asset_relationship(asset_relationship_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'youtube/partner/v1/assetRelationships/{assetRelationshipId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Empty::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Empty
command.params['assetRelationshipId'] = asset_relationship_id unless asset_relationship_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a relationship that links two assets.
# @param [Google::Apis::YoutubePartnerV1::AssetRelationship] asset_relationship_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationship] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetRelationship]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_asset_relationship(asset_relationship_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/assetRelationships', options)
command.request_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
command.request_object = asset_relationship_object
command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationship::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationship
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of relationships for a given asset. The list contains
# relationships where the specified asset is either the parent (embedding) or
# child (embedded) asset in the relationship.
# @param [String] asset_id
# The *assetId* parameter specifies the asset ID of the asset for which you are
# retrieving relationships.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of search
# results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_asset_relationships(asset_id, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assetRelationships', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetRelationshipListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Searches for assets based on asset metadata. The method can retrieve all
# assets or only assets owned by the content owner. This method mimics the
# functionality of the advanced search feature on the Assets page in CMS.
# @param [String] created_after
# The *createdAfter* parameter restricts the set of returned assets to ones
# originally created on or after the specified datetime. For example: 2015-01-
# 29T23:00:00Z
# @param [String] created_before
# The *createdBefore* parameter restricts the set of returned assets to ones
# originally created on or before the specified datetime. For example: 2015-01-
# 29T23:00:00Z
# @param [Boolean] has_conflicts
# The *hasConflicts* parameter enables you to only retrieve assets that have
# ownership conflicts. The only valid value is true. Setting the parameter value
# to false does not affect the results.
# @param [Boolean] include_any_providedlabel
# If *includeAnyProvidedlabel* parameter is set to true, will search for assets
# that contain any of the provided labels; else will search for assets that
# contain all the provided labels.
# @param [String] isrcs
# A comma-separated list of up to 50 ISRCs. If you specify a value for this
# parameter, the API server ignores any values set for the following parameters:
# q, includeAnyProvidedLabel, hasConflicts, labels, metadataSearchFields, sort,
# and type.
# @param [String] labels
# The *labels* parameter specifies the assets with certain asset labels that you
# want to retrieve. The parameter value is a comma-separated list of asset
# labels.
# @param [String] metadata_search_fields
# The *metadataSearchField* parameter specifies which metadata fields to search
# by. It is a comma-separated list of metadata field and value pairs connected
# by colon(:). For example: customId:my_custom_id,artist:Dandexx
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] ownership_restriction
# The *ownershipRestriction* parameter specifies the ownership filtering option
# for the search. By default the search is performed in the assets owned by
# currently authenticated user only.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of search
# results.
# @param [String] q
# YouTube searches within the *id*, *type*, and *customId* fields for all assets
# as well as in numerous other metadata fields – such as *actor*, *album*, *
# director*, *isrc*, and *tmsId* – that vary for different types of assets (
# movies, music videos, etc.).
# @param [String] sort
# The *sort* parameter specifies how the search results should be sorted. Note
# that results are always sorted in descending order.
# @param [String] type
# The *type* parameter specifies the types of assets that you want to retrieve.
# The parameter value is a comma-separated list of asset types.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetSearchResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetSearchResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assetSearch', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetSearchResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetSearchResponse
command.query['createdAfter'] = created_after unless created_after.nil?
command.query['createdBefore'] = created_before unless created_before.nil?
command.query['hasConflicts'] = has_conflicts unless has_conflicts.nil?
command.query['includeAnyProvidedlabel'] = include_any_providedlabel unless include_any_providedlabel.nil?
command.query['isrcs'] = isrcs unless isrcs.nil?
command.query['labels'] = labels unless labels.nil?
command.query['metadataSearchFields'] = metadata_search_fields unless metadata_search_fields.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['ownershipRestriction'] = ownership_restriction unless ownership_restriction.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['q'] = q unless q.nil?
command.query['sort'] = sort unless sort.nil?
command.query['type'] = type unless type.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# This method either retrieves a list of asset shares the partner owns and that
# map to a specified asset view ID *or* it retrieves a list of asset views
# associated with a specified asset share ID owned by the partner.
# @param [String] asset_id
# The *assetId* parameter specifies the asset ID for which you are retrieving
# data. The parameter can be an asset view ID or an asset share ID. - If the
# value is an asset view ID, the API response identifies any asset share ids
# mapped to the asset view. - If the value is an asset share ID, the API
# response identifies any asset view ids that maps to that asset share.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of search
# results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetShareListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetShareListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_asset_shares(asset_id, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assetShares', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetShareListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetShareListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the metadata for the specified asset. Note that if the request
# identifies an asset that has been merged with another asset, meaning that
# YouTube identified the requested asset as a duplicate, then the request
# retrieves the merged, or synthesized, asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset being
# retrieved.
# @param [String] fetch_match_policy
# The *fetchMatchPolicy* parameter specifies the version of the asset's match
# policy that should be returned in the API response.
# @param [String] fetch_metadata
# The *fetchMetadata* parameter specifies the version of the asset's metadata
# that should be returned in the API response. In some cases, YouTube receives
# metadata for an asset from multiple sources, such as when different partners
# own the asset in different territories.
# @param [String] fetch_ownership
# The *fetchOwnership* parameter specifies the version of the asset's ownership
# data that should be returned in the API response. As with asset metadata,
# YouTube can receive asset ownership data from multiple sources.
# @param [Boolean] fetch_ownership_conflicts
# The *fetchOwnershipConflicts* parameter allows you to retrieve information
# about ownership conflicts.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Asset]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assets/{assetId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Asset
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Inserts an asset with the specified metadata. After inserting an asset, you
# can set its ownership data and match policy.
# @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Asset]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_asset(asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/assets', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.request_object = asset_object
command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Asset
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of assets based on asset metadata. The method can retrieve
# all assets or only assets owned by the content owner. Note that in cases where
# duplicate assets have been merged, the API response only contains the
# synthesized asset. (It does not contain the constituent assets that were
# merged into the synthesized asset.)
# @param [String] id
# The *id* parameter specifies a comma-separated list of YouTube Asset IDs that
# identify the assets you want to retrieve. As noted in the method description,
# if you try to retrieve an asset that YouTube identified as a duplicate and
# merged with another asset, the API response only returns the synthesized asset.
# In that case, the aliasId property in the asset resource specifies a list of
# other asset IDs that can be used to identify that asset. Also note that the
# API response does not contain duplicates. As such, if your request identifies
# three asset IDs, and all of those have been merged into a single asset, then
# the API response identifies one matching asset.
# @param [String] fetch_match_policy
# The *fetchMatchPolicy* parameter specifies the version of the asset's match
# policy that should be returned in the API response.
# @param [String] fetch_metadata
# The *fetchMetadata* parameter specifies the version of the asset's metadata
# that should be returned in the API response. In some cases, YouTube receives
# metadata for an asset from multiple sources, such as when different partners
# own the asset in different territories.
# @param [String] fetch_ownership
# The *fetchOwnership* parameter specifies the version of the asset's ownership
# data that should be returned in the API response. As with asset metadata,
# YouTube can receive asset ownership data from multiple sources.
# @param [Boolean] fetch_ownership_conflicts
# The *fetchOwnershipConflicts* parameter allows you to retrieve information
# about ownership conflicts.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::AssetListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::AssetListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assets', options)
command.response_representation = Google::Apis::YoutubePartnerV1::AssetListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::AssetListResponse
command.query['fetchMatchPolicy'] = fetch_match_policy unless fetch_match_policy.nil?
command.query['fetchMetadata'] = fetch_metadata unless fetch_metadata.nil?
command.query['fetchOwnership'] = fetch_ownership unless fetch_ownership.nil?
command.query['fetchOwnershipConflicts'] = fetch_ownership_conflicts unless fetch_ownership_conflicts.nil?
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches the metadata for the specified asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset being
# patched.
# @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Asset]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/assets/{assetId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.request_object = asset_object
command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Asset
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the metadata for the specified asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset being
# updated.
# @param [Google::Apis::YoutubePartnerV1::Asset] asset_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Asset] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Asset]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_asset(asset_id, asset_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/assets/{assetId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.request_object = asset_object
command.response_representation = Google::Apis::YoutubePartnerV1::Asset::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Asset
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a specified campaign for an owner.
# @param [String] campaign_id
# The *campaignId* parameter specifies the YouTube campaign ID of the campaign
# being deleted.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'youtube/partner/v1/campaigns/{campaignId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Empty::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Empty
command.params['campaignId'] = campaign_id unless campaign_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a particular campaign for an owner.
# @param [String] campaign_id
# The *campaignId* parameter specifies the YouTube campaign ID of the campaign
# being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Campaign]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_campaign(campaign_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/campaigns/{campaignId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Campaign
command.params['campaignId'] = campaign_id unless campaign_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Insert a new campaign for an owner using the specified campaign data.
# @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Campaign]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_campaign(campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/campaigns', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.request_object = campaign_object
command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Campaign
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of campaigns for an owner.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. For example, set this parameter to the value of the
# nextPageToken value from the previous API response to retrieve the next page
# of search results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::CampaignList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::CampaignList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_campaigns(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/campaigns', options)
command.response_representation = Google::Apis::YoutubePartnerV1::CampaignList::Representation
command.response_class = Google::Apis::YoutubePartnerV1::CampaignList
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patch the data for a specific campaign.
# @param [String] campaign_id
# The *campaignId* parameter specifies the YouTube campaign ID of the campaign
# being retrieved.
# @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Campaign]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/campaigns/{campaignId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.request_object = campaign_object
command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Campaign
command.params['campaignId'] = campaign_id unless campaign_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Update the data for a specific campaign.
# @param [String] campaign_id
# The *campaignId* parameter specifies the YouTube campaign ID of the campaign
# being retrieved.
# @param [Google::Apis::YoutubePartnerV1::Campaign] campaign_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Campaign] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Campaign]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_campaign(campaign_id, campaign_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/campaigns/{campaignId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.request_object = campaign_object
command.response_representation = Google::Apis::YoutubePartnerV1::Campaign::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Campaign
command.params['campaignId'] = campaign_id unless campaign_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the claim history for a specified claim.
# @param [String] claim_id
# The *claimId* parameter specifies the YouTube claim ID of the claim for which
# you are retrieving the claim history.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimHistory] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ClaimHistory]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_claim_history(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/claimHistory/{claimId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ClaimHistory::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ClaimHistory
command.params['claimId'] = claim_id unless claim_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of claims that match the search criteria. You can search for
# claims that are associated with a specific asset or video or that match a
# specified query string.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving claims.
# @param [String] content_type
# The *contentType* parameter specifies the content type of claims that you want
# to retrieve.
# @param [String] created_after
# The *createdAfter* parameter allows you to restrict the set of returned claims
# to ones created on or after the specified date (inclusive).
# @param [String] created_before
# The *createdBefore* parameter allows you to restrict the set of returned
# claims to ones created before the specified date (exclusive).
# @param [String] inactive_reasons
# The *inactiveReasons* parameter allows you to specify what kind of inactive
# claims you want to find based on the reasons why the claims became inactive.
# @param [Boolean] include_third_party_claims
# Used along with the *videoId* parameter this parameter determines whether or
# not to include third party claims in the search results.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] origin
# The *origin* parameter specifies the origins you want to find claims for. It
# is a comma-separated list of origin values.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. For example, set this parameter to the value of the
# nextPageToken value from the previous API response to retrieve the next page
# of search results.
# @param [Boolean] partner_uploaded
# The *partnerUploaded* parameter specifies whether you want to filter your
# search results to only partner uploaded or non partner uploaded claims.
# @param [String] q
# The *q* parameter specifies the query string to use to filter search results.
# YouTube searches for the query string in the following claim fields: *
# video_title*, *video_keywords*, *user_name*, *isrc*, *iswc*, *grid*, *
# custom_id*, and in the content owner's email address.
# @param [String] reference_id
# The *referenceId* parameter specifies the YouTube reference ID of the
# reference for which you are retrieving claims.
# @param [String] sort
# The *sort* parameter specifies the method that will be used to order resources
# in the API response. The default value is date. However, if the status
# parameter value is either appealed, disputed, pending, potential, or
# routedForReview, then results will be sorted by the time that the claim review
# period expires.
# @param [String] status
# The *status* parameter restricts your results to only claims in the specified
# status.
# @param [String] status_modified_after
# The *statusModifiedAfter* parameter allows you to restrict the result set to
# only include claims that have had their status modified on or after the
# specified date (inclusive). The date specified must be on or after June 30,
# 2016 (2016-06-30). The parameter value's format is YYYY-MM-DD.
# @param [String] status_modified_before
# The *statusModifiedBefore* parameter allows you to restrict the result set to
# only include claims that have had their status modified before the specified
# date (exclusive). The date specified must be on or after July 1, 2016 (2016-07-
# 01). The parameter value's format is YYYY-MM-DD.
# @param [String] video_id
# The *videoId* parameter specifies comma-separated list of YouTube video IDs
# for which you are retrieving claims.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimSearchResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ClaimSearchResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/claimSearch', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ClaimSearchResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ClaimSearchResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['contentType'] = content_type unless content_type.nil?
command.query['createdAfter'] = created_after unless created_after.nil?
command.query['createdBefore'] = created_before unless created_before.nil?
command.query['inactiveReasons'] = inactive_reasons unless inactive_reasons.nil?
command.query['includeThirdPartyClaims'] = include_third_party_claims unless include_third_party_claims.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['origin'] = origin unless origin.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['partnerUploaded'] = partner_uploaded unless partner_uploaded.nil?
command.query['q'] = q unless q.nil?
command.query['referenceId'] = reference_id unless reference_id.nil?
command.query['sort'] = sort unless sort.nil?
command.query['status'] = status unless status.nil?
command.query['statusModifiedAfter'] = status_modified_after unless status_modified_after.nil?
command.query['statusModifiedBefore'] = status_modified_before unless status_modified_before.nil?
command.query['videoId'] = video_id unless video_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a specific claim by ID.
# @param [String] claim_id
# The *claimId* parameter specifies the claim ID of the claim being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Claim]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_claim(claim_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/claims/{claimId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Claim
command.params['claimId'] = claim_id unless claim_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a claim. The video being claimed must have been uploaded to a channel
# associated with the same content owner as the API user sending the request.
# You can set the claim's policy in any of the following ways: - Use the claim
# resource's policy property to identify a saved policy by its unique ID. - Use
# the claim resource's policy property to specify a custom set of rules.
# @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
# @param [Boolean] is_manual_claim
# restricted
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Claim]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_claim(claim_object = nil, is_manual_claim: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/claims', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.request_object = claim_object
command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Claim
command.query['isManualClaim'] = is_manual_claim unless is_manual_claim.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of claims administered by the content owner associated with
# the currently authenticated user. Results are sorted in descending order of
# creation time.
# @param [String] asset_id
# Use the claimSearch.list method's assetId parameter to search for claim
# snippets by asset ID. You can then retrieve the claim resources for those
# claims by using this method's *id* parameter to specify a comma-separated list
# of claim IDs.
# @param [String] id
# The *id* parameter specifies a list of comma-separated YouTube claim IDs to
# retrieve.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. For example, set this parameter to the value of the
# nextPageToken value from the previous API response to retrieve the next page
# of search results.
# @param [String] q
# Use the claimSearch.list method's q parameter to search for claim snippets
# that match a particular query string. You can then retrieve the claim
# resources for those claims by using this method's *id* parameter to specify a
# comma-separated list of claim IDs.
# @param [String] video_id
# Use the claimSearch.list method's videoId parameter to search for claim
# snippets by video ID. You can then retrieve the claim resources for those
# claims by using this method's *id* parameter to specify a comma-separated list
# of claim IDs.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ClaimListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ClaimListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
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, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/claims', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ClaimListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ClaimListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['q'] = q unless q.nil?
command.query['videoId'] = video_id unless video_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches an existing claim by either changing its policy or its status. You can
# update a claim's status from active to inactive to effectively release the
# claim.
# @param [String] claim_id
# The *claimId* parameter specifies the claim ID of the claim being updated.
# @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Claim]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/claims/{claimId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.request_object = claim_object
command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Claim
command.params['claimId'] = claim_id unless claim_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates an existing claim by either changing its policy or its status. You can
# update a claim's status from active to inactive to effectively release the
# claim.
# @param [String] claim_id
# The *claimId* parameter specifies the claim ID of the claim being updated.
# @param [Google::Apis::YoutubePartnerV1::Claim] claim_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Claim] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Claim]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_claim(claim_id, claim_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/claims/{claimId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.request_object = claim_object
command.response_representation = Google::Apis::YoutubePartnerV1::Claim::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Claim
command.params['claimId'] = claim_id unless claim_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves information about the specified content owner.
# @param [String] content_owner_id
# The *contentOwnerId* parameter specifies a value that uniquely identifies the
# content owner.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwner] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ContentOwner]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_content_owner(content_owner_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/contentOwners/{contentOwnerId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwner::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ContentOwner
command.params['contentOwnerId'] = content_owner_id unless content_owner_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of content owners that match the request criteria.
# @param [Boolean] fetch_mine
# The *fetchMine* parameter restricts the result set to content owners
# associated with the currently authenticated API user.
# @param [String] id
# The *id* parameter specifies a comma-separated list of YouTube content owner
# IDs to retrieve.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ContentOwnerListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_content_owners(fetch_mine: nil, id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/contentOwners', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ContentOwnerListResponse
command.query['fetchMine'] = fetch_mine unless fetch_mine.nil?
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Inserts a cuepoint into a live broadcast.
# @param [String] channel_id
# The *channelId* parameter identifies the channel that owns the broadcast into
# which the cuepoint is being inserted.
# @param [Google::Apis::YoutubePartnerV1::LiveCuepoint] live_cuepoint_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners. You can obtain the content owner ID
# that will serve as the parameter value by calling the YouTube Content ID API's
# contentOwners.list method.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::LiveCuepoint] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::LiveCuepoint]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_live_cuepoint(channel_id, live_cuepoint_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/liveCuepoints', options)
command.request_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
command.request_object = live_cuepoint_object
command.response_representation = Google::Apis::YoutubePartnerV1::LiveCuepoint::Representation
command.response_class = Google::Apis::YoutubePartnerV1::LiveCuepoint
command.query['channelId'] = channel_id unless channel_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of all metadata provided for an asset, regardless of which
# content owner provided the data.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving a metadata history.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_metadata_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/metadataHistory', options)
command.response_representation = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::MetadataHistoryListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the ownership data provided for the specified asset by the content
# owner associated with the authenticated user.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID for which you are
# retrieving ownership data.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_ownership(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/assets/{assetId}/ownership', options)
command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Provides new ownership information for the specified asset. Note that YouTube
# may receive ownership information from multiple sources. For example, if an
# asset has multiple owners, each owner might send ownership data for the asset.
# YouTube algorithmically combines the ownership data received from all of those
# sources to generate the asset's canonical ownership data, which should provide
# the most comprehensive and accurate representation of the asset's ownership.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset being
# updated.
# @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/assets/{assetId}/ownership', options)
command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
command.request_object = rights_ownership_object
command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Provides new ownership information for the specified asset. Note that YouTube
# may receive ownership information from multiple sources. For example, if an
# asset has multiple owners, each owner might send ownership data for the asset.
# YouTube algorithmically combines the ownership data received from all of those
# sources to generate the asset's canonical ownership data, which should provide
# the most comprehensive and accurate representation of the asset's ownership.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset being
# updated.
# @param [Google::Apis::YoutubePartnerV1::RightsOwnership] rights_ownership_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::RightsOwnership] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::RightsOwnership]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_ownership(asset_id, rights_ownership_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/assets/{assetId}/ownership', options)
command.request_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
command.request_object = rights_ownership_object
command.response_representation = Google::Apis::YoutubePartnerV1::RightsOwnership::Representation
command.response_class = Google::Apis::YoutubePartnerV1::RightsOwnership
command.params['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of the ownership data for an asset, regardless of which
# content owner provided the data. The list only includes the most recent
# ownership data for each content owner. However, if the content owner has
# submitted ownership data through multiple data sources (API, content feeds,
# etc.), the list will contain the most recent data for each content owner and
# data source.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving an ownership data history.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_ownership_histories(asset_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/ownershipHistory', options)
command.response_representation = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::OwnershipHistoryListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves information for the specified package.
# @param [String] package_id
# The *packageId* parameter specifies the Content Delivery package ID of the
# package being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Package] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Package]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_package(package_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/package/{packageId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Package::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Package
command.params['packageId'] = package_id unless package_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Inserts a metadata-only package.
# @param [Google::Apis::YoutubePartnerV1::Package] package_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::PackageInsertResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::PackageInsertResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_package(package_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/package', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Package::Representation
command.request_object = package_object
command.response_representation = Google::Apis::YoutubePartnerV1::PackageInsertResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::PackageInsertResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves the specified saved policy.
# @param [String] policy_id
# The *policyId* parameter specifies a value that uniquely identifies the policy
# being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Policy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_policy(policy_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/policies/{policyId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Policy
command.params['policyId'] = policy_id unless policy_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a saved policy.
# @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Policy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_policy(policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/policies', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.request_object = policy_object
command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Policy
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of the content owner's saved policies.
# @param [String] id
# The *id* parameter specifies a comma-separated list of saved policy IDs to
# retrieve. Only policies belonging to the currently authenticated content owner
# will be available.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] sort
# The *sort* parameter specifies how the search results should be sorted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::PolicyList] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::PolicyList]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_policies(id: nil, on_behalf_of_content_owner: nil, sort: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/policies', options)
command.response_representation = Google::Apis::YoutubePartnerV1::PolicyList::Representation
command.response_class = Google::Apis::YoutubePartnerV1::PolicyList
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['sort'] = sort unless sort.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches the specified saved policy.
# @param [String] policy_id
# The *policyId* parameter specifies a value that uniquely identifies the policy
# being updated.
# @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Policy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/policies/{policyId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.request_object = policy_object
command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Policy
command.params['policyId'] = policy_id unless policy_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the specified saved policy.
# @param [String] policy_id
# The *policyId* parameter specifies a value that uniquely identifies the policy
# being updated.
# @param [Google::Apis::YoutubePartnerV1::Policy] policy_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Policy] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Policy]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_policy(policy_id, policy_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/policies/{policyId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.request_object = policy_object
command.response_representation = Google::Apis::YoutubePartnerV1::Policy::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Policy
command.params['policyId'] = policy_id unless policy_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves information about the specified reference conflict.
# @param [String] reference_conflict_id
# The *referenceConflictId* parameter specifies the YouTube reference conflict
# ID of the reference conflict being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflict] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ReferenceConflict]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_reference_conflict(reference_conflict_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/referenceConflicts/{referenceConflictId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflict::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflict
command.params['referenceConflictId'] = reference_conflict_id unless reference_conflict_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of unresolved reference conflicts.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of search
# results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_reference_conflicts(on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/referenceConflicts', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ReferenceConflictListResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves information about the specified reference.
# @param [String] reference_id
# The *referenceId* parameter specifies the YouTube reference ID of the
# reference being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Reference]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_reference(reference_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/references/{referenceId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Reference
command.params['referenceId'] = reference_id unless reference_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a reference in one of the following ways: - If your request is
# uploading a reference file, YouTube creates the reference from the provided
# content. You can provide either a video/audio file or a pre-generated
# fingerprint. If you are providing a pre-generated fingerprint, set the
# reference resource's fpDirect property to true in the request body. In this
# flow, you can use either the multipart or resumable upload flows to provide
# the reference content. - If you want to create a reference using a claimed
# video as the reference content, use the claimId parameter to identify the
# claim.
# @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
# @param [String] claim_id
# The *claimId* parameter specifies the YouTube claim ID of an existing claim
# from which a reference should be created. (The claimed video is used as the
# reference content.)
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [IO, String] upload_source
# IO stream or filename containing content to upload
# @param [String] content_type
# Content type of the uploaded content.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Reference]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_reference(reference_object = nil, claim_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)
if upload_source.nil?
command = make_simple_command(:post, 'youtube/partner/v1/references', options)
else
command = make_upload_command(:post, 'youtube/partner/v1/references', options)
command.upload_source = upload_source
command.upload_content_type = content_type
end
command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.request_object = reference_object
command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Reference
command.query['claimId'] = claim_id unless claim_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of references by ID or the list of references for the
# specified asset.
# @param [String] asset_id
# The *assetId* parameter specifies the YouTube asset ID of the asset for which
# you are retrieving references.
# @param [String] id
# The *id* parameter specifies a comma-separated list of YouTube reference IDs
# to retrieve.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of search
# results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ReferenceListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ReferenceListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_references(asset_id: nil, id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/references', options)
command.response_representation = Google::Apis::YoutubePartnerV1::ReferenceListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ReferenceListResponse
command.query['assetId'] = asset_id unless asset_id.nil?
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches a reference.
# @param [String] reference_id
# The *referenceId* parameter specifies the YouTube reference ID of the
# reference being updated.
# @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [Boolean] release_claims
# The *releaseClaims* parameter indicates that you want to release all match
# claims associated with this reference. This parameter only works when the
# claim's status is being updated to 'inactive' - you can then set the parameter'
# s value to true to release all match claims produced by this reference.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Reference]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/references/{referenceId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.request_object = reference_object
command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Reference
command.params['referenceId'] = reference_id unless reference_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['releaseClaims'] = release_claims unless release_claims.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates a reference.
# @param [String] reference_id
# The *referenceId* parameter specifies the YouTube reference ID of the
# reference being updated.
# @param [Google::Apis::YoutubePartnerV1::Reference] reference_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [Boolean] release_claims
# The *releaseClaims* parameter indicates that you want to release all match
# claims associated with this reference. This parameter only works when the
# claim's status is being updated to 'inactive' - you can then set the parameter'
# s value to true to release all match claims produced by this reference.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Reference] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Reference]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_reference(reference_id, reference_object = nil, on_behalf_of_content_owner: nil, release_claims: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/references/{referenceId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.request_object = reference_object
command.response_representation = Google::Apis::YoutubePartnerV1::Reference::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Reference
command.params['referenceId'] = reference_id unless reference_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['releaseClaims'] = release_claims unless release_claims.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of spreadsheet templates for a content owner.
# @param [String] locale
# The *locale* parameter identifies the desired language for templates in the
# API response. The value is a string that contains a BCP-47 language code. The
# default value is en.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::SpreadsheetTemplateListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::SpreadsheetTemplateListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_spreadsheet_templates(locale: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/spreadsheetTemplate', options)
command.response_representation = Google::Apis::YoutubePartnerV1::SpreadsheetTemplateListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::SpreadsheetTemplateListResponse
command.query['locale'] = locale unless locale.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of uploaders for a content owner.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::UploaderListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::UploaderListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_uploaders(on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/uploader', options)
command.response_representation = Google::Apis::YoutubePartnerV1::UploaderListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::UploaderListResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Validate a metadata file.
# @param [Google::Apis::YoutubePartnerV1::ValidateRequest] validate_request_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ValidateResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ValidateResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def validate_validator(validate_request_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/validator', options)
command.request_representation = Google::Apis::YoutubePartnerV1::ValidateRequest::Representation
command.request_object = validate_request_object
command.response_representation = Google::Apis::YoutubePartnerV1::ValidateResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ValidateResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Validate a metadata file asynchronously.
# @param [Google::Apis::YoutubePartnerV1::ValidateAsyncRequest] validate_async_request_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ValidateAsyncResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ValidateAsyncResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def validate_validator_async(validate_async_request_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/validatorAsync', options)
command.request_representation = Google::Apis::YoutubePartnerV1::ValidateAsyncRequest::Representation
command.request_object = validate_async_request_object
command.response_representation = Google::Apis::YoutubePartnerV1::ValidateAsyncResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ValidateAsyncResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Get the asynchronous validation status.
# @param [Google::Apis::YoutubePartnerV1::ValidateStatusRequest] validate_status_request_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::ValidateStatusResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::ValidateStatusResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def validate_validator_async_status(validate_status_request_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/validatorAsyncStatus', options)
command.request_representation = Google::Apis::YoutubePartnerV1::ValidateStatusRequest::Representation
command.request_object = validate_status_request_object
command.response_representation = Google::Apis::YoutubePartnerV1::ValidateStatusResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::ValidateStatusResponse
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves advertising settings for the specified video.
# @param [String] video_id
# The *videoId* parameter specifies the YouTube video ID of the video for which
# you are retrieving advertising settings.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_video_advertising_option(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/videoAdvertisingOptions/{videoId}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
command.params['videoId'] = video_id unless video_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves details about the types of allowed ads for a specified partner- or
# user-uploaded video.
# @param [String] video_id
# The *videoId* parameter specifies the YouTube video ID of the video for which
# you are retrieving advertising options.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_video_advertising_option_enabled_ads(video_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/videoAdvertisingOptions/{videoId}/getEnabledAds', options)
command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOptionGetEnabledAdsResponse
command.params['videoId'] = video_id unless video_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Patches the advertising settings for the specified video.
# @param [String] video_id
# The *videoId* parameter specifies the YouTube video ID of the video for which
# you are updating advertising settings.
# @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'youtube/partner/v1/videoAdvertisingOptions/{videoId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
command.request_object = video_advertising_option_object
command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
command.params['videoId'] = video_id unless video_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Updates the advertising settings for the specified video.
# @param [String] video_id
# The *videoId* parameter specifies the YouTube video ID of the video for which
# you are updating advertising settings.
# @param [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] video_advertising_option_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::VideoAdvertisingOption]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_video_advertising_option(video_id, video_advertising_option_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:put, 'youtube/partner/v1/videoAdvertisingOptions/{videoId}', options)
command.request_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
command.request_object = video_advertising_option_object
command.response_representation = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption::Representation
command.response_class = Google::Apis::YoutubePartnerV1::VideoAdvertisingOption
command.params['videoId'] = video_id unless video_id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Removes a whitelisted channel for a content owner.
# @param [String] id
# The *id* parameter specifies the YouTube channel ID of the channel being
# removed from whitelist.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Empty] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Empty]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'youtube/partner/v1/whitelists/{id}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Empty::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Empty
command.params['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a specific whitelisted channel by ID.
# @param [String] id
# The *id* parameter specifies the YouTube channel ID of the whitelisted channel
# being retrieved.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Whitelist]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_whitelist(id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/whitelists/{id}', options)
command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
command.params['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Whitelist a YouTube channel for your content owner. Whitelisted channels are
# channels that are not owned or managed by you, but you would like to whitelist
# so that no claims from your assets are placed on videos uploaded to these
# channels.
# @param [Google::Apis::YoutubePartnerV1::Whitelist] whitelist_object
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::Whitelist] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::Whitelist]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def insert_whitelist(whitelist_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'youtube/partner/v1/whitelists', options)
command.request_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
command.request_object = whitelist_object
command.response_representation = Google::Apis::YoutubePartnerV1::Whitelist::Representation
command.response_class = Google::Apis::YoutubePartnerV1::Whitelist
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a list of whitelisted channels for a content owner.
# @param [String] id
# The *id* parameter specifies a comma-separated list of YouTube channel IDs
# that identify the whitelisted channels you want to retrieve.
# @param [String] on_behalf_of_content_owner
# The *onBehalfOfContentOwner* parameter identifies the content owner that the
# user is acting on behalf of. This parameter supports users whose accounts are
# associated with multiple content owners.
# @param [String] page_token
# The *pageToken* parameter specifies a token that identifies a particular page
# of results to return. Set this parameter to the value of the nextPageToken
# value from the previous API response to retrieve the next page of results.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::YoutubePartnerV1::WhitelistListResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::YoutubePartnerV1::WhitelistListResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_whitelists(id: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'youtube/partner/v1/whitelists', options)
command.response_representation = Google::Apis::YoutubePartnerV1::WhitelistListResponse::Representation
command.response_class = Google::Apis::YoutubePartnerV1::WhitelistListResponse
command.query['id'] = id unless id.nil?
command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
end
end
end
end
end
|