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 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034
|
# pylint: disable=line-too-long,useless-suppression,too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=useless-super-delegation
import datetime
from typing import Any, Dict, List, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload
from .._utils.model_base import Model as _Model, rest_discriminator, rest_field
from ._enums import (
AnalyzeConversationInputKind,
AnalyzeConversationOperationActionKind,
AnalyzeConversationOperationResultsKind,
AnalyzeConversationResultKind,
ExtraInformationKind,
InputModality,
ProjectKind,
RedactionPolicyKind,
ResolutionKind,
TargetProjectKind,
)
if TYPE_CHECKING:
from .. import models as _models
class ResolutionBase(_Model):
"""The abstract base class for entity resolutions.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
AgeResolution, AreaResolution, BooleanResolution, CurrencyResolution, DateTimeResolution,
InformationResolution, LengthResolution, NumberResolution, NumericRangeResolution,
OrdinalResolution, SpeedResolution, TemperatureResolution, TemporalSpanResolution,
VolumeResolution, WeightResolution
:ivar resolution_kind: The entity resolution object kind. Required. Known values are:
"BooleanResolution", "DateTimeResolution", "NumberResolution", "OrdinalResolution",
"SpeedResolution", "WeightResolution", "LengthResolution", "VolumeResolution",
"AreaResolution", "AgeResolution", "InformationResolution", "TemperatureResolution",
"CurrencyResolution", "NumericRangeResolution", and "TemporalSpanResolution".
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind
"""
__mapping__: Dict[str, _Model] = {}
resolution_kind: str = rest_discriminator(
name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The entity resolution object kind. Required. Known values are: \"BooleanResolution\",
\"DateTimeResolution\", \"NumberResolution\", \"OrdinalResolution\", \"SpeedResolution\",
\"WeightResolution\", \"LengthResolution\", \"VolumeResolution\", \"AreaResolution\",
\"AgeResolution\", \"InformationResolution\", \"TemperatureResolution\",
\"CurrencyResolution\", \"NumericRangeResolution\", and \"TemporalSpanResolution\"."""
@overload
def __init__(
self,
*,
resolution_kind: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AgeResolution(ResolutionBase, discriminator="AgeResolution"):
"""Represents the Age entity resolution model.
:ivar resolution_kind: Represents the Age entity resolution model. Required. Resolution of an
age entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.AGE_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The Age Unit of measurement. Required. Known values are: "Unspecified", "Year",
"Month", "Week", and "Day".
:vartype unit: str or ~azure.ai.language.conversations.models.AgeUnit
"""
resolution_kind: Literal[ResolutionKind.AGE_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the Age entity resolution model. Required. Resolution of an age entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.AgeUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The Age Unit of measurement. Required. Known values are: \"Unspecified\", \"Year\", \"Month\",
\"Week\", and \"Day\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.AgeUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.AGE_RESOLUTION, **kwargs)
class AnalysisConfig(_Model):
"""This is the parameter set of either the Orchestration project itself or one of the target
services.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationConfig, QuestionAnsweringConfig
:ivar target_project_kind: The type of a target service. Required. Known values are: "Luis",
"Conversation", "QuestionAnswering", and "NonLinked".
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.TargetProjectKind
:ivar api_version: The API version to use when call a specific target service.
:vartype api_version: str
"""
__mapping__: Dict[str, _Model] = {}
target_project_kind: str = rest_discriminator(
name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The type of a target service. Required. Known values are: \"Luis\", \"Conversation\",
\"QuestionAnswering\", and \"NonLinked\"."""
api_version: Optional[str] = rest_field(
name="apiVersion", visibility=["read", "create", "update", "delete", "query"]
)
"""The API version to use when call a specific target service."""
@overload
def __init__(
self,
*,
target_project_kind: str,
api_version: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationActionResult(_Model):
"""The base class of a conversation input task result.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationActionResult, ConversationalAITaskResult
:ivar kind: The base class of a conversation input task result. Required. Known values are:
"ConversationResult" and "ConversationalAIResult".
:vartype kind: str or ~azure.ai.language.conversations.models.AnalyzeConversationResultKind
"""
__mapping__: Dict[str, _Model] = {}
kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
"""The base class of a conversation input task result. Required. Known values are:
\"ConversationResult\" and \"ConversationalAIResult\"."""
@overload
def __init__(
self,
*,
kind: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationInput(_Model):
"""The base class of a conversation input task.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationLanguageUnderstandingInput, ConversationalAITask
:ivar kind: The base class of a conversation input task. Required. Known values are:
"Conversation" and "ConversationalAI".
:vartype kind: str or ~azure.ai.language.conversations.models.AnalyzeConversationInputKind
"""
__mapping__: Dict[str, _Model] = {}
kind: str = rest_discriminator(name="kind", visibility=["read", "create", "query"])
"""The base class of a conversation input task. Required. Known values are: \"Conversation\" and
\"ConversationalAI\"."""
@overload
def __init__(
self,
*,
kind: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationOperationAction(_Model):
"""Base class for a long-running conversation input task.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
PiiOperationAction, SummarizationOperationAction, CustomSummarizationOperationAction
:ivar name: task name.
:vartype name: str
:ivar kind: Enumeration of supported analysis tasks on a collection of conversations. Required.
Known values are: "ConversationalSummarizationTask", "ConversationalPIITask", and
"CustomConversationalSummarizationTask".
:vartype kind: str or
~azure.ai.language.conversations.models.AnalyzeConversationOperationActionKind
"""
__mapping__: Dict[str, _Model] = {}
name: Optional[str] = rest_field(name="taskName", visibility=["read", "create", "update", "delete", "query"])
"""task name."""
kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
"""Enumeration of supported analysis tasks on a collection of conversations. Required. Known
values are: \"ConversationalSummarizationTask\", \"ConversationalPIITask\", and
\"CustomConversationalSummarizationTask\"."""
@overload
def __init__(
self,
*,
kind: str,
name: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationOperationInput(_Model):
"""It is a wrap up a Question Answering KB response.
:ivar display_name: Display name for the analysis job.
:vartype display_name: str
:ivar conversation_input: Analysis Input. Required.
:vartype conversation_input:
~azure.ai.language.conversations.models._models.MultiLanguageConversationInput
:ivar actions: Set of tasks to execute on the input conversation. Required.
:vartype actions:
list[~azure.ai.language.conversations.models._models.AnalyzeConversationOperationAction]
:ivar cancel_after: Optional duration in seconds after which the job will be canceled if not
completed.
:vartype cancel_after: float
"""
display_name: Optional[str] = rest_field(
name="displayName", visibility=["read", "create", "update", "delete", "query"]
)
"""Display name for the analysis job."""
conversation_input: "_models._models.MultiLanguageConversationInput" = rest_field(
name="analysisInput", visibility=["read", "create", "query"]
)
"""Analysis Input. Required."""
actions: List["_models._models.AnalyzeConversationOperationAction"] = rest_field(
name="tasks", visibility=["read", "create", "update", "delete", "query"]
)
"""Set of tasks to execute on the input conversation. Required."""
cancel_after: Optional[float] = rest_field(
name="cancelAfter", visibility=["read", "create", "update", "delete", "query"]
)
"""Optional duration in seconds after which the job will be canceled if not completed."""
@overload
def __init__(
self,
*,
conversation_input: "_models._models.MultiLanguageConversationInput",
actions: List["_models._models.AnalyzeConversationOperationAction"],
display_name: Optional[str] = None,
cancel_after: Optional[float] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationOperationResult(_Model):
"""Container for results of all tasks in the conversation job.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationPiiOperationResult, SummarizationOperationResult,
CustomSummarizationOperationResult
:ivar last_update_date_time: The last updated time in UTC for the task. Required.
:vartype last_update_date_time: ~datetime.datetime
:ivar status: The status of the task at the mentioned last update time. Required. Known values
are: "notStarted", "running", "succeeded", "partiallyCompleted", "failed", "cancelled", and
"cancelling".
:vartype status: str or ~azure.ai.language.conversations.models.ConversationActionState
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Known values are:
"conversationalSummarizationResults", "conversationalPIIResults", and
"customConversationalSummarizationResults".
:vartype kind: str or
~azure.ai.language.conversations.models.AnalyzeConversationOperationResultsKind
"""
__mapping__: Dict[str, _Model] = {}
last_update_date_time: datetime.datetime = rest_field(
name="lastUpdateDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""The last updated time in UTC for the task. Required."""
status: Union[str, "_models.ConversationActionState"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The status of the task at the mentioned last update time. Required. Known values are:
\"notStarted\", \"running\", \"succeeded\", \"partiallyCompleted\", \"failed\", \"cancelled\",
and \"cancelling\"."""
name: Optional[str] = rest_field(name="taskName", visibility=["read", "create", "update", "delete", "query"])
"""task name."""
kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
"""discriminator kind. Required. Known values are: \"conversationalSummarizationResults\",
\"conversationalPIIResults\", and \"customConversationalSummarizationResults\"."""
@overload
def __init__(
self,
*,
last_update_date_time: datetime.datetime,
status: Union[str, "_models.ConversationActionState"],
kind: str,
name: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationOperationState(_Model):
"""Contains the status of the submitted job for analyzing a conversation, along with related
statistics.
:ivar display_name: display name.
:vartype display_name: str
:ivar created_date_time: Date and time job created. Required.
:vartype created_date_time: ~datetime.datetime
:ivar expiration_date_time: Date and time job expires.
:vartype expiration_date_time: ~datetime.datetime
:ivar job_id: job ID. Required.
:vartype job_id: str
:ivar last_updated_date_time: last updated date and time. Required.
:vartype last_updated_date_time: ~datetime.datetime
:ivar status: status. Required. Known values are: "notStarted", "running", "succeeded",
"partiallyCompleted", "failed", "cancelled", and "cancelling".
:vartype status: str or ~azure.ai.language.conversations.models.ConversationActionState
:ivar errors: errors.
:vartype errors: list[~azure.ai.language.conversations.models.ConversationError]
:ivar next_link: next link.
:vartype next_link: str
:ivar actions: Contains the state for the tasks that are being executed as part of the
submitted job for analyzing a conversation. Required.
:vartype actions: ~azure.ai.language.conversations.models.ConversationActions
:ivar statistics: Contains the statistics for the submitted job.
:vartype statistics: ~azure.ai.language.conversations.models.ConversationRequestStatistics
"""
display_name: Optional[str] = rest_field(
name="displayName", visibility=["read", "create", "update", "delete", "query"]
)
"""display name."""
created_date_time: datetime.datetime = rest_field(
name="createdDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""Date and time job created. Required."""
expiration_date_time: Optional[datetime.datetime] = rest_field(
name="expirationDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""Date and time job expires."""
job_id: str = rest_field(name="jobId", visibility=["read"])
"""job ID. Required."""
last_updated_date_time: datetime.datetime = rest_field(
name="lastUpdatedDateTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""last updated date and time. Required."""
status: Union[str, "_models.ConversationActionState"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""status. Required. Known values are: \"notStarted\", \"running\", \"succeeded\",
\"partiallyCompleted\", \"failed\", \"cancelled\", and \"cancelling\"."""
errors: Optional[List["_models.ConversationError"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""errors."""
next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"])
"""next link."""
actions: "_models.ConversationActions" = rest_field(
name="tasks", visibility=["read", "create", "update", "delete", "query"]
)
"""Contains the state for the tasks that are being executed as part of the submitted job for
analyzing a conversation. Required."""
statistics: Optional["_models.ConversationRequestStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Contains the statistics for the submitted job."""
@overload
def __init__(
self,
*,
created_date_time: datetime.datetime,
last_updated_date_time: datetime.datetime,
status: Union[str, "_models.ConversationActionState"],
actions: "_models.ConversationActions",
display_name: Optional[str] = None,
expiration_date_time: Optional[datetime.datetime] = None,
errors: Optional[List["_models.ConversationError"]] = None,
next_link: Optional[str] = None,
statistics: Optional["_models.ConversationRequestStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnalyzeConversationResult(_Model):
"""Represents a conversation analysis response.
:ivar query: The conversation utterance given by the caller. Required.
:vartype query: str
:ivar detected_language: The system detected language for the query in BCP 47 language
representation..
:vartype detected_language: str
:ivar prediction: The prediction result of a conversation project. Required.
:vartype prediction: ~azure.ai.language.conversations.models.PredictionBase
"""
query: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The conversation utterance given by the caller. Required."""
detected_language: Optional[str] = rest_field(
name="detectedLanguage", visibility=["read", "create", "update", "delete", "query"]
)
"""The system detected language for the query in BCP 47 language representation.."""
prediction: "_models.PredictionBase" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The prediction result of a conversation project. Required."""
@overload
def __init__(
self,
*,
query: str,
prediction: "_models.PredictionBase",
detected_language: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnswerSpan(_Model):
"""Answer span object of QnA.
:ivar text: Predicted text of answer span.
:vartype text: str
:ivar confidence_score: Predicted score of answer span, value ranges from 0 to 1.
:vartype confidence_score: float
:ivar offset: The answer span offset from the start of answer.
:vartype offset: int
:ivar length: The length of the answer span.
:vartype length: int
"""
text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Predicted text of answer span."""
confidence_score: Optional[float] = rest_field(
name="confidenceScore", visibility=["read", "create", "update", "delete", "query"]
)
"""Predicted score of answer span, value ranges from 0 to 1."""
offset: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The answer span offset from the start of answer."""
length: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The length of the answer span."""
@overload
def __init__(
self,
*,
text: Optional[str] = None,
confidence_score: Optional[float] = None,
offset: Optional[int] = None,
length: Optional[int] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AnswersResult(_Model):
"""Represents List of Question Answers.
:ivar answers: Represents Answer Result list.
:vartype answers: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswer]
"""
answers: Optional[List["_models.KnowledgeBaseAnswer"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Represents Answer Result list."""
@overload
def __init__(
self,
*,
answers: Optional[List["_models.KnowledgeBaseAnswer"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class AreaResolution(ResolutionBase, discriminator="AreaResolution"):
"""Represents the area entity resolution model.
:ivar resolution_kind: Represents the area entity resolution model. Required. Resolution of an
area entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.AREA_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The area Unit of measurement. Required. Known values are: "Unspecified",
"SquareKilometer", "SquareHectometer", "SquareDecameter", "SquareDecimeter", "SquareMeter",
"SquareCentimeter", "SquareMillimeter", "SquareInch", "SquareFoot", "SquareMile", "SquareYard",
and "Acre".
:vartype unit: str or ~azure.ai.language.conversations.models.AreaUnit
"""
resolution_kind: Literal[ResolutionKind.AREA_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the area entity resolution model. Required. Resolution of an area entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.AreaUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The area Unit of measurement. Required. Known values are: \"Unspecified\", \"SquareKilometer\",
\"SquareHectometer\", \"SquareDecameter\", \"SquareDecimeter\", \"SquareMeter\",
\"SquareCentimeter\", \"SquareMillimeter\", \"SquareInch\", \"SquareFoot\", \"SquareMile\",
\"SquareYard\", and \"Acre\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.AreaUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.AREA_RESOLUTION, **kwargs)
class AudioTiming(_Model):
"""Audio timing information.
:ivar offset: Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds.
:vartype offset: int
:ivar duration: Duration of word articulation, in ticks. 1 tick = 100 nanoseconds.
:vartype duration: int
"""
offset: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds."""
duration: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Duration of word articulation, in ticks. 1 tick = 100 nanoseconds."""
@overload
def __init__(
self,
*,
offset: Optional[int] = None,
duration: Optional[int] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class BaseRedactionPolicy(_Model):
"""The abstract base class for RedactionPolicy.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
CharacterMaskPolicyType, EntityMaskTypePolicyType, NoMaskPolicyType
:ivar policy_kind: The entity RedactionPolicy object kind. Required. Known values are:
"noMask", "characterMask", and "entityMask".
:vartype policy_kind: str or ~azure.ai.language.conversations.models.RedactionPolicyKind
"""
__mapping__: Dict[str, _Model] = {}
policy_kind: str = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"])
"""The entity RedactionPolicy object kind. Required. Known values are: \"noMask\",
\"characterMask\", and \"entityMask\"."""
@overload
def __init__(
self,
*,
policy_kind: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class BooleanResolution(ResolutionBase, discriminator="BooleanResolution"):
"""A resolution for boolean expressions.
:ivar resolution_kind: A resolution for boolean expressions. Required. Resolution of a boolean
entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.BOOLEAN_RESOLUTION
:ivar value: A resolution for boolean expressions. Required.
:vartype value: bool
"""
resolution_kind: Literal[ResolutionKind.BOOLEAN_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""A resolution for boolean expressions. Required. Resolution of a boolean entity"""
value: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""A resolution for boolean expressions. Required."""
@overload
def __init__(
self,
*,
value: bool,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.BOOLEAN_RESOLUTION, **kwargs)
class CharacterMaskPolicyType(BaseRedactionPolicy, discriminator="characterMask"):
"""Represents the policy of masking with a redaction character.
:ivar policy_kind: The entity RedactionPolicy object kind. Required. Mask detected entities
with redaction character
:vartype policy_kind: str or ~azure.ai.language.conversations.models.CHARACTER_MASK
:ivar redaction_character: Optional parameter to use a Custom Character to be used for
redaction in PII responses. Default character will be * as before. We allow specific ascii
characters for redaction. Known values are: "!", "#", "$", "%", "&", "*", "+", "-", "=", "?",
"@", "^", "_", and "~".
:vartype redaction_character: str or ~azure.ai.language.conversations.models.RedactionCharacter
"""
policy_kind: Literal[RedactionPolicyKind.CHARACTER_MASK] = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The entity RedactionPolicy object kind. Required. Mask detected entities with redaction
character"""
redaction_character: Optional[Union[str, "_models._enums.RedactionCharacter"]] = rest_field(
name="redactionCharacter", visibility=["read", "create", "update", "delete", "query"]
)
"""Optional parameter to use a Custom Character to be used for redaction in PII responses. Default
character will be * as before. We allow specific ascii characters for redaction. Known values
are: \"!\", \"#\", \"$\", \"%\", \"&\", \"*\", \"+\", \"-\", \"=\", \"?\", \"@\", \"^\", \"_\",
and \"~\"."""
@overload
def __init__(
self,
*,
redaction_character: Optional[Union[str, "_models._enums.RedactionCharacter"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, policy_kind=RedactionPolicyKind.CHARACTER_MASK, **kwargs)
class ConversationActionContent(_Model):
"""Input parameters necessary for a Conversation task.
:ivar project_name: The name of the project to use. Required.
:vartype project_name: str
:ivar deployment_name: The name of the deployment to use. Required.
:vartype deployment_name: str
:ivar verbose: If true, the service will return more detailed information in the response.
:vartype verbose: bool
:ivar is_logging_enabled: If true, the service will keep the query for further review.
:vartype is_logging_enabled: bool
:ivar string_index_type: Specifies the method used to interpret string offsets. Defaults to
Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see
`https://aka.ms/text-analytics-offsets <https://aka.ms/text-analytics-offsets>`_. Known values
are: "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit".
:vartype string_index_type: str or ~azure.ai.language.conversations.models.StringIndexType
:ivar direct_target: The name of a target project to forward the request to.
:vartype direct_target: str
:ivar target_project_parameters: A dictionary representing the parameters for each target
project.
:vartype target_project_parameters: dict[str,
~azure.ai.language.conversations.models.AnalysisConfig]
"""
project_name: str = rest_field(name="projectName", visibility=["read", "create", "update", "delete", "query"])
"""The name of the project to use. Required."""
deployment_name: str = rest_field(name="deploymentName", visibility=["read", "create", "update", "delete", "query"])
"""The name of the deployment to use. Required."""
verbose: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""If true, the service will return more detailed information in the response."""
is_logging_enabled: Optional[bool] = rest_field(
name="isLoggingEnabled", visibility=["read", "create", "update", "delete", "query"]
)
"""If true, the service will keep the query for further review."""
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = rest_field(
name="stringIndexType", visibility=["read", "create", "update", "delete", "query"]
)
"""Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes)
according to Unicode v8.0.0. For additional information see
`https://aka.ms/text-analytics-offsets <https://aka.ms/text-analytics-offsets>`_. Known values
are: \"TextElements_v8\", \"UnicodeCodePoint\", and \"Utf16CodeUnit\"."""
direct_target: Optional[str] = rest_field(
name="directTarget", visibility=["read", "create", "update", "delete", "query"]
)
"""The name of a target project to forward the request to."""
target_project_parameters: Optional[Dict[str, "_models.AnalysisConfig"]] = rest_field(
name="targetProjectParameters", visibility=["read", "create", "update", "delete", "query"]
)
"""A dictionary representing the parameters for each target project."""
@overload
def __init__(
self,
*,
project_name: str,
deployment_name: str,
verbose: Optional[bool] = None,
is_logging_enabled: Optional[bool] = None,
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
direct_target: Optional[str] = None,
target_project_parameters: Optional[Dict[str, "_models.AnalysisConfig"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationActionResult(AnalyzeConversationActionResult, discriminator="ConversationResult"):
"""The results of a Conversation task.
:ivar kind: The results of a Conversation task. Required. Conversation result task kind
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATION_RESULT
:ivar result: Represents a conversation analysis response. Required.
:vartype result: ~azure.ai.language.conversations.models.AnalyzeConversationResult
"""
kind: Literal[AnalyzeConversationResultKind.CONVERSATION_RESULT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The results of a Conversation task. Required. Conversation result task kind"""
result: "_models.AnalyzeConversationResult" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Represents a conversation analysis response. Required."""
@overload
def __init__(
self,
*,
result: "_models.AnalyzeConversationResult",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationResultKind.CONVERSATION_RESULT, **kwargs)
class ConversationActions(_Model):
"""Contains the state for the tasks that are being executed as part of the submitted job for
analyzing a conversation.
:ivar completed: Count of tasks that finished successfully. Required.
:vartype completed: int
:ivar failed: Count of tasks that failed. Required.
:vartype failed: int
:ivar in_progress: Count of tasks that are currently in progress. Required.
:vartype in_progress: int
:ivar total: Total count of tasks submitted as part of the job. Required.
:vartype total: int
:ivar task_results: List of results from tasks (if available).
:vartype task_results:
list[~azure.ai.language.conversations.models.AnalyzeConversationOperationResult]
"""
completed: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Count of tasks that finished successfully. Required."""
failed: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Count of tasks that failed. Required."""
in_progress: int = rest_field(name="inProgress", visibility=["read", "create", "update", "delete", "query"])
"""Count of tasks that are currently in progress. Required."""
total: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Total count of tasks submitted as part of the job. Required."""
task_results: Optional[List["_models.AnalyzeConversationOperationResult"]] = rest_field(
name="items", visibility=["read", "create", "update", "delete", "query"]
)
"""List of results from tasks (if available)."""
@overload
def __init__(
self,
*,
completed: int,
failed: int,
in_progress: int,
total: int,
task_results: Optional[List["_models.AnalyzeConversationOperationResult"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIActionContent(_Model):
"""Input parameters base for a Conversation task.
:ivar project_name: The name of the project to use. Required.
:vartype project_name: str
:ivar deployment_name: The name of the deployment to use. Required.
:vartype deployment_name: str
:ivar string_index_type: Specifies the method used to interpret string offsets. Defaults to
Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see
`https://aka.ms/text-analytics-offsets <https://aka.ms/text-analytics-offsets>`_. Known values
are: "TextElements_v8", "UnicodeCodePoint", and "Utf16CodeUnit".
:vartype string_index_type: str or ~azure.ai.language.conversations.models.StringIndexType
"""
project_name: str = rest_field(name="projectName", visibility=["read", "create", "update", "delete", "query"])
"""The name of the project to use. Required."""
deployment_name: str = rest_field(name="deploymentName", visibility=["read", "create", "update", "delete", "query"])
"""The name of the deployment to use. Required."""
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = rest_field(
name="stringIndexType", visibility=["read", "create", "update", "delete", "query"]
)
"""Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes)
according to Unicode v8.0.0. For additional information see
`https://aka.ms/text-analytics-offsets <https://aka.ms/text-analytics-offsets>`_. Known values
are: \"TextElements_v8\", \"UnicodeCodePoint\", and \"Utf16CodeUnit\"."""
@overload
def __init__(
self,
*,
project_name: str,
deployment_name: str,
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIAnalysis(_Model):
"""Multiple multi-turn conversations analyzed.
:ivar id: The ID of the conversation. Required.
:vartype id: str
:ivar intents: The intent classification results for this conversation. Required.
:vartype intents: list[~azure.ai.language.conversations.models.ConversationalAIIntent]
:ivar entities: Global entities that are matched but not associated with any specific intent.
:vartype entities: list[~azure.ai.language.conversations.models.ConversationalAIEntity]
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The ID of the conversation. Required."""
intents: List["_models.ConversationalAIIntent"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The intent classification results for this conversation. Required."""
entities: Optional[List["_models.ConversationalAIEntity"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Global entities that are matched but not associated with any specific intent."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
intents: List["_models.ConversationalAIIntent"],
entities: Optional[List["_models.ConversationalAIEntity"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIAnalysisInput(_Model):
"""The input ConversationItem and its optional parameters.
:ivar conversations: List of multiple conversations. Required.
:vartype conversations: list[~azure.ai.language.conversations.models.TextConversation]
"""
conversations: List["_models.TextConversation"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""List of multiple conversations. Required."""
@overload
def __init__(
self,
*,
conversations: List["_models.TextConversation"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIEntity(_Model):
"""The entity associated with this intent.
:ivar name: The entity name or category. Required.
:vartype name: str
:ivar text: The detected text of the entity. Required.
:vartype text: str
:ivar confidence_score: The confidence score of the entity detection (0.0 to 1.0). Required.
:vartype confidence_score: float
:ivar offset: The starting index of the entity in the query. Required.
:vartype offset: int
:ivar length: The length of the detected entity text. Required.
:vartype length: int
:ivar conversation_item_id: The ID of the conversation item where the entity appears. Required.
:vartype conversation_item_id: str
:ivar conversation_item_index: The index of the conversation item where the entity appears.
:vartype conversation_item_index: int
:ivar resolutions: Entity resolution details, if available.
:vartype resolutions: list[~azure.ai.language.conversations.models.ResolutionBase]
:ivar extra_information: Additional entity metadata.
:vartype extra_information:
list[~azure.ai.language.conversations.models.ConversationEntityExtraInformation]
"""
name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The entity name or category. Required."""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The detected text of the entity. Required."""
confidence_score: float = rest_field(
name="confidenceScore", visibility=["read", "create", "update", "delete", "query"]
)
"""The confidence score of the entity detection (0.0 to 1.0). Required."""
offset: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The starting index of the entity in the query. Required."""
length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The length of the detected entity text. Required."""
conversation_item_id: str = rest_field(
name="conversationItemId", visibility=["read", "create", "update", "delete", "query"]
)
"""The ID of the conversation item where the entity appears. Required."""
conversation_item_index: Optional[int] = rest_field(
name="conversationItemIndex", visibility=["read", "create", "update", "delete", "query"]
)
"""The index of the conversation item where the entity appears."""
resolutions: Optional[List["_models.ResolutionBase"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Entity resolution details, if available."""
extra_information: Optional[List["_models.ConversationEntityExtraInformation"]] = rest_field(
name="extraInformation", visibility=["read", "create", "update", "delete", "query"]
)
"""Additional entity metadata."""
@overload
def __init__(
self,
*,
name: str,
text: str,
confidence_score: float,
offset: int,
length: int,
conversation_item_id: str,
conversation_item_index: Optional[int] = None,
resolutions: Optional[List["_models.ResolutionBase"]] = None,
extra_information: Optional[List["_models.ConversationEntityExtraInformation"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIIntent(_Model):
"""The intent classification result for this conversation.
:ivar name: The name of the detected intent. Required.
:vartype name: str
:ivar type: The type of intent, either "action" or "question". Required.
:vartype type: str
:ivar conversation_item_ranges: The ranges of conversation items where this intent was
identified. Required.
:vartype conversation_item_ranges:
list[~azure.ai.language.conversations.models.ConversationItemRange]
:ivar entities: The entities associated with this intent. Required.
:vartype entities: list[~azure.ai.language.conversations.models.ConversationalAIEntity]
"""
name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The name of the detected intent. Required."""
type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The type of intent, either \"action\" or \"question\". Required."""
conversation_item_ranges: List["_models.ConversationItemRange"] = rest_field(
name="conversationItemRanges", visibility=["read", "create", "update", "delete", "query"]
)
"""The ranges of conversation items where this intent was identified. Required."""
entities: List["_models.ConversationalAIEntity"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The entities associated with this intent. Required."""
@overload
def __init__(
self,
*,
name: str,
type: str,
conversation_item_ranges: List["_models.ConversationItemRange"],
entities: List["_models.ConversationalAIEntity"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAIResult(_Model):
"""Represents the conversational analysis response.
:ivar conversations: Multiple multi-turn conversations analyzed. Required.
:vartype conversations: list[~azure.ai.language.conversations.models.ConversationalAIAnalysis]
:ivar warnings: Any warnings encountered during processing.
:vartype warnings: list[str]
"""
conversations: List["_models.ConversationalAIAnalysis"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Multiple multi-turn conversations analyzed. Required."""
warnings: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Any warnings encountered during processing."""
@overload
def __init__(
self,
*,
conversations: List["_models.ConversationalAIAnalysis"],
warnings: Optional[List[str]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationalAITask(AnalyzeConversationInput, discriminator="ConversationalAI"):
"""A conversational AI task.
:ivar kind: Task kind. Required. Conversation task kind
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATIONAL_AI
:ivar analysis_input: The input ConversationItem and its optional parameters. Required.
:vartype analysis_input: ~azure.ai.language.conversations.models.ConversationalAIAnalysisInput
:ivar parameters: Input parameters necessary for a Conversation language understanding task.
Required.
:vartype parameters: ~azure.ai.language.conversations.models.ConversationalAIActionContent
"""
kind: Literal[AnalyzeConversationInputKind.CONVERSATIONAL_AI] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Task kind. Required. Conversation task kind"""
analysis_input: "_models.ConversationalAIAnalysisInput" = rest_field(
name="analysisInput", visibility=["read", "create", "update", "delete", "query"]
)
"""The input ConversationItem and its optional parameters. Required."""
parameters: "_models.ConversationalAIActionContent" = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Input parameters necessary for a Conversation language understanding task. Required."""
@overload
def __init__(
self,
*,
analysis_input: "_models.ConversationalAIAnalysisInput",
parameters: "_models.ConversationalAIActionContent",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationInputKind.CONVERSATIONAL_AI, **kwargs)
class ConversationalAITaskResult(AnalyzeConversationActionResult, discriminator="ConversationalAIResult"):
"""The results of a ConversationalAI task.
:ivar kind: The results of a Conversational AI task. Required. Conversation result task kind
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATIONAL_AI_RESULT
:ivar result: Represents the conversational analysis response. Required.
:vartype result: ~azure.ai.language.conversations.models.ConversationalAIResult
"""
kind: Literal[AnalyzeConversationResultKind.CONVERSATIONAL_AI_RESULT] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The results of a Conversational AI task. Required. Conversation result task kind"""
result: "_models.ConversationalAIResult" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Represents the conversational analysis response. Required."""
@overload
def __init__(
self,
*,
result: "_models.ConversationalAIResult",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationResultKind.CONVERSATIONAL_AI_RESULT, **kwargs)
class ConversationalPiiResult(_Model):
"""Conversation PII result item.
:ivar id: Unique, non-empty conversation identifier. Required.
:vartype id: str
:ivar warnings: Warnings encountered in processing the document. Required.
:vartype warnings: list[~azure.ai.language.conversations.models.InputWarning]
:ivar statistics: If showStats=true was specified in the request this field will contain
information about the conversation payload.
:vartype statistics: ~azure.ai.language.conversations.models.ConversationStatistics
:ivar conversation_items: List of conversationItems. Required.
:vartype conversation_items:
list[~azure.ai.language.conversations.models.ConversationPiiItemResult]
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Unique, non-empty conversation identifier. Required."""
warnings: List["_models.InputWarning"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Warnings encountered in processing the document. Required."""
statistics: Optional["_models.ConversationStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""If showStats=true was specified in the request this field will contain information about the
conversation payload."""
conversation_items: List["_models.ConversationPiiItemResult"] = rest_field(
name="conversationItems", visibility=["read", "create", "update", "delete", "query"]
)
"""List of conversationItems. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
warnings: List["_models.InputWarning"],
conversation_items: List["_models.ConversationPiiItemResult"],
statistics: Optional["_models.ConversationStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationAnalysisInput(_Model):
"""The input ConversationItem and its optional parameters.
:ivar conversation_item: The abstract base for a user input formatted conversation (e.g., Text,
Transcript). Required.
:vartype conversation_item: ~azure.ai.language.conversations.models.TextConversationItem
"""
conversation_item: "_models.TextConversationItem" = rest_field(
name="conversationItem", visibility=["read", "create", "update", "delete", "query"]
)
"""The abstract base for a user input formatted conversation (e.g., Text, Transcript). Required."""
@overload
def __init__(
self,
*,
conversation_item: "_models.TextConversationItem",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationCallingConfig(_Model):
"""The option to set to call a Conversation project.
:ivar language: The language of the query in BCP 47 language representation.
:vartype language: str
:ivar verbose: If true, the service will return more detailed information.
:vartype verbose: bool
:ivar is_logging_enabled: If true, the query will be saved for customers to further review in
authoring, to improve the model quality.
:vartype is_logging_enabled: bool
"""
language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The language of the query in BCP 47 language representation."""
verbose: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""If true, the service will return more detailed information."""
is_logging_enabled: Optional[bool] = rest_field(
name="isLoggingEnabled", visibility=["read", "create", "update", "delete", "query"]
)
"""If true, the query will be saved for customers to further review in authoring, to improve the
model quality."""
@overload
def __init__(
self,
*,
language: Optional[str] = None,
verbose: Optional[bool] = None,
is_logging_enabled: Optional[bool] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationConfig(AnalysisConfig, discriminator="Conversation"):
"""This is a set of request parameters for Customized Conversation projects.
:ivar api_version: The API version to use when call a specific target service.
:vartype api_version: str
:ivar target_project_kind: This is a set of request parameters for Customized Conversation
projects. Required. Conversation target service type
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.CONVERSATION
:ivar calling_options: The option to set to call a Conversation project.
:vartype calling_options: ~azure.ai.language.conversations.models.ConversationCallingConfig
"""
target_project_kind: Literal[TargetProjectKind.CONVERSATION] = rest_discriminator(name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""This is a set of request parameters for Customized Conversation projects. Required.
Conversation target service type"""
calling_options: Optional["_models.ConversationCallingConfig"] = rest_field(
name="callingOptions", visibility=["read", "create", "update", "delete", "query"]
)
"""The option to set to call a Conversation project."""
@overload
def __init__(
self,
*,
api_version: Optional[str] = None,
calling_options: Optional["_models.ConversationCallingConfig"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, target_project_kind=TargetProjectKind.CONVERSATION, **kwargs)
class ConversationEntity(_Model):
"""The entity extraction result of a Conversation project.
:ivar category: The entity category. Required.
:vartype category: str
:ivar text: The predicted entity text. Required.
:vartype text: str
:ivar offset: The starting index of this entity in the query. Required.
:vartype offset: int
:ivar length: The length of the text. Required.
:vartype length: int
:ivar confidence: The entity confidence score. Required.
:vartype confidence: float
:ivar resolutions: The collection of entity resolution objects.
:vartype resolutions: list[~azure.ai.language.conversations.models.ResolutionBase]
:ivar extra_information: The collection of entity extra information objects.
:vartype extra_information:
list[~azure.ai.language.conversations.models.ConversationEntityExtraInformation]
"""
category: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The entity category. Required."""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The predicted entity text. Required."""
offset: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The starting index of this entity in the query. Required."""
length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The length of the text. Required."""
confidence: float = rest_field(name="confidenceScore", visibility=["read", "create", "update", "delete", "query"])
"""The entity confidence score. Required."""
resolutions: Optional[List["_models.ResolutionBase"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The collection of entity resolution objects."""
extra_information: Optional[List["_models.ConversationEntityExtraInformation"]] = rest_field(
name="extraInformation", visibility=["read", "create", "update", "delete", "query"]
)
"""The collection of entity extra information objects."""
@overload
def __init__(
self,
*,
category: str,
text: str,
offset: int,
length: int,
confidence: float,
resolutions: Optional[List["_models.ResolutionBase"]] = None,
extra_information: Optional[List["_models.ConversationEntityExtraInformation"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationEntityExtraInformation(_Model):
"""The abstract base object for entity extra information.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
EntitySubtype, ListKey, RegexKey
:ivar extra_information_kind: The extra information object kind. Required. Known values are:
"EntitySubtype", "ListKey", and "RegexKey".
:vartype extra_information_kind: str or
~azure.ai.language.conversations.models.ExtraInformationKind
"""
__mapping__: Dict[str, _Model] = {}
extra_information_kind: str = rest_discriminator(
name="extraInformationKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The extra information object kind. Required. Known values are: \"EntitySubtype\", \"ListKey\",
and \"RegexKey\"."""
@overload
def __init__(
self,
*,
extra_information_kind: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationError(_Model):
"""The error object.
:ivar code: One of a server-defined set of error codes. Required. Known values are:
"InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound",
"ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound",
"AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling",
"AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable",
"Timeout", "QuotaExceeded", "Conflict", and "Warning".
:vartype code: str or ~azure.ai.language.conversations.models.ConversationErrorCode
:ivar message: A human-readable representation of the error. Required.
:vartype message: str
:ivar target: The target of the error.
:vartype target: str
:ivar details: An array of details about specific errors that led to this reported error.
:vartype details: list[~azure.ai.language.conversations.models.ConversationError]
:ivar innererror: An object containing more specific information than the current object about
the error.
:vartype innererror: ~azure.ai.language.conversations.models.InnerErrorModel
"""
code: Union[str, "_models.ConversationErrorCode"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""One of a server-defined set of error codes. Required. Known values are: \"InvalidRequest\",
\"InvalidArgument\", \"Unauthorized\", \"Forbidden\", \"NotFound\", \"ProjectNotFound\",
\"OperationNotFound\", \"AzureCognitiveSearchNotFound\", \"AzureCognitiveSearchIndexNotFound\",
\"TooManyRequests\", \"AzureCognitiveSearchThrottling\",
\"AzureCognitiveSearchIndexLimitReached\", \"InternalServerError\", \"ServiceUnavailable\",
\"Timeout\", \"QuotaExceeded\", \"Conflict\", and \"Warning\"."""
message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""A human-readable representation of the error. Required."""
target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The target of the error."""
details: Optional[List["_models.ConversationError"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""An array of details about specific errors that led to this reported error."""
innererror: Optional["_models.InnerErrorModel"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""An object containing more specific information than the current object about the error."""
@overload
def __init__(
self,
*,
code: Union[str, "_models.ConversationErrorCode"],
message: str,
target: Optional[str] = None,
details: Optional[List["_models.ConversationError"]] = None,
innererror: Optional["_models.InnerErrorModel"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationInput(_Model):
"""Complete ordered set of utterances (spoken or written) by one or more speakers to be used for
analysis.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
TextConversation, TranscriptConversation
:ivar id: Unique identifier for the conversation. Required.
:vartype id: str
:ivar language: Language of the conversation item in BCP-47 format. Required.
:vartype language: str
:ivar modality: modality. Required. Known values are: "transcript" and "text".
:vartype modality: str or ~azure.ai.language.conversations.models.InputModality
:ivar domain: domain. Known values are: "finance", "healthcare", and "generic".
:vartype domain: str or ~azure.ai.language.conversations.models.ConversationDomain
"""
__mapping__: Dict[str, _Model] = {}
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Unique identifier for the conversation. Required."""
language: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Language of the conversation item in BCP-47 format. Required."""
modality: str = rest_discriminator(name="modality", visibility=["read", "create", "update", "delete", "query"])
"""modality. Required. Known values are: \"transcript\" and \"text\"."""
domain: Optional[Union[str, "_models.ConversationDomain"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""domain. Known values are: \"finance\", \"healthcare\", and \"generic\"."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
language: str,
modality: str,
domain: Optional[Union[str, "_models.ConversationDomain"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationIntent(_Model):
"""The intent classification result of a Conversation project.
:ivar category: A predicted class. Required.
:vartype category: str
:ivar confidence: The confidence score of the class from 0.0 to 1.0. Required.
:vartype confidence: float
"""
category: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""A predicted class. Required."""
confidence: float = rest_field(name="confidenceScore", visibility=["read", "create", "update", "delete", "query"])
"""The confidence score of the class from 0.0 to 1.0. Required."""
@overload
def __init__(
self,
*,
category: str,
confidence: float,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationItemLevelTiming(_Model):
"""Audio timing at the conversation item level.
:ivar offset: Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds.
:vartype offset: int
:ivar duration: Duration of word articulation, in ticks. 1 tick = 100 nanoseconds.
:vartype duration: int
"""
offset: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds."""
duration: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Duration of word articulation, in ticks. 1 tick = 100 nanoseconds."""
@overload
def __init__(
self,
*,
offset: Optional[int] = None,
duration: Optional[int] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationItemRange(_Model):
"""The ranges of conversation items where this intent was identified.
:ivar offset: The starting index of the intent occurrence within the conversation. Required.
:vartype offset: int
:ivar count: The number of continuous conversation items for this intent. Required.
:vartype count: int
"""
offset: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The starting index of the intent occurrence within the conversation. Required."""
count: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The number of continuous conversation items for this intent. Required."""
@overload
def __init__(
self,
*,
offset: int,
count: int,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationLanguageUnderstandingInput(AnalyzeConversationInput, discriminator="Conversation"):
"""The input for a conversation language understanding task.
:ivar kind: Task kind. Required. Conversation task kind
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATION
:ivar conversation_input: The input ConversationItem and its optional parameters. Required.
:vartype conversation_input: ~azure.ai.language.conversations.models.ConversationAnalysisInput
:ivar action_content: Input parameters necessary for a Conversation language understanding
task. Required.
:vartype action_content: ~azure.ai.language.conversations.models.ConversationActionContent
"""
kind: Literal[AnalyzeConversationInputKind.CONVERSATION] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Task kind. Required. Conversation task kind"""
conversation_input: "_models.ConversationAnalysisInput" = rest_field(
name="analysisInput", visibility=["read", "create", "update", "delete", "query"]
)
"""The input ConversationItem and its optional parameters. Required."""
action_content: "_models.ConversationActionContent" = rest_field(
name="parameters", visibility=["read", "create", "update", "delete", "query"]
)
"""Input parameters necessary for a Conversation language understanding task. Required."""
@overload
def __init__(
self,
*,
conversation_input: "_models.ConversationAnalysisInput",
action_content: "_models.ConversationActionContent",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationInputKind.CONVERSATION, **kwargs)
class ConversationPiiActionContent(_Model):
"""Supported parameters for a conversational pii task.
:ivar logging_opt_out: logging opt out.
:vartype logging_opt_out: bool
:ivar model_version: model version.
:vartype model_version: str
:ivar pii_categories: Array of ConversationPIICategories.
:vartype pii_categories: list[str or
~azure.ai.language.conversations.models.ConversationPiiCategories]
:ivar redact_audio_timing: Flag to indicate if response should include audio stream offset and
duration for any detected entities to be redacted. By default, audio timing of redacted
entities are not included.
:vartype redact_audio_timing: bool
:ivar redaction_source: For transcript conversations, this parameter provides information
regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity
detection. The details of the entities detected - like the offset, length and the text itself -
will correspond to the text type selected here. Known values are: "lexical", "itn",
"maskedItn", and "text".
:vartype redaction_source: str or ~azure.ai.language.conversations.models.TranscriptContentType
:ivar redaction_character: Optional parameter to use a Custom Character to be used for
redaction in PII responses. Default character will be * as before. We allow specific ascii
characters for redaction. Known values are: "!", "#", "$", "%", "&", "*", "+", "-", "=", "?",
"@", "^", "_", and "~".
:vartype redaction_character: str or ~azure.ai.language.conversations.models.RedactionCharacter
:ivar exclude_pii_categories: List of categories that need to be excluded instead of included.
:vartype exclude_pii_categories: list[str or
~azure.ai.language.conversations.models.ConversationPiiCategoryExclusions]
:ivar redaction_policy: Optional parameter determine what type of redaction to use.
:vartype redaction_policy: ~azure.ai.language.conversations.models._models.BaseRedactionPolicy
"""
logging_opt_out: Optional[bool] = rest_field(
name="loggingOptOut", visibility=["read", "create", "update", "delete", "query"]
)
"""logging opt out."""
model_version: Optional[str] = rest_field(
name="modelVersion", visibility=["read", "create", "update", "delete", "query"]
)
"""model version."""
pii_categories: Optional[List[Union[str, "_models._enums.ConversationPiiCategories"]]] = rest_field(
name="piiCategories", visibility=["read", "create", "update", "delete", "query"]
)
"""Array of ConversationPIICategories."""
redact_audio_timing: Optional[bool] = rest_field(
name="redactAudioTiming", visibility=["read", "create", "update", "delete", "query"]
)
"""Flag to indicate if response should include audio stream offset and duration for any detected
entities to be redacted. By default, audio timing of redacted entities are not included."""
redaction_source: Optional[Union[str, "_models._enums.TranscriptContentType"]] = rest_field(
name="redactionSource", visibility=["read", "create", "update", "delete", "query"]
)
"""For transcript conversations, this parameter provides information regarding which content type
(ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the
entities detected - like the offset, length and the text itself - will correspond to the text
type selected here. Known values are: \"lexical\", \"itn\", \"maskedItn\", and \"text\"."""
redaction_character: Optional[Union[str, "_models._enums.RedactionCharacter"]] = rest_field(
name="redactionCharacter", visibility=["read", "create", "update", "delete", "query"]
)
"""Optional parameter to use a Custom Character to be used for redaction in PII responses. Default
character will be * as before. We allow specific ascii characters for redaction. Known values
are: \"!\", \"#\", \"$\", \"%\", \"&\", \"*\", \"+\", \"-\", \"=\", \"?\", \"@\", \"^\", \"_\",
and \"~\"."""
exclude_pii_categories: Optional[List[Union[str, "_models._enums.ConversationPiiCategoryExclusions"]]] = rest_field(
name="excludePiiCategories", visibility=["read", "create", "update", "delete", "query"]
)
"""List of categories that need to be excluded instead of included."""
redaction_policy: Optional["_models._models.BaseRedactionPolicy"] = rest_field(
name="redactionPolicy", visibility=["read", "create", "update", "delete", "query"]
)
"""Optional parameter determine what type of redaction to use."""
@overload
def __init__(
self,
*,
logging_opt_out: Optional[bool] = None,
model_version: Optional[str] = None,
pii_categories: Optional[List[Union[str, "_models._enums.ConversationPiiCategories"]]] = None,
redact_audio_timing: Optional[bool] = None,
redaction_source: Optional[Union[str, "_models._enums.TranscriptContentType"]] = None,
redaction_character: Optional[Union[str, "_models._enums.RedactionCharacter"]] = None,
exclude_pii_categories: Optional[List[Union[str, "_models._enums.ConversationPiiCategoryExclusions"]]] = None,
redaction_policy: Optional["_models._models.BaseRedactionPolicy"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationPiiItemResult(_Model):
"""The result from PII detection and redaction operation for each conversation.
:ivar id: Id of the result. Required.
:vartype id: str
:ivar redacted_content: Transcript content response that the service generates, with all
necessary personally identifiable information redacted. Required.
:vartype redacted_content: ~azure.ai.language.conversations.models.RedactedTranscriptContent
:ivar entities: Array of Entities. Required.
:vartype entities: list[~azure.ai.language.conversations.models.NamedEntity]
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Id of the result. Required."""
redacted_content: "_models.RedactedTranscriptContent" = rest_field(
name="redactedContent", visibility=["read", "create", "update", "delete", "query"]
)
"""Transcript content response that the service generates, with all necessary personally
identifiable information redacted. Required."""
entities: List["_models.NamedEntity"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Array of Entities. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
redacted_content: "_models.RedactedTranscriptContent",
entities: List["_models.NamedEntity"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationPiiOperationResult(AnalyzeConversationOperationResult, discriminator="conversationalPIIResults"):
"""Result from the personally identifiable information detection and redaction operation performed
on a list of conversations.
:ivar last_update_date_time: The last updated time in UTC for the task. Required.
:vartype last_update_date_time: ~datetime.datetime
:ivar status: The status of the task at the mentioned last update time. Required. Known values
are: "notStarted", "running", "succeeded", "partiallyCompleted", "failed", "cancelled", and
"cancelling".
:vartype status: str or ~azure.ai.language.conversations.models.ConversationActionState
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Conversational PII Results
:vartype kind: str or ~azure.ai.language.conversations.models.PII_OPERATION_RESULTS
:ivar results: results. Required.
:vartype results: ~azure.ai.language.conversations.models.ConversationPiiResults
"""
kind: Literal[AnalyzeConversationOperationResultsKind.PII_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Conversational PII Results"""
results: "_models.ConversationPiiResults" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""results. Required."""
@overload
def __init__(
self,
*,
last_update_date_time: datetime.datetime,
status: Union[str, "_models.ConversationActionState"],
results: "_models.ConversationPiiResults",
name: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationOperationResultsKind.PII_OPERATION_RESULTS, **kwargs)
class ConversationPiiResults(_Model):
"""The result from PII detection and redaction operation for each conversation.
:ivar errors: Errors by document id. Required.
:vartype errors: list[~azure.ai.language.conversations.models.DocumentError]
:ivar statistics: statistics.
:vartype statistics: ~azure.ai.language.conversations.models.RequestStatistics
:ivar model_version: This field indicates which model is used for scoring. Required.
:vartype model_version: str
:ivar conversations: array of conversations. Required.
:vartype conversations: list[~azure.ai.language.conversations.models.ConversationalPiiResult]
"""
errors: List["_models.DocumentError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Errors by document id. Required."""
statistics: Optional["_models.RequestStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""statistics."""
model_version: str = rest_field(name="modelVersion", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates which model is used for scoring. Required."""
conversations: List["_models.ConversationalPiiResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""array of conversations. Required."""
@overload
def __init__(
self,
*,
errors: List["_models.DocumentError"],
model_version: str,
conversations: List["_models.ConversationalPiiResult"],
statistics: Optional["_models.RequestStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class PredictionBase(_Model):
"""This is the base class of prediction.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationPrediction, OrchestrationPrediction
:ivar project_kind: The type of the project. Required. Known values are: "Conversation",
"Orchestration", and "ConversationalAI".
:vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind
:ivar top_intent: The intent with the highest score.
:vartype top_intent: str
"""
__mapping__: Dict[str, _Model] = {}
project_kind: str = rest_discriminator(
name="projectKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The type of the project. Required. Known values are: \"Conversation\", \"Orchestration\", and
\"ConversationalAI\"."""
top_intent: Optional[str] = rest_field(name="topIntent", visibility=["read", "create", "update", "delete", "query"])
"""The intent with the highest score."""
@overload
def __init__(
self,
*,
project_kind: str,
top_intent: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationPrediction(PredictionBase, discriminator="Conversation"):
"""Represents the prediction section of a Conversation project.
:ivar top_intent: The intent with the highest score.
:vartype top_intent: str
:ivar project_kind: Represents the prediction section of a Conversation project. Required.
Conversation type
:vartype project_kind: str or ~azure.ai.language.conversations.models.CONVERSATION
:ivar intents: The intent classification results. Required.
:vartype intents: list[~azure.ai.language.conversations.models.ConversationIntent]
:ivar entities: The entity extraction results. Required.
:vartype entities: list[~azure.ai.language.conversations.models.ConversationEntity]
"""
project_kind: Literal[ProjectKind.CONVERSATION] = rest_discriminator(name="projectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the prediction section of a Conversation project. Required. Conversation type"""
intents: List["_models.ConversationIntent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The intent classification results. Required."""
entities: List["_models.ConversationEntity"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The entity extraction results. Required."""
@overload
def __init__(
self,
*,
intents: List["_models.ConversationIntent"],
entities: List["_models.ConversationEntity"],
top_intent: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, project_kind=ProjectKind.CONVERSATION, **kwargs)
class ConversationRequestStatistics(_Model):
"""if showStats=true was specified in the request, this field contains information about the
request payload.
:ivar documents_count: Number of documents submitted in the request. Required.
:vartype documents_count: int
:ivar valid_documents_count: Number of valid documents. This excludes empty, over-size limit or
non-supported languages documents. Required.
:vartype valid_documents_count: int
:ivar erroneous_documents_count: Number of invalid documents. This includes empty, over-size
limit or non-supported languages documents. Required.
:vartype erroneous_documents_count: int
:ivar transactions_count: Number of transactions for the request. Required.
:vartype transactions_count: int
:ivar conversations_count: Number of conversations submitted in the request. Required.
:vartype conversations_count: int
:ivar valid_conversations_count: Number of conversation documents. This excludes documents that
are empty, over the size limit, or in unsupported languages. Required.
:vartype valid_conversations_count: int
:ivar erroneous_conversations_count: Number of invalid documents. This includes documents that
are empty, over the size limit, or in unsupported languages. Required.
:vartype erroneous_conversations_count: int
"""
documents_count: int = rest_field(name="documentsCount", visibility=["read", "create", "update", "delete", "query"])
"""Number of documents submitted in the request. Required."""
valid_documents_count: int = rest_field(
name="validDocumentsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of valid documents. This excludes empty, over-size limit or non-supported languages
documents. Required."""
erroneous_documents_count: int = rest_field(
name="erroneousDocumentsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of invalid documents. This includes empty, over-size limit or non-supported languages
documents. Required."""
transactions_count: int = rest_field(
name="transactionsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of transactions for the request. Required."""
conversations_count: int = rest_field(
name="conversationsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of conversations submitted in the request. Required."""
valid_conversations_count: int = rest_field(
name="validConversationsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of conversation documents. This excludes documents that are empty, over the size limit,
or in unsupported languages. Required."""
erroneous_conversations_count: int = rest_field(
name="erroneousConversationsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of invalid documents. This includes documents that are empty, over the size limit, or in
unsupported languages. Required."""
@overload
def __init__(
self,
*,
documents_count: int,
valid_documents_count: int,
erroneous_documents_count: int,
transactions_count: int,
conversations_count: int,
valid_conversations_count: int,
erroneous_conversations_count: int,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationResult(_Model):
"""The response returned by a Conversation project.
:ivar query: The same query given in request. Required.
:vartype query: str
:ivar detected_language: The detected language from the query in BCP 47 language
representation.
:vartype detected_language: str
:ivar prediction: The predicted result for the query.
:vartype prediction: ~azure.ai.language.conversations.models.ConversationPrediction
"""
query: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The same query given in request. Required."""
detected_language: Optional[str] = rest_field(
name="detectedLanguage", visibility=["read", "create", "update", "delete", "query"]
)
"""The detected language from the query in BCP 47 language representation."""
prediction: Optional["_models.ConversationPrediction"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The predicted result for the query."""
@overload
def __init__(
self,
*,
query: str,
detected_language: Optional[str] = None,
prediction: Optional["_models.ConversationPrediction"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationsSummaryResult(_Model):
"""Conversations Summary Result.
:ivar id: Unique, non-empty conversation identifier. Required.
:vartype id: str
:ivar warnings: Warnings encountered in processing the document. Required.
:vartype warnings: list[~azure.ai.language.conversations.models.InputWarning]
:ivar statistics: If showStats=true was specified in the request this field will contain
information about the conversation payload.
:vartype statistics: ~azure.ai.language.conversations.models.ConversationStatistics
:ivar summaries: array of summaries. Required.
:vartype summaries: list[~azure.ai.language.conversations.models.SummaryResultItem]
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Unique, non-empty conversation identifier. Required."""
warnings: List["_models.InputWarning"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Warnings encountered in processing the document. Required."""
statistics: Optional["_models.ConversationStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""If showStats=true was specified in the request this field will contain information about the
conversation payload."""
summaries: List["_models.SummaryResultItem"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""array of summaries. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
warnings: List["_models.InputWarning"],
summaries: List["_models.SummaryResultItem"],
statistics: Optional["_models.ConversationStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationStatistics(_Model):
"""If showStats=true was specified in the request, this field contains information about the
conversation payload.
:ivar transactions_count: Number of text units for the request. Required.
:vartype transactions_count: int
"""
transactions_count: int = rest_field(
name="transactionsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of text units for the request. Required."""
@overload
def __init__(
self,
*,
transactions_count: int,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationSummarizationActionContent(_Model):
"""Supported parameters for pre-build conversational summarization task.
:ivar logging_opt_out: logging opt out.
:vartype logging_opt_out: bool
:ivar model_version: model version.
:vartype model_version: str
:ivar sentence_count: It controls the approximate number of sentences in the output summaries.
:vartype sentence_count: int
:ivar string_index_type: String index type. Known values are: "TextElements_v8",
"UnicodeCodePoint", and "Utf16CodeUnit".
:vartype string_index_type: str or ~azure.ai.language.conversations.models.StringIndexType
:ivar summary_length: (NOTE: Recommended to use summaryLength over sentenceCount) Controls the
approximate length of the output summaries. Known values are: "short", "medium", and "long".
:vartype summary_length: str or ~azure.ai.language.conversations.models.SummaryLengthBucket
:ivar summary_aspects: Array of Summary Aspects. Required.
:vartype summary_aspects: list[str or ~azure.ai.language.conversations.models.SummaryAspect]
:ivar instruction: a text field to allow customers to use natural language to describe their
needs for summarization.
:vartype instruction: str
"""
logging_opt_out: Optional[bool] = rest_field(
name="loggingOptOut", visibility=["read", "create", "update", "delete", "query"]
)
"""logging opt out."""
model_version: Optional[str] = rest_field(
name="modelVersion", visibility=["read", "create", "update", "delete", "query"]
)
"""model version."""
sentence_count: Optional[int] = rest_field(
name="sentenceCount", visibility=["read", "create", "update", "delete", "query"]
)
"""It controls the approximate number of sentences in the output summaries."""
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = rest_field(
name="stringIndexType", visibility=["read", "create", "update", "delete", "query"]
)
"""String index type. Known values are: \"TextElements_v8\", \"UnicodeCodePoint\", and
\"Utf16CodeUnit\"."""
summary_length: Optional[Union[str, "_models.SummaryLengthBucket"]] = rest_field(
name="summaryLength", visibility=["read", "create", "update", "delete", "query"]
)
"""(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of
the output summaries. Known values are: \"short\", \"medium\", and \"long\"."""
summary_aspects: List[Union[str, "_models.SummaryAspect"]] = rest_field(
name="summaryAspects", visibility=["read", "create", "update", "delete", "query"]
)
"""Array of Summary Aspects. Required."""
instruction: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""a text field to allow customers to use natural language to describe their needs for
summarization."""
@overload
def __init__(
self,
*,
summary_aspects: List[Union[str, "_models.SummaryAspect"]],
logging_opt_out: Optional[bool] = None,
model_version: Optional[str] = None,
sentence_count: Optional[int] = None,
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
summary_length: Optional[Union[str, "_models.SummaryLengthBucket"]] = None,
instruction: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class TargetIntentResult(_Model):
"""This is the base class of an intent prediction.
You probably want to use the sub-classes and not this class directly. Known sub-classes are:
ConversationTargetIntentResult, NonLinkedTargetIntentResult,
QuestionAnsweringTargetIntentResult
:ivar target_project_kind: This is the base class of an intent prediction. Required. Known
values are: "Luis", "Conversation", "QuestionAnswering", and "NonLinked".
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.TargetProjectKind
:ivar api_version: The API version used to call a target service.
:vartype api_version: str
:ivar confidence: The prediction score and it ranges from 0.0 to 1.0. Required.
:vartype confidence: float
"""
__mapping__: Dict[str, _Model] = {}
target_project_kind: str = rest_discriminator(
name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]
)
"""This is the base class of an intent prediction. Required. Known values are: \"Luis\",
\"Conversation\", \"QuestionAnswering\", and \"NonLinked\"."""
api_version: Optional[str] = rest_field(
name="apiVersion", visibility=["read", "create", "update", "delete", "query"]
)
"""The API version used to call a target service."""
confidence: float = rest_field(name="confidenceScore", visibility=["read", "create", "update", "delete", "query"])
"""The prediction score and it ranges from 0.0 to 1.0. Required."""
@overload
def __init__(
self,
*,
target_project_kind: str,
confidence: float,
api_version: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ConversationTargetIntentResult(TargetIntentResult, discriminator="Conversation"):
"""A wrap up of Conversation project response.
:ivar api_version: The API version used to call a target service.
:vartype api_version: str
:ivar confidence: The prediction score and it ranges from 0.0 to 1.0. Required.
:vartype confidence: float
:ivar target_project_kind: A wrap up of Conversation project response. Required. Conversation
target service type
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.CONVERSATION
:ivar result: The actual response from a Conversation project.
:vartype result: ~azure.ai.language.conversations.models.ConversationResult
"""
target_project_kind: Literal[TargetProjectKind.CONVERSATION] = rest_discriminator(name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""A wrap up of Conversation project response. Required. Conversation target service type"""
result: Optional["_models.ConversationResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The actual response from a Conversation project."""
@overload
def __init__(
self,
*,
confidence: float,
api_version: Optional[str] = None,
result: Optional["_models.ConversationResult"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, target_project_kind=TargetProjectKind.CONVERSATION, **kwargs)
class CurrencyResolution(ResolutionBase, discriminator="CurrencyResolution"):
"""Represents the currency entity resolution model.
:ivar resolution_kind: Represents the currency entity resolution model. Required. Resolution of
a currency entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.CURRENCY_RESOLUTION
:ivar iso4217: The alphabetic code based on another ISO standard, ISO 3166, which lists the
codes for country names. The first two letters of the ISO 4217 three-letter code are the same
as the code for the country name, and, where possible, the third letter corresponds to the
first letter of the currency name.
:vartype iso4217: str
:ivar value: The money amount captured in the extracted entity. Required.
:vartype value: float
:ivar unit: The unit of the amount captured in the extracted entity. Required.
:vartype unit: str
"""
resolution_kind: Literal[ResolutionKind.CURRENCY_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the currency entity resolution model. Required. Resolution of a currency entity"""
iso4217: Optional[str] = rest_field(name="ISO4217", visibility=["read", "create", "update", "delete", "query"])
"""The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country
names. The first two letters of the ISO 4217 three-letter code are the same as the code for the
country name, and, where possible, the third letter corresponds to the first letter of the
currency name."""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The money amount captured in the extracted entity. Required."""
unit: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The unit of the amount captured in the extracted entity. Required."""
@overload
def __init__(
self,
*,
value: float,
unit: str,
iso4217: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.CURRENCY_RESOLUTION, **kwargs)
class CustomConversationSummarizationActionContent(_Model): # pylint: disable=name-too-long
"""Supported parameters for a custom conversation summarization task.
:ivar logging_opt_out: logging opt out.
:vartype logging_opt_out: bool
:ivar project_name: This field indicates the project name for the model. Required.
:vartype project_name: str
:ivar deployment_name: This field indicates the deployment name for the model. Required.
:vartype deployment_name: str
:ivar sentence_count: It controls the approximate number of sentences in the output summaries.
:vartype sentence_count: int
:ivar string_index_type: String index type. Known values are: "TextElements_v8",
"UnicodeCodePoint", and "Utf16CodeUnit".
:vartype string_index_type: str or ~azure.ai.language.conversations.models.StringIndexType
:ivar summary_length: Controls the approximate length of the output summaries. Recommended to
use summaryLength over sentenceCount. Known values are: "short", "medium", and "long".
:vartype summary_length: str or ~azure.ai.language.conversations.models.SummaryLengthBucket
:ivar summary_aspects: Array of Summary Aspects. Required.
:vartype summary_aspects: list[str or ~azure.ai.language.conversations.models.SummaryAspect]
"""
logging_opt_out: Optional[bool] = rest_field(
name="loggingOptOut", visibility=["read", "create", "update", "delete", "query"]
)
"""logging opt out."""
project_name: str = rest_field(name="projectName", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates the project name for the model. Required."""
deployment_name: str = rest_field(name="deploymentName", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates the deployment name for the model. Required."""
sentence_count: Optional[int] = rest_field(
name="sentenceCount", visibility=["read", "create", "update", "delete", "query"]
)
"""It controls the approximate number of sentences in the output summaries."""
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = rest_field(
name="stringIndexType", visibility=["read", "create", "update", "delete", "query"]
)
"""String index type. Known values are: \"TextElements_v8\", \"UnicodeCodePoint\", and
\"Utf16CodeUnit\"."""
summary_length: Optional[Union[str, "_models.SummaryLengthBucket"]] = rest_field(
name="summaryLength", visibility=["read", "create", "update", "delete", "query"]
)
"""Controls the approximate length of the output summaries. Recommended to use summaryLength over
sentenceCount. Known values are: \"short\", \"medium\", and \"long\"."""
summary_aspects: List[Union[str, "_models.SummaryAspect"]] = rest_field(
name="summaryAspects", visibility=["read", "create", "update", "delete", "query"]
)
"""Array of Summary Aspects. Required."""
@overload
def __init__(
self,
*,
project_name: str,
deployment_name: str,
summary_aspects: List[Union[str, "_models.SummaryAspect"]],
logging_opt_out: Optional[bool] = None,
sentence_count: Optional[int] = None,
string_index_type: Optional[Union[str, "_models.StringIndexType"]] = None,
summary_length: Optional[Union[str, "_models.SummaryLengthBucket"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class CustomSummarizationOperationAction(
AnalyzeConversationOperationAction, discriminator="CustomConversationalSummarizationTask"
):
"""Task definition for custom conversational summarization.
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Custom Conversational Summarization Task
:vartype kind: str or
~azure.ai.language.conversations.models.CUSTOM_CONVERSATIONAL_SUMMARIZATION_TASK
:ivar action_content: parameters.
:vartype action_content:
~azure.ai.language.conversations.models._models.CustomConversationSummarizationActionContent
"""
kind: Literal[AnalyzeConversationOperationActionKind.CUSTOM_CONVERSATIONAL_SUMMARIZATION_TASK] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Custom Conversational Summarization Task"""
action_content: Optional["_models._models.CustomConversationSummarizationActionContent"] = rest_field(
name="parameters", visibility=["read", "create", "update", "delete", "query"]
)
"""parameters."""
@overload
def __init__(
self,
*,
name: Optional[str] = None,
action_content: Optional["_models._models.CustomConversationSummarizationActionContent"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(
*args, kind=AnalyzeConversationOperationActionKind.CUSTOM_CONVERSATIONAL_SUMMARIZATION_TASK, **kwargs
)
class CustomSummarizationOperationResult(
AnalyzeConversationOperationResult, discriminator="customConversationalSummarizationResults"
):
"""Result for the custom summarization task on the conversation.
:ivar last_update_date_time: The last updated time in UTC for the task. Required.
:vartype last_update_date_time: ~datetime.datetime
:ivar status: The status of the task at the mentioned last update time. Required. Known values
are: "notStarted", "running", "succeeded", "partiallyCompleted", "failed", "cancelled", and
"cancelling".
:vartype status: str or ~azure.ai.language.conversations.models.ConversationActionState
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Custom Conversational Summarization Results
:vartype kind: str or
~azure.ai.language.conversations.models.CUSTOM_SUMMARIZATION_OPERATION_RESULTS
:ivar results: Custom Summary Result. Required.
:vartype results: ~azure.ai.language.conversations.models.CustomSummaryResult
"""
kind: Literal[AnalyzeConversationOperationResultsKind.CUSTOM_SUMMARIZATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Custom Conversational Summarization Results"""
results: "_models.CustomSummaryResult" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Custom Summary Result. Required."""
@overload
def __init__(
self,
*,
last_update_date_time: datetime.datetime,
status: Union[str, "_models.ConversationActionState"],
results: "_models.CustomSummaryResult",
name: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(
*args, kind=AnalyzeConversationOperationResultsKind.CUSTOM_SUMMARIZATION_OPERATION_RESULTS, **kwargs
)
class CustomSummaryResult(_Model):
"""Custom Summary Results.
:ivar conversations: array of conversations. Required.
:vartype conversations:
list[~azure.ai.language.conversations.models.ConversationsSummaryResult]
:ivar errors: Errors by document id. Required.
:vartype errors: list[~azure.ai.language.conversations.models.DocumentError]
:ivar statistics: if showStats=true was specified in the request this field will contain
information about the request payload.
:vartype statistics: ~azure.ai.language.conversations.models.RequestStatistics
:ivar project_name: This field indicates the project name for the model. Required.
:vartype project_name: str
:ivar deployment_name: This field indicates the deployment name for the model. Required.
:vartype deployment_name: str
"""
conversations: List["_models.ConversationsSummaryResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""array of conversations. Required."""
errors: List["_models.DocumentError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Errors by document id. Required."""
statistics: Optional["_models.RequestStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""if showStats=true was specified in the request this field will contain information about the
request payload."""
project_name: str = rest_field(name="projectName", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates the project name for the model. Required."""
deployment_name: str = rest_field(name="deploymentName", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates the deployment name for the model. Required."""
@overload
def __init__(
self,
*,
conversations: List["_models.ConversationsSummaryResult"],
errors: List["_models.DocumentError"],
project_name: str,
deployment_name: str,
statistics: Optional["_models.RequestStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class DateTimeResolution(ResolutionBase, discriminator="DateTimeResolution"):
"""A resolution for datetime entity instances.
:ivar resolution_kind: A resolution for datetime entity instances. Required. Resolution of a
date/time entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.DATE_TIME_RESOLUTION
:ivar timex: An extended ISO 8601 date/time representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_).
Required.
:vartype timex: str
:ivar date_time_sub_kind: The DateTime SubKind. Required. Known values are: "Time", "Date",
"DateTime", "Duration", and "Set".
:vartype date_time_sub_kind: str or ~azure.ai.language.conversations.models.DateTimeSubKind
:ivar value: The actual time that the extracted text denote. Required.
:vartype value: str
:ivar modifier: An optional modifier of a date/time instance. Known values are: "AfterApprox",
"Before", "BeforeStart", "Approx", "ReferenceUndefined", "SinceEnd", "AfterMid", "Start",
"After", "BeforeEnd", "Until", "End", "Less", "Since", "AfterStart", "BeforeApprox", "Mid", and
"More".
:vartype modifier: str or ~azure.ai.language.conversations.models.TemporalModifier
"""
resolution_kind: Literal[ResolutionKind.DATE_TIME_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""A resolution for datetime entity instances. Required. Resolution of a date/time entity"""
timex: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""An extended ISO 8601 date/time representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_).
Required."""
date_time_sub_kind: Union[str, "_models.DateTimeSubKind"] = rest_field(
name="dateTimeSubKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The DateTime SubKind. Required. Known values are: \"Time\", \"Date\", \"DateTime\",
\"Duration\", and \"Set\"."""
value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The actual time that the extracted text denote. Required."""
modifier: Optional[Union[str, "_models.TemporalModifier"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""An optional modifier of a date/time instance. Known values are: \"AfterApprox\", \"Before\",
\"BeforeStart\", \"Approx\", \"ReferenceUndefined\", \"SinceEnd\", \"AfterMid\", \"Start\",
\"After\", \"BeforeEnd\", \"Until\", \"End\", \"Less\", \"Since\", \"AfterStart\",
\"BeforeApprox\", \"Mid\", and \"More\"."""
@overload
def __init__(
self,
*,
timex: str,
date_time_sub_kind: Union[str, "_models.DateTimeSubKind"],
value: str,
modifier: Optional[Union[str, "_models.TemporalModifier"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.DATE_TIME_RESOLUTION, **kwargs)
class DocumentError(_Model):
"""Contains details of errors encountered during a job execution.
:ivar id: The ID of the input document. Required.
:vartype id: str
:ivar error: Error encountered. Required.
:vartype error: ~azure.ai.language.conversations.models.ConversationError
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The ID of the input document. Required."""
error: "_models.ConversationError" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Error encountered. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
error: "_models.ConversationError",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class EntityMaskTypePolicyType(BaseRedactionPolicy, discriminator="entityMask"):
"""Represents the policy of masking PII with the entity type.
:ivar policy_kind: The entity OverlapPolicy object kind. Required. Mask detected entities with
entity type
:vartype policy_kind: str or ~azure.ai.language.conversations.models.ENTITY_MASK
"""
policy_kind: Literal[RedactionPolicyKind.ENTITY_MASK] = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The entity OverlapPolicy object kind. Required. Mask detected entities with entity type"""
@overload
def __init__(
self,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, policy_kind=RedactionPolicyKind.ENTITY_MASK, **kwargs)
class EntitySubtype(ConversationEntityExtraInformation, discriminator="EntitySubtype"):
"""The concrete entity Subtype model of extra information.
:ivar extra_information_kind: The extra information object kind. Required. Entity subtype extra
information kind
:vartype extra_information_kind: str or ~azure.ai.language.conversations.models.ENTITY_SUBTYPE
:ivar value: The Subtype of an extracted entity type.
:vartype value: str
:ivar tags: List of entity tags. Tags express similarities between entity categories for the
extracted entity type.
:vartype tags: list[~azure.ai.language.conversations.models.EntityTag]
"""
extra_information_kind: Literal[ExtraInformationKind.ENTITY_SUBTYPE] = rest_discriminator(name="extraInformationKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The extra information object kind. Required. Entity subtype extra information kind"""
value: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The Subtype of an extracted entity type."""
tags: Optional[List["_models.EntityTag"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""List of entity tags. Tags express similarities between entity categories for the extracted
entity type."""
@overload
def __init__(
self,
*,
value: Optional[str] = None,
tags: Optional[List["_models.EntityTag"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, extra_information_kind=ExtraInformationKind.ENTITY_SUBTYPE, **kwargs)
class EntityTag(_Model):
"""Tags express similarities between entity categories for the extracted entity type.
:ivar name: The name of the tag. Required.
:vartype name: str
:ivar confidence_score: The confidence score of the tag for the extracted entity between 0.0
and 1.0.
:vartype confidence_score: float
"""
name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The name of the tag. Required."""
confidence_score: Optional[float] = rest_field(
name="confidenceScore", visibility=["read", "create", "update", "delete", "query"]
)
"""The confidence score of the tag for the extracted entity between 0.0 and 1.0."""
@overload
def __init__(
self,
*,
name: str,
confidence_score: Optional[float] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ErrorResponse(_Model):
"""Error response.
:ivar error: The error object. Required.
:vartype error: ~azure.ai.language.conversations.models.ConversationError
"""
error: "_models.ConversationError" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The error object. Required."""
@overload
def __init__(
self,
*,
error: "_models.ConversationError",
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class InformationResolution(ResolutionBase, discriminator="InformationResolution"):
"""Represents the information (data) entity resolution model.
:ivar resolution_kind: Represents the information (data) entity resolution model. Required.
Resolution of an information entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.INFORMATION_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The information (data) Unit of measurement. Required. Known values are:
"Unspecified", "Bit", "Kilobit", "Megabit", "Gigabit", "Terabit", "Petabit", "Byte",
"Kilobyte", "Megabyte", "Gigabyte", "Terabyte", and "Petabyte".
:vartype unit: str or ~azure.ai.language.conversations.models.InformationUnit
"""
resolution_kind: Literal[ResolutionKind.INFORMATION_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the information (data) entity resolution model. Required. Resolution of an
information entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.InformationUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The information (data) Unit of measurement. Required. Known values are: \"Unspecified\",
\"Bit\", \"Kilobit\", \"Megabit\", \"Gigabit\", \"Terabit\", \"Petabit\", \"Byte\",
\"Kilobyte\", \"Megabyte\", \"Gigabyte\", \"Terabyte\", and \"Petabyte\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.InformationUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.INFORMATION_RESOLUTION, **kwargs)
class InnerErrorModel(_Model):
"""An object containing more specific information about the error. As per Microsoft One API
guidelines -
`https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses
<https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses>`_.
:ivar code: One of a server-defined set of error codes. Required. Known values are:
"InvalidRequest", "InvalidParameterValue", "KnowledgeBaseNotFound",
"AzureCognitiveSearchNotFound", "AzureCognitiveSearchThrottling", "ExtractionFailure",
"InvalidRequestBodyFormat", "EmptyRequest", "MissingInputDocuments", "InvalidDocument",
"ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", and
"InvalidCountryHint".
:vartype code: str or ~azure.ai.language.conversations.models.InnerErrorCode
:ivar message: Error message. Required.
:vartype message: str
:ivar details: Error details.
:vartype details: dict[str, str]
:ivar target: Error target.
:vartype target: str
:ivar innererror: An object containing more specific information than the current object about
the error.
:vartype innererror: ~azure.ai.language.conversations.models.InnerErrorModel
"""
code: Union[str, "_models.InnerErrorCode"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""One of a server-defined set of error codes. Required. Known values are: \"InvalidRequest\",
\"InvalidParameterValue\", \"KnowledgeBaseNotFound\", \"AzureCognitiveSearchNotFound\",
\"AzureCognitiveSearchThrottling\", \"ExtractionFailure\", \"InvalidRequestBodyFormat\",
\"EmptyRequest\", \"MissingInputDocuments\", \"InvalidDocument\", \"ModelVersionIncorrect\",
\"InvalidDocumentBatch\", \"UnsupportedLanguageCode\", and \"InvalidCountryHint\"."""
message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Error message. Required."""
details: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Error details."""
target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Error target."""
innererror: Optional["_models.InnerErrorModel"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""An object containing more specific information than the current object about the error."""
@overload
def __init__(
self,
*,
code: Union[str, "_models.InnerErrorCode"],
message: str,
details: Optional[Dict[str, str]] = None,
target: Optional[str] = None,
innererror: Optional["_models.InnerErrorModel"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class InputWarning(_Model):
"""Contains details of warnings encountered during a job execution.
:ivar code: Warning code. Required.
:vartype code: str
:ivar message: Warning message. Required.
:vartype message: str
:ivar target_ref: A JSON pointer reference indicating the target object.
:vartype target_ref: str
"""
code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Warning code. Required."""
message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Warning message. Required."""
target_ref: Optional[str] = rest_field(name="targetRef", visibility=["read", "create", "update", "delete", "query"])
"""A JSON pointer reference indicating the target object."""
@overload
def __init__(
self,
*,
code: str,
message: str,
target_ref: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ItemizedSummaryContext(_Model):
"""Context of the summary with a conversation item ID.
:ivar offset: Start position for the context. Use of different 'stringIndexType' values can
affect the offset returned. Required.
:vartype offset: int
:ivar length: The length of the context. Use of different 'stringIndexType' values can affect
the length returned. Required.
:vartype length: int
:ivar conversation_item_id: Reference to the ID of ConversationItem. Required.
:vartype conversation_item_id: str
"""
offset: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Start position for the context. Use of different 'stringIndexType' values can affect the offset
returned. Required."""
length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The length of the context. Use of different 'stringIndexType' values can affect the length
returned. Required."""
conversation_item_id: str = rest_field(
name="conversationItemId", visibility=["read", "create", "update", "delete", "query"]
)
"""Reference to the ID of ConversationItem. Required."""
@overload
def __init__(
self,
*,
offset: int,
length: int,
conversation_item_id: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class KnowledgeBaseAnswer(_Model):
"""Represents knowledge base answer.
:ivar questions: List of questions associated with the answer.
:vartype questions: list[str]
:ivar answer: Answer text.
:vartype answer: str
:ivar confidence: Answer confidence score, value ranges from 0 to 1.
:vartype confidence: float
:ivar qna_id: ID of the QnA result.
:vartype qna_id: int
:ivar source: Source of QnA result.
:vartype source: str
:ivar metadata: Metadata associated with the answer, useful to categorize or filter question
answers.
:vartype metadata: dict[str, str]
:ivar dialog: Dialog associated with Answer.
:vartype dialog: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog
:ivar short_answer: Answer span object of QnA with respect to user's question.
:vartype short_answer: ~azure.ai.language.conversations.models.AnswerSpan
"""
questions: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""List of questions associated with the answer."""
answer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Answer text."""
confidence: Optional[float] = rest_field(
name="confidenceScore", visibility=["read", "create", "update", "delete", "query"]
)
"""Answer confidence score, value ranges from 0 to 1."""
qna_id: Optional[int] = rest_field(name="id", visibility=["read", "create", "update", "delete", "query"])
"""ID of the QnA result."""
source: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Source of QnA result."""
metadata: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Metadata associated with the answer, useful to categorize or filter question answers."""
dialog: Optional["_models.KnowledgeBaseAnswerDialog"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Dialog associated with Answer."""
short_answer: Optional["_models.AnswerSpan"] = rest_field(
name="answerSpan", visibility=["read", "create", "update", "delete", "query"]
)
"""Answer span object of QnA with respect to user's question."""
@overload
def __init__(
self,
*,
questions: Optional[List[str]] = None,
answer: Optional[str] = None,
confidence: Optional[float] = None,
qna_id: Optional[int] = None,
source: Optional[str] = None,
metadata: Optional[Dict[str, str]] = None,
dialog: Optional["_models.KnowledgeBaseAnswerDialog"] = None,
short_answer: Optional["_models.AnswerSpan"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class KnowledgeBaseAnswerContext(_Model):
"""Context object with previous QnA's information.
:ivar previous_qna_id: Previous turn top answer result QnA ID. Required.
:vartype previous_qna_id: int
:ivar previous_question: Previous user query.
:vartype previous_question: str
"""
previous_qna_id: int = rest_field(name="previousQnaId", visibility=["read", "create", "update", "delete", "query"])
"""Previous turn top answer result QnA ID. Required."""
previous_question: Optional[str] = rest_field(
name="previousUserQuery", visibility=["read", "create", "update", "delete", "query"]
)
"""Previous user query."""
@overload
def __init__(
self,
*,
previous_qna_id: int,
previous_question: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class KnowledgeBaseAnswerDialog(_Model):
"""Dialog associated with Answer.
:ivar is_context_only: To mark if a prompt is relevant only with a previous question or not. If
true, do not include this QnA as search result for queries without context; otherwise, if
false, ignores context and includes this QnA in search result.
:vartype is_context_only: bool
:ivar prompts: List of prompts associated with the answer.
:vartype prompts: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt]
"""
is_context_only: Optional[bool] = rest_field(
name="isContextOnly", visibility=["read", "create", "update", "delete", "query"]
)
"""To mark if a prompt is relevant only with a previous question or not. If true, do not include
this QnA as search result for queries without context; otherwise, if false, ignores context and
includes this QnA in search result."""
prompts: Optional[List["_models.KnowledgeBaseAnswerPrompt"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""List of prompts associated with the answer."""
@overload
def __init__(
self,
*,
is_context_only: Optional[bool] = None,
prompts: Optional[List["_models.KnowledgeBaseAnswerPrompt"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class KnowledgeBaseAnswerPrompt(_Model):
"""Prompt for an answer.
:ivar display_order: Index of the prompt - used in ordering of the prompts.
:vartype display_order: int
:ivar qna_id: QnA ID corresponding to the prompt.
:vartype qna_id: int
:ivar display_text: Text displayed to represent a follow up question prompt.
:vartype display_text: str
"""
display_order: Optional[int] = rest_field(
name="displayOrder", visibility=["read", "create", "update", "delete", "query"]
)
"""Index of the prompt - used in ordering of the prompts."""
qna_id: Optional[int] = rest_field(name="qnaId", visibility=["read", "create", "update", "delete", "query"])
"""QnA ID corresponding to the prompt."""
display_text: Optional[str] = rest_field(
name="displayText", visibility=["read", "create", "update", "delete", "query"]
)
"""Text displayed to represent a follow up question prompt."""
@overload
def __init__(
self,
*,
display_order: Optional[int] = None,
qna_id: Optional[int] = None,
display_text: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class LengthResolution(ResolutionBase, discriminator="LengthResolution"):
"""Represents the length entity resolution model.
:ivar resolution_kind: Represents the length entity resolution model. Required. Resolution of a
length entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.LENGTH_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The length Unit of measurement. Required. Known values are: "Unspecified",
"Kilometer", "Hectometer", "Decameter", "Meter", "Decimeter", "Centimeter", "Millimeter",
"Micrometer", "Nanometer", "Picometer", "Mile", "Yard", "Inch", "Foot", "LightYear", and "Pt".
:vartype unit: str or ~azure.ai.language.conversations.models.LengthUnit
"""
resolution_kind: Literal[ResolutionKind.LENGTH_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the length entity resolution model. Required. Resolution of a length entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.LengthUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The length Unit of measurement. Required. Known values are: \"Unspecified\", \"Kilometer\",
\"Hectometer\", \"Decameter\", \"Meter\", \"Decimeter\", \"Centimeter\", \"Millimeter\",
\"Micrometer\", \"Nanometer\", \"Picometer\", \"Mile\", \"Yard\", \"Inch\", \"Foot\",
\"LightYear\", and \"Pt\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.LengthUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.LENGTH_RESOLUTION, **kwargs)
class ListKey(ConversationEntityExtraInformation, discriminator="ListKey"):
"""The list key extra data kind.
:ivar extra_information_kind: The list key extra data kind. Required. List key extra
information kind
:vartype extra_information_kind: str or ~azure.ai.language.conversations.models.LIST_KEY
:ivar key: The canonical form of the extracted entity.
:vartype key: str
"""
extra_information_kind: Literal[ExtraInformationKind.LIST_KEY] = rest_discriminator(name="extraInformationKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The list key extra data kind. Required. List key extra information kind"""
key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The canonical form of the extracted entity."""
@overload
def __init__(
self,
*,
key: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, extra_information_kind=ExtraInformationKind.LIST_KEY, **kwargs)
class MetadataFilter(_Model):
"""Find QnAs that are associated with the given list of metadata.
:ivar metadata: List of metadata.
:vartype metadata: list[~azure.ai.language.conversations.models.MetadataRecord]
:ivar logical_operation: Operation used to join metadata filters. Known values are: "AND" and
"OR".
:vartype logical_operation: str or ~azure.ai.language.conversations.models.LogicalOperationKind
"""
metadata: Optional[List["_models.MetadataRecord"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""List of metadata."""
logical_operation: Optional[Union[str, "_models.LogicalOperationKind"]] = rest_field(
name="logicalOperation", visibility=["read", "create", "update", "delete", "query"]
)
"""Operation used to join metadata filters. Known values are: \"AND\" and \"OR\"."""
@overload
def __init__(
self,
*,
metadata: Optional[List["_models.MetadataRecord"]] = None,
logical_operation: Optional[Union[str, "_models.LogicalOperationKind"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class MetadataRecord(_Model):
"""Object to provide the key value pair for each metadata.
:ivar key: Metadata Key from Metadata dictionary used in the QnA. Required.
:vartype key: str
:ivar value: Metadata Value from Metadata dictionary used in the QnA. Required.
:vartype value: str
"""
key: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Metadata Key from Metadata dictionary used in the QnA. Required."""
value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Metadata Value from Metadata dictionary used in the QnA. Required."""
@overload
def __init__(
self,
*,
key: str,
value: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class MultiLanguageConversationInput(_Model):
"""Multi Language Conversation Analysis Input.
:ivar conversations: Array of conversation items. Required.
:vartype conversations: list[~azure.ai.language.conversations.models.ConversationInput]
"""
conversations: List["_models.ConversationInput"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Array of conversation items. Required."""
@overload
def __init__(
self,
*,
conversations: List["_models.ConversationInput"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class NamedEntity(_Model):
"""Text that has been categorized into pre-defined classes or types such as: person, location,
event, product, and organization.
:ivar text: Entity text as appears in the request. Required.
:vartype text: str
:ivar category: Entity type. Required.
:vartype category: str
:ivar subcategory: (Optional) Entity sub type.
:vartype subcategory: str
:ivar offset: Start position for the entity text. Use of different 'stringIndexType' values can
affect the offset returned. Required.
:vartype offset: int
:ivar length: Length for the entity text. Use of different 'stringIndexType' values can affect
the length returned. Required.
:vartype length: int
:ivar confidence_score: Confidence score between 0 and 1 of the extracted entity. Required.
:vartype confidence_score: float
:ivar mask: Exact mask text to mask the PII entity.
:vartype mask: str
:ivar mask_offset: Offset of the mask text.
:vartype mask_offset: int
:ivar mask_length: Length of the mask text.
:vartype mask_length: int
"""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Entity text as appears in the request. Required."""
category: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Entity type. Required."""
subcategory: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""(Optional) Entity sub type."""
offset: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Start position for the entity text. Use of different 'stringIndexType' values can affect the
offset returned. Required."""
length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Length for the entity text. Use of different 'stringIndexType' values can affect the length
returned. Required."""
confidence_score: float = rest_field(
name="confidenceScore", visibility=["read", "create", "update", "delete", "query"]
)
"""Confidence score between 0 and 1 of the extracted entity. Required."""
mask: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Exact mask text to mask the PII entity."""
mask_offset: Optional[int] = rest_field(
name="maskOffset", visibility=["read", "create", "update", "delete", "query"]
)
"""Offset of the mask text."""
mask_length: Optional[int] = rest_field(
name="maskLength", visibility=["read", "create", "update", "delete", "query"]
)
"""Length of the mask text."""
@overload
def __init__(
self,
*,
text: str,
category: str,
offset: int,
length: int,
confidence_score: float,
subcategory: Optional[str] = None,
mask: Optional[str] = None,
mask_offset: Optional[int] = None,
mask_length: Optional[int] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class NoMaskPolicyType(BaseRedactionPolicy, discriminator="noMask"):
"""Represents the policy of not masking found PII.
:ivar policy_kind: The entity RedactionPolicy object kind. Required. Do not mask detected
entities
:vartype policy_kind: str or ~azure.ai.language.conversations.models.NO_MASK
"""
policy_kind: Literal[RedactionPolicyKind.NO_MASK] = rest_discriminator(name="policyKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The entity RedactionPolicy object kind. Required. Do not mask detected entities"""
@overload
def __init__(
self,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, policy_kind=RedactionPolicyKind.NO_MASK, **kwargs)
class NonLinkedTargetIntentResult(TargetIntentResult, discriminator="NonLinked"):
"""A wrap up of non-linked intent response.
:ivar api_version: The API version used to call a target service.
:vartype api_version: str
:ivar confidence: The prediction score and it ranges from 0.0 to 1.0. Required.
:vartype confidence: float
:ivar target_project_kind: The actual response from a Conversation project. Required. NonLinked
target service type
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.NON_LINKED
:ivar result: The actual response from a Conversation project.
:vartype result: ~azure.ai.language.conversations.models.ConversationResult
"""
target_project_kind: Literal[TargetProjectKind.NON_LINKED] = rest_discriminator(name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The actual response from a Conversation project. Required. NonLinked target service type"""
result: Optional["_models.ConversationResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The actual response from a Conversation project."""
@overload
def __init__(
self,
*,
confidence: float,
api_version: Optional[str] = None,
result: Optional["_models.ConversationResult"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, target_project_kind=TargetProjectKind.NON_LINKED, **kwargs)
class NumberResolution(ResolutionBase, discriminator="NumberResolution"):
"""A resolution for numeric entity instances.
:ivar resolution_kind: A resolution for numeric entity instances. Required. Resolution of a
number entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.NUMBER_RESOLUTION
:ivar number_kind: The type of the extracted number entity. Required. Known values are:
"Integer", "Decimal", "Power", "Fraction", "Percent", and "Unspecified".
:vartype number_kind: str or ~azure.ai.language.conversations.models.NumberKind
:ivar value: A numeric representation of what the extracted text denotes. Required.
:vartype value: float
"""
resolution_kind: Literal[ResolutionKind.NUMBER_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""A resolution for numeric entity instances. Required. Resolution of a number entity"""
number_kind: Union[str, "_models.NumberKind"] = rest_field(
name="numberKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The type of the extracted number entity. Required. Known values are: \"Integer\", \"Decimal\",
\"Power\", \"Fraction\", \"Percent\", and \"Unspecified\"."""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""A numeric representation of what the extracted text denotes. Required."""
@overload
def __init__(
self,
*,
number_kind: Union[str, "_models.NumberKind"],
value: float,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.NUMBER_RESOLUTION, **kwargs)
class NumericRangeResolution(ResolutionBase, discriminator="NumericRangeResolution"):
"""represents the resolution of numeric intervals.
:ivar resolution_kind: represents the resolution of numeric intervals. Required. Resolution of
a numeric range entity
:vartype resolution_kind: str or
~azure.ai.language.conversations.models.NUMERIC_RANGE_RESOLUTION
:ivar range_kind: The kind of range that the resolution object represents. Required. Known
values are: "Number", "Speed", "Weight", "Length", "Volume", "Area", "Age", "Information",
"Temperature", and "Currency".
:vartype range_kind: str or ~azure.ai.language.conversations.models.RangeKind
:ivar minimum: The beginning value of the interval. Required.
:vartype minimum: float
:ivar maximum: The ending value of the interval. Required.
:vartype maximum: float
"""
resolution_kind: Literal[ResolutionKind.NUMERIC_RANGE_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""represents the resolution of numeric intervals. Required. Resolution of a numeric range entity"""
range_kind: Union[str, "_models.RangeKind"] = rest_field(
name="rangeKind", visibility=["read", "create", "update", "delete", "query"]
)
"""The kind of range that the resolution object represents. Required. Known values are:
\"Number\", \"Speed\", \"Weight\", \"Length\", \"Volume\", \"Area\", \"Age\", \"Information\",
\"Temperature\", and \"Currency\"."""
minimum: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The beginning value of the interval. Required."""
maximum: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The ending value of the interval. Required."""
@overload
def __init__(
self,
*,
range_kind: Union[str, "_models.RangeKind"],
minimum: float,
maximum: float,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.NUMERIC_RANGE_RESOLUTION, **kwargs)
class OrchestrationPrediction(PredictionBase, discriminator="Orchestration"):
"""This represents the prediction result of an Orchestration project.
:ivar top_intent: The intent with the highest score.
:vartype top_intent: str
:ivar project_kind: This represents the prediction result of an Orchestration project.
Required. Orchestration type
:vartype project_kind: str or ~azure.ai.language.conversations.models.ORCHESTRATION
:ivar intents: A dictionary that contains all intents. A key is an intent name and a value is
its confidence score and target type. The top intent's value also contains the actual response
from the target project. Required.
:vartype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult]
"""
project_kind: Literal[ProjectKind.ORCHESTRATION] = rest_discriminator(name="projectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""This represents the prediction result of an Orchestration project. Required. Orchestration type"""
intents: Dict[str, "_models.TargetIntentResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""A dictionary that contains all intents. A key is an intent name and a value is its confidence
score and target type. The top intent's value also contains the actual response from the target
project. Required."""
@overload
def __init__(
self,
*,
intents: Dict[str, "_models.TargetIntentResult"],
top_intent: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, project_kind=ProjectKind.ORCHESTRATION, **kwargs)
class OrdinalResolution(ResolutionBase, discriminator="OrdinalResolution"):
"""A resolution for ordinal numbers entity instances.
:ivar resolution_kind: A resolution for ordinal numbers entity instances. Required. Resolution
of an ordinal entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.ORDINAL_RESOLUTION
:ivar offset: The offset with respect to the reference (e.g., offset = -1 indicates the second
to last). Required.
:vartype offset: str
:ivar relative_to: The reference point that the ordinal number denotes. Required. Known values
are: "Current", "End", and "Start".
:vartype relative_to: str or ~azure.ai.language.conversations.models.RelativeTo
:ivar value: A simple arithmetic expression that the ordinal denotes. Required.
:vartype value: str
"""
resolution_kind: Literal[ResolutionKind.ORDINAL_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""A resolution for ordinal numbers entity instances. Required. Resolution of an ordinal entity"""
offset: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The offset with respect to the reference (e.g., offset = -1 indicates the second to last).
Required."""
relative_to: Union[str, "_models.RelativeTo"] = rest_field(
name="relativeTo", visibility=["read", "create", "update", "delete", "query"]
)
"""The reference point that the ordinal number denotes. Required. Known values are: \"Current\",
\"End\", and \"Start\"."""
value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""A simple arithmetic expression that the ordinal denotes. Required."""
@overload
def __init__(
self,
*,
offset: str,
relative_to: Union[str, "_models.RelativeTo"],
value: str,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.ORDINAL_RESOLUTION, **kwargs)
class PiiOperationAction(AnalyzeConversationOperationAction, discriminator="ConversationalPIITask"):
"""Task definition for a PII redaction in conversations.
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Conversational PII Task
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATIONAL_PII_TASK
:ivar action_content: parameters.
:vartype action_content:
~azure.ai.language.conversations.models._models.ConversationPiiActionContent
"""
kind: Literal[AnalyzeConversationOperationActionKind.CONVERSATIONAL_PII_TASK] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Conversational PII Task"""
action_content: Optional["_models._models.ConversationPiiActionContent"] = rest_field(
name="parameters", visibility=["read", "create", "update", "delete", "query"]
)
"""parameters."""
@overload
def __init__(
self,
*,
name: Optional[str] = None,
action_content: Optional["_models._models.ConversationPiiActionContent"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationOperationActionKind.CONVERSATIONAL_PII_TASK, **kwargs)
class QueryFilters(_Model):
"""filters over knowledge base.
:ivar metadata_filter: filters over knowledge base.
:vartype metadata_filter: ~azure.ai.language.conversations.models.MetadataFilter
:ivar source_filter: filters over knowledge base.
:vartype source_filter: list[str]
:ivar logical_operation: Logical operation used to join metadata filter with source filter.
Known values are: "AND" and "OR".
:vartype logical_operation: str or ~azure.ai.language.conversations.models.LogicalOperationKind
"""
metadata_filter: Optional["_models.MetadataFilter"] = rest_field(
name="metadataFilter", visibility=["read", "create", "update", "delete", "query"]
)
"""filters over knowledge base."""
source_filter: Optional[List[str]] = rest_field(
name="sourceFilter", visibility=["read", "create", "update", "delete", "query"]
)
"""filters over knowledge base."""
logical_operation: Optional[Union[str, "_models.LogicalOperationKind"]] = rest_field(
name="logicalOperation", visibility=["read", "create", "update", "delete", "query"]
)
"""Logical operation used to join metadata filter with source filter. Known values are: \"AND\"
and \"OR\"."""
@overload
def __init__(
self,
*,
metadata_filter: Optional["_models.MetadataFilter"] = None,
source_filter: Optional[List[str]] = None,
logical_operation: Optional[Union[str, "_models.LogicalOperationKind"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class QuestionAnsweringConfig(AnalysisConfig, discriminator="QuestionAnswering"):
"""This is a set of request parameters for Question Answering knowledge bases.
:ivar api_version: The API version to use when call a specific target service.
:vartype api_version: str
:ivar target_project_kind: This is a set of request parameters for Question Answering knowledge
bases. Required. QuestionAnswering target service type
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.QUESTION_ANSWERING
:ivar calling_options: The options sent to a Question Answering KB.
:vartype calling_options: ~azure.ai.language.conversations.models.QuestionAnswersConfig
"""
target_project_kind: Literal[TargetProjectKind.QUESTION_ANSWERING] = rest_discriminator(name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""This is a set of request parameters for Question Answering knowledge bases. Required.
QuestionAnswering target service type"""
calling_options: Optional["_models.QuestionAnswersConfig"] = rest_field(
name="callingOptions", visibility=["read", "create", "update", "delete", "query"]
)
"""The options sent to a Question Answering KB."""
@overload
def __init__(
self,
*,
api_version: Optional[str] = None,
calling_options: Optional["_models.QuestionAnswersConfig"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, target_project_kind=TargetProjectKind.QUESTION_ANSWERING, **kwargs)
class QuestionAnsweringTargetIntentResult(TargetIntentResult, discriminator="QuestionAnswering"):
"""It is a wrap up a Question Answering KB response.
:ivar api_version: The API version used to call a target service.
:vartype api_version: str
:ivar confidence: The prediction score and it ranges from 0.0 to 1.0. Required.
:vartype confidence: float
:ivar target_project_kind: It is a wrap up a Question Answering KB response. Required.
QuestionAnswering target service type
:vartype target_project_kind: str or ~azure.ai.language.conversations.models.QUESTION_ANSWERING
:ivar result: The generated answer by a Question Answering KB.
:vartype result: ~azure.ai.language.conversations.models.AnswersResult
"""
target_project_kind: Literal[TargetProjectKind.QUESTION_ANSWERING] = rest_discriminator(name="targetProjectKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""It is a wrap up a Question Answering KB response. Required. QuestionAnswering target service
type"""
result: Optional["_models.AnswersResult"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The generated answer by a Question Answering KB."""
@overload
def __init__(
self,
*,
confidence: float,
api_version: Optional[str] = None,
result: Optional["_models.AnswersResult"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, target_project_kind=TargetProjectKind.QUESTION_ANSWERING, **kwargs)
class QuestionAnswersConfig(_Model):
"""Parameters to query a knowledge base.
:ivar qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over
question.
:vartype qna_id: int
:ivar question: User question to query against the knowledge base.
:vartype question: str
:ivar top: Max number of answers to be returned for the question.
:vartype top: int
:ivar user_id: Unique identifier for the user.
:vartype user_id: str
:ivar confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1.
:vartype confidence_threshold: float
:ivar answer_context: Context object with previous QnA's information.
:vartype answer_context: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerContext
:ivar ranker_kind: Type of ranker to be used. Known values are: "Default" and "QuestionOnly".
:vartype ranker_kind: str or ~azure.ai.language.conversations.models.RankerKind
:ivar filters: Filter QnAs based on given metadata list and knowledge base sources.
:vartype filters: ~azure.ai.language.conversations.models.QueryFilters
:ivar short_answer_options: To configure Answer span prediction feature.
:vartype short_answer_options: ~azure.ai.language.conversations.models.ShortAnswerConfig
:ivar include_unstructured_sources: (Optional) Flag to enable Query over Unstructured Sources.
:vartype include_unstructured_sources: bool
"""
qna_id: Optional[int] = rest_field(name="qnaId", visibility=["read", "create", "update", "delete", "query"])
"""Exact QnA ID to fetch from the knowledge base, this field takes priority over question."""
question: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""User question to query against the knowledge base."""
top: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Max number of answers to be returned for the question."""
user_id: Optional[str] = rest_field(name="userId", visibility=["read", "create", "update", "delete", "query"])
"""Unique identifier for the user."""
confidence_threshold: Optional[float] = rest_field(
name="confidenceScoreThreshold", visibility=["read", "create", "update", "delete", "query"]
)
"""Minimum threshold score for answers, value ranges from 0 to 1."""
answer_context: Optional["_models.KnowledgeBaseAnswerContext"] = rest_field(
name="context", visibility=["read", "create", "update", "delete", "query"]
)
"""Context object with previous QnA's information."""
ranker_kind: Optional[Union[str, "_models.RankerKind"]] = rest_field(
name="rankerType", visibility=["read", "create", "update", "delete", "query"]
)
"""Type of ranker to be used. Known values are: \"Default\" and \"QuestionOnly\"."""
filters: Optional["_models.QueryFilters"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Filter QnAs based on given metadata list and knowledge base sources."""
short_answer_options: Optional["_models.ShortAnswerConfig"] = rest_field(
name="answerSpanRequest", visibility=["read", "create", "update", "delete", "query"]
)
"""To configure Answer span prediction feature."""
include_unstructured_sources: Optional[bool] = rest_field(
name="includeUnstructuredSources", visibility=["read", "create", "update", "delete", "query"]
)
"""(Optional) Flag to enable Query over Unstructured Sources."""
@overload
def __init__(
self,
*,
qna_id: Optional[int] = None,
question: Optional[str] = None,
top: Optional[int] = None,
user_id: Optional[str] = None,
confidence_threshold: Optional[float] = None,
answer_context: Optional["_models.KnowledgeBaseAnswerContext"] = None,
ranker_kind: Optional[Union[str, "_models.RankerKind"]] = None,
filters: Optional["_models.QueryFilters"] = None,
short_answer_options: Optional["_models.ShortAnswerConfig"] = None,
include_unstructured_sources: Optional[bool] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class RedactedTranscriptContent(_Model):
"""Transcript content response that the service generates, with all necessary personally
identifiable information redacted.
:ivar inverse_text_normalized: Redacted output for input in inverse-text-normalized format.
:vartype inverse_text_normalized: str
:ivar masked_inverse_text_normalized: Redacted output for input in masked
inverse-text-normalized format.
:vartype masked_inverse_text_normalized: str
:ivar text: Redacted output for input in text (Microsoft's speech-to-text 'display') format.
:vartype text: str
:ivar lexical: Redacted output for input in lexical format.
:vartype lexical: str
:ivar audio_timings: List of redacted audio segments.
:vartype audio_timings: list[~azure.ai.language.conversations.models.AudioTiming]
"""
inverse_text_normalized: Optional[str] = rest_field(
name="itn", visibility=["read", "create", "update", "delete", "query"]
)
"""Redacted output for input in inverse-text-normalized format."""
masked_inverse_text_normalized: Optional[str] = rest_field(
name="maskedItn", visibility=["read", "create", "update", "delete", "query"]
)
"""Redacted output for input in masked inverse-text-normalized format."""
text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Redacted output for input in text (Microsoft's speech-to-text 'display') format."""
lexical: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Redacted output for input in lexical format."""
audio_timings: Optional[List["_models.AudioTiming"]] = rest_field(
name="audioTimings", visibility=["read", "create", "update", "delete", "query"]
)
"""List of redacted audio segments."""
@overload
def __init__(
self,
*,
inverse_text_normalized: Optional[str] = None,
masked_inverse_text_normalized: Optional[str] = None,
text: Optional[str] = None,
lexical: Optional[str] = None,
audio_timings: Optional[List["_models.AudioTiming"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class RegexKey(ConversationEntityExtraInformation, discriminator="RegexKey"):
"""The regex key extra data kind.
:ivar extra_information_kind: The regex key extra data kind. Required. Regex key extra
information kind
:vartype extra_information_kind: str or ~azure.ai.language.conversations.models.REGEX_KEY
:ivar key: The key of the regex pattern used in extracting the entity.
:vartype key: str
:ivar regex_pattern: The .NET regex pattern used in extracting the entity. Please visit
`https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions
<https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions>`_ for more
information about .NET regular expressions.
:vartype regex_pattern: str
"""
extra_information_kind: Literal[ExtraInformationKind.REGEX_KEY] = rest_discriminator(name="extraInformationKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The regex key extra data kind. Required. Regex key extra information kind"""
key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The key of the regex pattern used in extracting the entity."""
regex_pattern: Optional[str] = rest_field(
name="regexPattern", visibility=["read", "create", "update", "delete", "query"]
)
"""The .NET regex pattern used in extracting the entity. Please visit
`https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions
<https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions>`_ for more
information about .NET regular expressions."""
@overload
def __init__(
self,
*,
key: Optional[str] = None,
regex_pattern: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, extra_information_kind=ExtraInformationKind.REGEX_KEY, **kwargs)
class RequestStatistics(_Model):
"""if showStats=true was specified in the request this field will contain information about the
request payload.
:ivar documents_count: Number of documents submitted in the request. Required.
:vartype documents_count: int
:ivar valid_documents_count: Number of valid documents. This excludes empty, over-size limit or
non-supported languages documents. Required.
:vartype valid_documents_count: int
:ivar erroneous_documents_count: Number of invalid documents. This includes empty, over-size
limit or non-supported languages documents. Required.
:vartype erroneous_documents_count: int
:ivar transactions_count: Number of transactions for the request. Required.
:vartype transactions_count: int
"""
documents_count: int = rest_field(name="documentsCount", visibility=["read", "create", "update", "delete", "query"])
"""Number of documents submitted in the request. Required."""
valid_documents_count: int = rest_field(
name="validDocumentsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of valid documents. This excludes empty, over-size limit or non-supported languages
documents. Required."""
erroneous_documents_count: int = rest_field(
name="erroneousDocumentsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of invalid documents. This includes empty, over-size limit or non-supported languages
documents. Required."""
transactions_count: int = rest_field(
name="transactionsCount", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of transactions for the request. Required."""
@overload
def __init__(
self,
*,
documents_count: int,
valid_documents_count: int,
erroneous_documents_count: int,
transactions_count: int,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class ShortAnswerConfig(_Model):
"""To configure Answer span prediction feature.
:ivar enable: Enable or disable Answer Span prediction.
:vartype enable: bool
:ivar confidence_threshold: Minimum threshold score required to include an answer span, value
ranges from 0 to 1.
:vartype confidence_threshold: float
:ivar top: Number of Top answers to be considered for span prediction from 1 to 10.
:vartype top: int
"""
enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Enable or disable Answer Span prediction."""
confidence_threshold: Optional[float] = rest_field(
name="confidenceScoreThreshold", visibility=["read", "create", "update", "delete", "query"]
)
"""Minimum threshold score required to include an answer span, value ranges from 0 to 1."""
top: Optional[int] = rest_field(
name="topAnswersWithSpan", visibility=["read", "create", "update", "delete", "query"]
)
"""Number of Top answers to be considered for span prediction from 1 to 10."""
@overload
def __init__(
self,
*,
enable: Optional[bool] = None,
confidence_threshold: Optional[float] = None,
top: Optional[int] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class SpeedResolution(ResolutionBase, discriminator="SpeedResolution"):
"""Represents the speed entity resolution model.
:ivar resolution_kind: Represents the speed entity resolution model. Required. Resolution of a
speed entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.SPEED_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The speed Unit of measurement. Required. Known values are: "Unspecified",
"MetersPerSecond", "KilometersPerHour", "KilometersPerMinute", "KilometersPerSecond",
"MilesPerHour", "Knot", "FootPerSecond", "FootPerMinute", "YardsPerMinute", "YardsPerSecond",
"MetersPerMillisecond", "CentimetersPerMillisecond", and "KilometersPerMillisecond".
:vartype unit: str or ~azure.ai.language.conversations.models.SpeedUnit
"""
resolution_kind: Literal[ResolutionKind.SPEED_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the speed entity resolution model. Required. Resolution of a speed entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.SpeedUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The speed Unit of measurement. Required. Known values are: \"Unspecified\",
\"MetersPerSecond\", \"KilometersPerHour\", \"KilometersPerMinute\", \"KilometersPerSecond\",
\"MilesPerHour\", \"Knot\", \"FootPerSecond\", \"FootPerMinute\", \"YardsPerMinute\",
\"YardsPerSecond\", \"MetersPerMillisecond\", \"CentimetersPerMillisecond\", and
\"KilometersPerMillisecond\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.SpeedUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.SPEED_RESOLUTION, **kwargs)
class SummarizationOperationAction(AnalyzeConversationOperationAction, discriminator="ConversationalSummarizationTask"):
"""Task definition for conversational summarization.
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Conversational Summarization Task
:vartype kind: str or ~azure.ai.language.conversations.models.CONVERSATIONAL_SUMMARIZATION_TASK
:ivar action_content: parameters.
:vartype action_content:
~azure.ai.language.conversations.models._models.ConversationSummarizationActionContent
"""
kind: Literal[AnalyzeConversationOperationActionKind.CONVERSATIONAL_SUMMARIZATION_TASK] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Conversational Summarization Task"""
action_content: Optional["_models._models.ConversationSummarizationActionContent"] = rest_field(
name="parameters", visibility=["read", "create", "update", "delete", "query"]
)
"""parameters."""
@overload
def __init__(
self,
*,
name: Optional[str] = None,
action_content: Optional["_models._models.ConversationSummarizationActionContent"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationOperationActionKind.CONVERSATIONAL_SUMMARIZATION_TASK, **kwargs)
class SummarizationOperationResult(
AnalyzeConversationOperationResult, discriminator="conversationalSummarizationResults"
):
"""Result for the summarization task on the conversation.
:ivar last_update_date_time: The last updated time in UTC for the task. Required.
:vartype last_update_date_time: ~datetime.datetime
:ivar status: The status of the task at the mentioned last update time. Required. Known values
are: "notStarted", "running", "succeeded", "partiallyCompleted", "failed", "cancelled", and
"cancelling".
:vartype status: str or ~azure.ai.language.conversations.models.ConversationActionState
:ivar name: task name.
:vartype name: str
:ivar kind: discriminator kind. Required. Conversational Summarization Results
:vartype kind: str or ~azure.ai.language.conversations.models.SUMMARIZATION_OPERATION_RESULTS
:ivar results: results. Required.
:vartype results: ~azure.ai.language.conversations.models.SummaryResult
"""
kind: Literal[AnalyzeConversationOperationResultsKind.SUMMARIZATION_OPERATION_RESULTS] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""discriminator kind. Required. Conversational Summarization Results"""
results: "_models.SummaryResult" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""results. Required."""
@overload
def __init__(
self,
*,
last_update_date_time: datetime.datetime,
status: Union[str, "_models.ConversationActionState"],
results: "_models.SummaryResult",
name: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, kind=AnalyzeConversationOperationResultsKind.SUMMARIZATION_OPERATION_RESULTS, **kwargs)
class SummaryResult(_Model):
"""Summary Results.
:ivar conversations: array of conversations. Required.
:vartype conversations:
list[~azure.ai.language.conversations.models.ConversationsSummaryResult]
:ivar errors: Errors by document id. Required.
:vartype errors: list[~azure.ai.language.conversations.models.DocumentError]
:ivar statistics: statistics.
:vartype statistics: ~azure.ai.language.conversations.models.RequestStatistics
:ivar model_version: This field indicates which model is used for scoring. Required.
:vartype model_version: str
"""
conversations: List["_models.ConversationsSummaryResult"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""array of conversations. Required."""
errors: List["_models.DocumentError"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Errors by document id. Required."""
statistics: Optional["_models.RequestStatistics"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""statistics."""
model_version: str = rest_field(name="modelVersion", visibility=["read", "create", "update", "delete", "query"])
"""This field indicates which model is used for scoring. Required."""
@overload
def __init__(
self,
*,
conversations: List["_models.ConversationsSummaryResult"],
errors: List["_models.DocumentError"],
model_version: str,
statistics: Optional["_models.RequestStatistics"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class SummaryResultItem(_Model):
"""Summary Result Item.
:ivar aspect: aspect. Required.
:vartype aspect: str
:ivar text: text. Required.
:vartype text: str
:ivar contexts: Context list of the summary.
:vartype contexts: list[~azure.ai.language.conversations.models.ItemizedSummaryContext]
"""
aspect: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""aspect. Required."""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""text. Required."""
contexts: Optional[List["_models.ItemizedSummaryContext"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Context list of the summary."""
@overload
def __init__(
self,
*,
aspect: str,
text: str,
contexts: Optional[List["_models.ItemizedSummaryContext"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class TemperatureResolution(ResolutionBase, discriminator="TemperatureResolution"):
"""Represents the temperature entity resolution model.
:ivar resolution_kind: Represents the temperature entity resolution model. Required. Resolution
of a temperature entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.TEMPERATURE_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The temperature Unit of measurement. Required. Known values are: "Unspecified",
"Fahrenheit", "Kelvin", "Rankine", and "Celsius".
:vartype unit: str or ~azure.ai.language.conversations.models.TemperatureUnit
"""
resolution_kind: Literal[ResolutionKind.TEMPERATURE_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the temperature entity resolution model. Required. Resolution of a temperature
entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.TemperatureUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The temperature Unit of measurement. Required. Known values are: \"Unspecified\",
\"Fahrenheit\", \"Kelvin\", \"Rankine\", and \"Celsius\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.TemperatureUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.TEMPERATURE_RESOLUTION, **kwargs)
class TemporalSpanResolution(ResolutionBase, discriminator="TemporalSpanResolution"):
"""represents the resolution of a date and/or time span.
:ivar resolution_kind: represents the resolution of a date and/or time span. Required.
Resolution of a temporal span entity
:vartype resolution_kind: str or
~azure.ai.language.conversations.models.TEMPORAL_SPAN_RESOLUTION
:ivar begin: represents the resolution of a date and/or time span. An extended ISO 8601
date/time representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_).
:vartype begin: str
:ivar end: represents the resolution of a date and/or time span. An extended ISO 8601 date/time
representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_).
:vartype end: str
:ivar duration: An optional duration value formatted based on the ISO 8601
(`https://en.wikipedia.org/wiki/ISO_8601#Durations
<https://en.wikipedia.org/wiki/ISO_8601#Durations>`_).
:vartype duration: str
:ivar modifier: An optional modifier of a date/time instance. Known values are: "AfterApprox",
"Before", "BeforeStart", "Approx", "ReferenceUndefined", "SinceEnd", "AfterMid", "Start",
"After", "BeforeEnd", "Until", "End", "Less", "Since", "AfterStart", "BeforeApprox", "Mid", and
"More".
:vartype modifier: str or ~azure.ai.language.conversations.models.TemporalModifier
:ivar timex: An optional triplet containing the beginning, the end, and the duration all stated
as ISO 8601 formatted strings.
:vartype timex: str
"""
resolution_kind: Literal[ResolutionKind.TEMPORAL_SPAN_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""represents the resolution of a date and/or time span. Required. Resolution of a temporal span
entity"""
begin: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""represents the resolution of a date and/or time span. An extended ISO 8601 date/time
representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_)."""
end: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""represents the resolution of a date and/or time span. An extended ISO 8601 date/time
representation as described in
(`https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml
<https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml>`_)."""
duration: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""An optional duration value formatted based on the ISO 8601
(`https://en.wikipedia.org/wiki/ISO_8601#Durations
<https://en.wikipedia.org/wiki/ISO_8601#Durations>`_)."""
modifier: Optional[Union[str, "_models.TemporalModifier"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""An optional modifier of a date/time instance. Known values are: \"AfterApprox\", \"Before\",
\"BeforeStart\", \"Approx\", \"ReferenceUndefined\", \"SinceEnd\", \"AfterMid\", \"Start\",
\"After\", \"BeforeEnd\", \"Until\", \"End\", \"Less\", \"Since\", \"AfterStart\",
\"BeforeApprox\", \"Mid\", and \"More\"."""
timex: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601
formatted strings."""
@overload
def __init__(
self,
*,
begin: Optional[str] = None,
end: Optional[str] = None,
duration: Optional[str] = None,
modifier: Optional[Union[str, "_models.TemporalModifier"]] = None,
timex: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.TEMPORAL_SPAN_RESOLUTION, **kwargs)
class TextConversation(ConversationInput, discriminator="text"):
"""model for text conversation.
:ivar id: Unique identifier for the conversation. Required.
:vartype id: str
:ivar language: Language of the conversation item in BCP-47 format. Required.
:vartype language: str
:ivar domain: domain. Known values are: "finance", "healthcare", and "generic".
:vartype domain: str or ~azure.ai.language.conversations.models.ConversationDomain
:ivar modality: modality discriminator. Required. Text input modality
:vartype modality: str or ~azure.ai.language.conversations.models.TEXT
:ivar conversation_items: Ordered list of text conversation items in the conversation.
Required.
:vartype conversation_items: list[~azure.ai.language.conversations.models.TextConversationItem]
"""
modality: Literal[InputModality.TEXT] = rest_discriminator(name="modality", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""modality discriminator. Required. Text input modality"""
conversation_items: List["_models.TextConversationItem"] = rest_field(
name="conversationItems", visibility=["read", "create", "update", "delete", "query"]
)
"""Ordered list of text conversation items in the conversation. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
language: str,
conversation_items: List["_models.TextConversationItem"],
domain: Optional[Union[str, "_models.ConversationDomain"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, modality=InputModality.TEXT, **kwargs)
class TextConversationItem(_Model):
"""The text modality of an input conversation.
:ivar id: The ID of a conversation item. Required.
:vartype id: str
:ivar participant_id: The participant ID of a conversation item. Required.
:vartype participant_id: str
:ivar language: The override language of a conversation item in BCP 47 language representation.
:vartype language: str
:ivar modality: Enumeration of supported conversational modalities. Known values are:
"transcript" and "text".
:vartype modality: str or ~azure.ai.language.conversations.models.InputModality
:ivar role: Role of the participant. Known values are: "customer", "agent", and "generic".
:vartype role: str or ~azure.ai.language.conversations.models.ParticipantRole
:ivar text: The text input. Required.
:vartype text: str
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The ID of a conversation item. Required."""
participant_id: str = rest_field(name="participantId", visibility=["read", "create", "update", "delete", "query"])
"""The participant ID of a conversation item. Required."""
language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The override language of a conversation item in BCP 47 language representation."""
modality: Optional[Union[str, "_models.InputModality"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Enumeration of supported conversational modalities. Known values are: \"transcript\" and
\"text\"."""
role: Optional[Union[str, "_models.ParticipantRole"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Role of the participant. Known values are: \"customer\", \"agent\", and \"generic\"."""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The text input. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
participant_id: str,
text: str,
language: Optional[str] = None,
modality: Optional[Union[str, "_models.InputModality"]] = None,
role: Optional[Union[str, "_models.ParticipantRole"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class TranscriptConversation(ConversationInput, discriminator="transcript"):
"""model for transcript conversation.
:ivar id: Unique identifier for the conversation. Required.
:vartype id: str
:ivar language: Language of the conversation item in BCP-47 format. Required.
:vartype language: str
:ivar domain: domain. Known values are: "finance", "healthcare", and "generic".
:vartype domain: str or ~azure.ai.language.conversations.models.ConversationDomain
:ivar modality: modality discriminator. Required. Transcript input modality
:vartype modality: str or ~azure.ai.language.conversations.models.TRANSCRIPT
:ivar conversation_items: Ordered list of transcript conversation items in the conversation.
Required.
:vartype conversation_items:
list[~azure.ai.language.conversations.models._models.TranscriptConversationItem]
"""
modality: Literal[InputModality.TRANSCRIPT] = rest_discriminator(name="modality", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""modality discriminator. Required. Transcript input modality"""
conversation_items: List["_models._models.TranscriptConversationItem"] = rest_field(
name="conversationItems", visibility=["read", "create", "update", "delete", "query"]
)
"""Ordered list of transcript conversation items in the conversation. Required."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
language: str,
conversation_items: List["_models._models.TranscriptConversationItem"],
domain: Optional[Union[str, "_models.ConversationDomain"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, modality=InputModality.TRANSCRIPT, **kwargs)
class TranscriptConversationItem(_Model):
"""Additional properties for supporting transcript conversation.
:ivar id: The ID of a conversation item. Required.
:vartype id: str
:ivar participant_id: The participant ID of a conversation item. Required.
:vartype participant_id: str
:ivar language: The override language of a conversation item in BCP 47 language representation.
:vartype language: str
:ivar modality: Enumeration of supported conversational modalities. Known values are:
"transcript" and "text".
:vartype modality: str or ~azure.ai.language.conversations.models.InputModality
:ivar role: Role of the participant. Known values are: "customer", "agent", and "generic".
:vartype role: str or ~azure.ai.language.conversations.models.ParticipantRole
:ivar inverse_text_normalized: Inverse text normalization (ITN) representation of input. The
inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with
phone numbers, numbers, abbreviations, and other transformations applied. Required.
:vartype inverse_text_normalized: str
:ivar masked_inverse_text_normalized: Inverse-text-normalized format with profanity masking
applied. Required.
:vartype masked_inverse_text_normalized: str
:ivar text: Display form of the recognized text from the speech-to-text API, with punctuation
and capitalization added. Required.
:vartype text: str
:ivar lexical: Lexical form of the recognized text from the speech-to-text API, with the actual
words recognized. Required.
:vartype lexical: str
:ivar word_level_timings: List of word-level audio timing information.
:vartype word_level_timings:
list[~azure.ai.language.conversations.models._models.WordLevelTiming]
:ivar conversation_item_level_timing: Audio timing at the conversation item level. This still
can help with AI quality if word-level audio timings are not available.
:vartype conversation_item_level_timing:
~azure.ai.language.conversations.models._models.ConversationItemLevelTiming
"""
id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The ID of a conversation item. Required."""
participant_id: str = rest_field(name="participantId", visibility=["read", "create", "update", "delete", "query"])
"""The participant ID of a conversation item. Required."""
language: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The override language of a conversation item in BCP 47 language representation."""
modality: Optional[Union[str, "_models.InputModality"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Enumeration of supported conversational modalities. Known values are: \"transcript\" and
\"text\"."""
role: Optional[Union[str, "_models.ParticipantRole"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""Role of the participant. Known values are: \"customer\", \"agent\", and \"generic\"."""
inverse_text_normalized: str = rest_field(name="itn", visibility=["read", "create", "update", "delete", "query"])
"""Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is
the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers,
abbreviations, and other transformations applied. Required."""
masked_inverse_text_normalized: str = rest_field(
name="maskedItn", visibility=["read", "create", "update", "delete", "query"]
)
"""Inverse-text-normalized format with profanity masking applied. Required."""
text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Display form of the recognized text from the speech-to-text API, with punctuation and
capitalization added. Required."""
lexical: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Lexical form of the recognized text from the speech-to-text API, with the actual words
recognized. Required."""
word_level_timings: Optional[List["_models._models.WordLevelTiming"]] = rest_field(
name="wordLevelTimings", visibility=["read", "create", "update", "delete", "query"]
)
"""List of word-level audio timing information."""
conversation_item_level_timing: Optional["_models._models.ConversationItemLevelTiming"] = rest_field(
name="conversationItemLevelTiming", visibility=["read", "create", "update", "delete", "query"]
)
"""Audio timing at the conversation item level. This still can help with AI quality if word-level
audio timings are not available."""
@overload
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
participant_id: str,
inverse_text_normalized: str,
masked_inverse_text_normalized: str,
text: str,
lexical: str,
language: Optional[str] = None,
modality: Optional[Union[str, "_models.InputModality"]] = None,
role: Optional[Union[str, "_models.ParticipantRole"]] = None,
word_level_timings: Optional[List["_models._models.WordLevelTiming"]] = None,
conversation_item_level_timing: Optional["_models._models.ConversationItemLevelTiming"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
class VolumeResolution(ResolutionBase, discriminator="VolumeResolution"):
"""Represents the volume entity resolution model.
:ivar resolution_kind: Represents the volume entity resolution model. Required. Resolution of a
volume entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.VOLUME_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The Volume Unit of measurement. Required. Known values are: "Unspecified",
"CubicMeter", "CubicCentimeter", "CubicMillimeter", "Hectoliter", "Decaliter", "Liter",
"Centiliter", "Milliliter", "CubicYard", "CubicInch", "CubicFoot", "CubicMile", "FluidOunce",
"Teaspoon", "Tablespoon", "Pint", "Quart", "Cup", "Gill", "Pinch", "FluidDram", "Barrel",
"Minim", "Cord", "Peck", "Bushel", and "Hogshead".
:vartype unit: str or ~azure.ai.language.conversations.models.VolumeUnit
"""
resolution_kind: Literal[ResolutionKind.VOLUME_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the volume entity resolution model. Required. Resolution of a volume entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.VolumeUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The Volume Unit of measurement. Required. Known values are: \"Unspecified\", \"CubicMeter\",
\"CubicCentimeter\", \"CubicMillimeter\", \"Hectoliter\", \"Decaliter\", \"Liter\",
\"Centiliter\", \"Milliliter\", \"CubicYard\", \"CubicInch\", \"CubicFoot\", \"CubicMile\",
\"FluidOunce\", \"Teaspoon\", \"Tablespoon\", \"Pint\", \"Quart\", \"Cup\", \"Gill\",
\"Pinch\", \"FluidDram\", \"Barrel\", \"Minim\", \"Cord\", \"Peck\", \"Bushel\", and
\"Hogshead\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.VolumeUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.VOLUME_RESOLUTION, **kwargs)
class WeightResolution(ResolutionBase, discriminator="WeightResolution"):
"""Represents the weight entity resolution model.
:ivar resolution_kind: Represents the weight entity resolution model. Required. Resolution of a
weight entity
:vartype resolution_kind: str or ~azure.ai.language.conversations.models.WEIGHT_RESOLUTION
:ivar value: The numeric value that the extracted text denotes. Required.
:vartype value: float
:ivar unit: The weight Unit of measurement. Required. Known values are: "Unspecified",
"Kilogram", "Gram", "Milligram", "Gallon", "MetricTon", "Ton", "Pound", "Ounce", "Grain",
"PennyWeight", "LongTonBritish", "ShortTonUS", "ShortHundredWeightUS", "Stone", and "Dram".
:vartype unit: str or ~azure.ai.language.conversations.models.WeightUnit
"""
resolution_kind: Literal[ResolutionKind.WEIGHT_RESOLUTION] = rest_discriminator(name="resolutionKind", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""Represents the weight entity resolution model. Required. Resolution of a weight entity"""
value: float = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The numeric value that the extracted text denotes. Required."""
unit: Union[str, "_models.WeightUnit"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The weight Unit of measurement. Required. Known values are: \"Unspecified\", \"Kilogram\",
\"Gram\", \"Milligram\", \"Gallon\", \"MetricTon\", \"Ton\", \"Pound\", \"Ounce\", \"Grain\",
\"PennyWeight\", \"LongTonBritish\", \"ShortTonUS\", \"ShortHundredWeightUS\", \"Stone\", and
\"Dram\"."""
@overload
def __init__(
self,
*,
value: float,
unit: Union[str, "_models.WeightUnit"],
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, resolution_kind=ResolutionKind.WEIGHT_RESOLUTION, **kwargs)
class WordLevelTiming(_Model):
"""Word-level timing information that the speech-to-text API generates. The words in this object
should have 1:1 correspondence with the lexical input to allow for audio redaction.
:ivar offset: Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds.
:vartype offset: int
:ivar duration: Duration of word articulation, in ticks. 1 tick = 100 nanoseconds.
:vartype duration: int
:ivar word: Recognized word.
:vartype word: str
"""
offset: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds."""
duration: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Duration of word articulation, in ticks. 1 tick = 100 nanoseconds."""
word: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Recognized word."""
@overload
def __init__(
self,
*,
offset: Optional[int] = None,
duration: Optional[int] = None,
word: Optional[str] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
|