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
|
package machinelearningservices
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/machinelearningservices/mgmt/2020-03-01/machinelearningservices"
// AllocationState enumerates the values for allocation state.
type AllocationState string
const (
// Resizing ...
Resizing AllocationState = "Resizing"
// Steady ...
Steady AllocationState = "Steady"
)
// PossibleAllocationStateValues returns an array of possible values for the AllocationState const type.
func PossibleAllocationStateValues() []AllocationState {
return []AllocationState{Resizing, Steady}
}
// ComputeType enumerates the values for compute type.
type ComputeType string
const (
// ComputeTypeAKS ...
ComputeTypeAKS ComputeType = "AKS"
// ComputeTypeAmlCompute ...
ComputeTypeAmlCompute ComputeType = "AmlCompute"
// ComputeTypeDatabricks ...
ComputeTypeDatabricks ComputeType = "Databricks"
// ComputeTypeDataFactory ...
ComputeTypeDataFactory ComputeType = "DataFactory"
// ComputeTypeDataLakeAnalytics ...
ComputeTypeDataLakeAnalytics ComputeType = "DataLakeAnalytics"
// ComputeTypeHDInsight ...
ComputeTypeHDInsight ComputeType = "HDInsight"
// ComputeTypeVirtualMachine ...
ComputeTypeVirtualMachine ComputeType = "VirtualMachine"
)
// PossibleComputeTypeValues returns an array of possible values for the ComputeType const type.
func PossibleComputeTypeValues() []ComputeType {
return []ComputeType{ComputeTypeAKS, ComputeTypeAmlCompute, ComputeTypeDatabricks, ComputeTypeDataFactory, ComputeTypeDataLakeAnalytics, ComputeTypeHDInsight, ComputeTypeVirtualMachine}
}
// ComputeTypeBasicCompute enumerates the values for compute type basic compute.
type ComputeTypeBasicCompute string
const (
// ComputeTypeAKS1 ...
ComputeTypeAKS1 ComputeTypeBasicCompute = "AKS"
// ComputeTypeAmlCompute1 ...
ComputeTypeAmlCompute1 ComputeTypeBasicCompute = "AmlCompute"
// ComputeTypeCompute ...
ComputeTypeCompute ComputeTypeBasicCompute = "Compute"
// ComputeTypeDatabricks1 ...
ComputeTypeDatabricks1 ComputeTypeBasicCompute = "Databricks"
// ComputeTypeDataFactory1 ...
ComputeTypeDataFactory1 ComputeTypeBasicCompute = "DataFactory"
// ComputeTypeDataLakeAnalytics1 ...
ComputeTypeDataLakeAnalytics1 ComputeTypeBasicCompute = "DataLakeAnalytics"
// ComputeTypeHDInsight1 ...
ComputeTypeHDInsight1 ComputeTypeBasicCompute = "HDInsight"
// ComputeTypeVirtualMachine1 ...
ComputeTypeVirtualMachine1 ComputeTypeBasicCompute = "VirtualMachine"
)
// PossibleComputeTypeBasicComputeValues returns an array of possible values for the ComputeTypeBasicCompute const type.
func PossibleComputeTypeBasicComputeValues() []ComputeTypeBasicCompute {
return []ComputeTypeBasicCompute{ComputeTypeAKS1, ComputeTypeAmlCompute1, ComputeTypeCompute, ComputeTypeDatabricks1, ComputeTypeDataFactory1, ComputeTypeDataLakeAnalytics1, ComputeTypeHDInsight1, ComputeTypeVirtualMachine1}
}
// ComputeTypeBasicComputeNodesInformation enumerates the values for compute type basic compute nodes
// information.
type ComputeTypeBasicComputeNodesInformation string
const (
// ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute ...
ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute ComputeTypeBasicComputeNodesInformation = "AmlCompute"
// ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation ...
ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation ComputeTypeBasicComputeNodesInformation = "ComputeNodesInformation"
)
// PossibleComputeTypeBasicComputeNodesInformationValues returns an array of possible values for the ComputeTypeBasicComputeNodesInformation const type.
func PossibleComputeTypeBasicComputeNodesInformationValues() []ComputeTypeBasicComputeNodesInformation {
return []ComputeTypeBasicComputeNodesInformation{ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute, ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation}
}
// ComputeTypeBasicComputeSecrets enumerates the values for compute type basic compute secrets.
type ComputeTypeBasicComputeSecrets string
const (
// ComputeTypeBasicComputeSecretsComputeTypeAKS ...
ComputeTypeBasicComputeSecretsComputeTypeAKS ComputeTypeBasicComputeSecrets = "AKS"
// ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ...
ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets ComputeTypeBasicComputeSecrets = "ComputeSecrets"
// ComputeTypeBasicComputeSecretsComputeTypeDatabricks ...
ComputeTypeBasicComputeSecretsComputeTypeDatabricks ComputeTypeBasicComputeSecrets = "Databricks"
// ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ...
ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine ComputeTypeBasicComputeSecrets = "VirtualMachine"
)
// PossibleComputeTypeBasicComputeSecretsValues returns an array of possible values for the ComputeTypeBasicComputeSecrets const type.
func PossibleComputeTypeBasicComputeSecretsValues() []ComputeTypeBasicComputeSecrets {
return []ComputeTypeBasicComputeSecrets{ComputeTypeBasicComputeSecretsComputeTypeAKS, ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets, ComputeTypeBasicComputeSecretsComputeTypeDatabricks, ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine}
}
// EncryptionStatus enumerates the values for encryption status.
type EncryptionStatus string
const (
// Disabled ...
Disabled EncryptionStatus = "Disabled"
// Enabled ...
Enabled EncryptionStatus = "Enabled"
)
// PossibleEncryptionStatusValues returns an array of possible values for the EncryptionStatus const type.
func PossibleEncryptionStatusValues() []EncryptionStatus {
return []EncryptionStatus{Disabled, Enabled}
}
// NodeState enumerates the values for node state.
type NodeState string
const (
// Idle ...
Idle NodeState = "idle"
// Leaving ...
Leaving NodeState = "leaving"
// Preempted ...
Preempted NodeState = "preempted"
// Preparing ...
Preparing NodeState = "preparing"
// Running ...
Running NodeState = "running"
// Unusable ...
Unusable NodeState = "unusable"
)
// PossibleNodeStateValues returns an array of possible values for the NodeState const type.
func PossibleNodeStateValues() []NodeState {
return []NodeState{Idle, Leaving, Preempted, Preparing, Running, Unusable}
}
// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection
// provisioning state.
type PrivateEndpointConnectionProvisioningState string
const (
// Creating ...
Creating PrivateEndpointConnectionProvisioningState = "Creating"
// Deleting ...
Deleting PrivateEndpointConnectionProvisioningState = "Deleting"
// Failed ...
Failed PrivateEndpointConnectionProvisioningState = "Failed"
// Succeeded ...
Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)
// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type.
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Failed, Succeeded}
}
// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status.
type PrivateEndpointServiceConnectionStatus string
const (
// Approved ...
Approved PrivateEndpointServiceConnectionStatus = "Approved"
// Disconnected ...
Disconnected PrivateEndpointServiceConnectionStatus = "Disconnected"
// Pending ...
Pending PrivateEndpointServiceConnectionStatus = "Pending"
// Rejected ...
Rejected PrivateEndpointServiceConnectionStatus = "Rejected"
// Timeout ...
Timeout PrivateEndpointServiceConnectionStatus = "Timeout"
)
// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type.
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus {
return []PrivateEndpointServiceConnectionStatus{Approved, Disconnected, Pending, Rejected, Timeout}
}
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
const (
// ProvisioningStateCanceled ...
ProvisioningStateCanceled ProvisioningState = "Canceled"
// ProvisioningStateCreating ...
ProvisioningStateCreating ProvisioningState = "Creating"
// ProvisioningStateDeleting ...
ProvisioningStateDeleting ProvisioningState = "Deleting"
// ProvisioningStateFailed ...
ProvisioningStateFailed ProvisioningState = "Failed"
// ProvisioningStateSucceeded ...
ProvisioningStateSucceeded ProvisioningState = "Succeeded"
// ProvisioningStateUnknown ...
ProvisioningStateUnknown ProvisioningState = "Unknown"
// ProvisioningStateUpdating ...
ProvisioningStateUpdating ProvisioningState = "Updating"
)
// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
func PossibleProvisioningStateValues() []ProvisioningState {
return []ProvisioningState{ProvisioningStateCanceled, ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateSucceeded, ProvisioningStateUnknown, ProvisioningStateUpdating}
}
// QuotaUnit enumerates the values for quota unit.
type QuotaUnit string
const (
// Count ...
Count QuotaUnit = "Count"
)
// PossibleQuotaUnitValues returns an array of possible values for the QuotaUnit const type.
func PossibleQuotaUnitValues() []QuotaUnit {
return []QuotaUnit{Count}
}
// ReasonCode enumerates the values for reason code.
type ReasonCode string
const (
// NotAvailableForRegion ...
NotAvailableForRegion ReasonCode = "NotAvailableForRegion"
// NotAvailableForSubscription ...
NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription"
// NotSpecified ...
NotSpecified ReasonCode = "NotSpecified"
)
// PossibleReasonCodeValues returns an array of possible values for the ReasonCode const type.
func PossibleReasonCodeValues() []ReasonCode {
return []ReasonCode{NotAvailableForRegion, NotAvailableForSubscription, NotSpecified}
}
// RemoteLoginPortPublicAccess enumerates the values for remote login port public access.
type RemoteLoginPortPublicAccess string
const (
// RemoteLoginPortPublicAccessDisabled ...
RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = "Disabled"
// RemoteLoginPortPublicAccessEnabled ...
RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = "Enabled"
// RemoteLoginPortPublicAccessNotSpecified ...
RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = "NotSpecified"
)
// PossibleRemoteLoginPortPublicAccessValues returns an array of possible values for the RemoteLoginPortPublicAccess const type.
func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess {
return []RemoteLoginPortPublicAccess{RemoteLoginPortPublicAccessDisabled, RemoteLoginPortPublicAccessEnabled, RemoteLoginPortPublicAccessNotSpecified}
}
// ResourceIdentityType enumerates the values for resource identity type.
type ResourceIdentityType string
const (
// SystemAssigned ...
SystemAssigned ResourceIdentityType = "SystemAssigned"
)
// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
return []ResourceIdentityType{SystemAssigned}
}
// Status enumerates the values for status.
type Status string
const (
// Failure ...
Failure Status = "Failure"
// InvalidQuotaBelowClusterMinimum ...
InvalidQuotaBelowClusterMinimum Status = "InvalidQuotaBelowClusterMinimum"
// InvalidQuotaExceedsSubscriptionLimit ...
InvalidQuotaExceedsSubscriptionLimit Status = "InvalidQuotaExceedsSubscriptionLimit"
// InvalidVMFamilyName ...
InvalidVMFamilyName Status = "InvalidVMFamilyName"
// OperationNotEnabledForRegion ...
OperationNotEnabledForRegion Status = "OperationNotEnabledForRegion"
// OperationNotSupportedForSku ...
OperationNotSupportedForSku Status = "OperationNotSupportedForSku"
// Success ...
Success Status = "Success"
// Undefined ...
Undefined Status = "Undefined"
)
// PossibleStatusValues returns an array of possible values for the Status const type.
func PossibleStatusValues() []Status {
return []Status{Failure, InvalidQuotaBelowClusterMinimum, InvalidQuotaExceedsSubscriptionLimit, InvalidVMFamilyName, OperationNotEnabledForRegion, OperationNotSupportedForSku, Success, Undefined}
}
// Status1 enumerates the values for status 1.
type Status1 string
const (
// Status1Disabled ...
Status1Disabled Status1 = "Disabled"
// Status1Enabled ...
Status1Enabled Status1 = "Enabled"
)
// PossibleStatus1Values returns an array of possible values for the Status1 const type.
func PossibleStatus1Values() []Status1 {
return []Status1{Status1Disabled, Status1Enabled}
}
// UnderlyingResourceAction enumerates the values for underlying resource action.
type UnderlyingResourceAction string
const (
// Delete ...
Delete UnderlyingResourceAction = "Delete"
// Detach ...
Detach UnderlyingResourceAction = "Detach"
)
// PossibleUnderlyingResourceActionValues returns an array of possible values for the UnderlyingResourceAction const type.
func PossibleUnderlyingResourceActionValues() []UnderlyingResourceAction {
return []UnderlyingResourceAction{Delete, Detach}
}
// UsageUnit enumerates the values for usage unit.
type UsageUnit string
const (
// UsageUnitCount ...
UsageUnitCount UsageUnit = "Count"
)
// PossibleUsageUnitValues returns an array of possible values for the UsageUnit const type.
func PossibleUsageUnitValues() []UsageUnit {
return []UsageUnit{UsageUnitCount}
}
// VMPriority enumerates the values for vm priority.
type VMPriority string
const (
// Dedicated ...
Dedicated VMPriority = "Dedicated"
// LowPriority ...
LowPriority VMPriority = "LowPriority"
)
// PossibleVMPriorityValues returns an array of possible values for the VMPriority const type.
func PossibleVMPriorityValues() []VMPriority {
return []VMPriority{Dedicated, LowPriority}
}
// AKS a Machine Learning compute based on AKS.
type AKS struct {
// Properties - AKS properties
Properties *AKSProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for AKS.
func (a AKS) MarshalJSON() ([]byte, error) {
a.ComputeType = ComputeTypeAKS1
objectMap := make(map[string]interface{})
if a.Properties != nil {
objectMap["properties"] = a.Properties
}
if a.ComputeLocation != nil {
objectMap["computeLocation"] = a.ComputeLocation
}
if a.Description != nil {
objectMap["description"] = a.Description
}
if a.ResourceID != nil {
objectMap["resourceId"] = a.ResourceID
}
if a.ComputeType != "" {
objectMap["computeType"] = a.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for AKS.
func (a AKS) AsAKS() (*AKS, bool) {
return &a, true
}
// AsAmlCompute is the BasicCompute implementation for AKS.
func (a AKS) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for AKS.
func (a AKS) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for AKS.
func (a AKS) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for AKS.
func (a AKS) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for AKS.
func (a AKS) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for AKS.
func (a AKS) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for AKS.
func (a AKS) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for AKS.
func (a AKS) AsBasicCompute() (BasicCompute, bool) {
return &a, true
}
// AksComputeSecrets secrets related to a Machine Learning compute based on AKS.
type AksComputeSecrets struct {
// UserKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
UserKubeConfig *string `json:"userKubeConfig,omitempty"`
// AdminKubeConfig - Content of kubeconfig file that can be used to connect to the Kubernetes cluster.
AdminKubeConfig *string `json:"adminKubeConfig,omitempty"`
// ImagePullSecretName - Image registry pull secret.
ImagePullSecretName *string `json:"imagePullSecretName,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for AksComputeSecrets.
func (acs AksComputeSecrets) MarshalJSON() ([]byte, error) {
acs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeAKS
objectMap := make(map[string]interface{})
if acs.UserKubeConfig != nil {
objectMap["userKubeConfig"] = acs.UserKubeConfig
}
if acs.AdminKubeConfig != nil {
objectMap["adminKubeConfig"] = acs.AdminKubeConfig
}
if acs.ImagePullSecretName != nil {
objectMap["imagePullSecretName"] = acs.ImagePullSecretName
}
if acs.ComputeType != "" {
objectMap["computeType"] = acs.ComputeType
}
return json.Marshal(objectMap)
}
// AsAksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
func (acs AksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
return &acs, true
}
// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
func (acs AksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
return nil, false
}
// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
func (acs AksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
return nil, false
}
// AsComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
func (acs AksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
return nil, false
}
// AsBasicComputeSecrets is the BasicComputeSecrets implementation for AksComputeSecrets.
func (acs AksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
return &acs, true
}
// AksNetworkingConfiguration advance configuration for AKS networking
type AksNetworkingConfiguration struct {
// SubnetID - Virtual network subnet resource ID the compute nodes belong to
SubnetID *string `json:"subnetId,omitempty"`
// ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
ServiceCidr *string `json:"serviceCidr,omitempty"`
// DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
// DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
}
// AKSProperties AKS properties
type AKSProperties struct {
// ClusterFqdn - Cluster full qualified domain name
ClusterFqdn *string `json:"clusterFqdn,omitempty"`
// SystemServices - READ-ONLY; System services
SystemServices *[]SystemService `json:"systemServices,omitempty"`
// AgentCount - Number of agents
AgentCount *int32 `json:"agentCount,omitempty"`
// AgentVMSize - Agent virtual machine size
AgentVMSize *string `json:"agentVMSize,omitempty"`
// SslConfiguration - SSL configuration
SslConfiguration *SslConfiguration `json:"sslConfiguration,omitempty"`
// AksNetworkingConfiguration - AKS networking configuration for vnet
AksNetworkingConfiguration *AksNetworkingConfiguration `json:"aksNetworkingConfiguration,omitempty"`
}
// AmlCompute an Azure Machine Learning compute.
type AmlCompute struct {
// Properties - AML Compute properties
Properties *AmlComputeProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for AmlCompute.
func (ac AmlCompute) MarshalJSON() ([]byte, error) {
ac.ComputeType = ComputeTypeAmlCompute1
objectMap := make(map[string]interface{})
if ac.Properties != nil {
objectMap["properties"] = ac.Properties
}
if ac.ComputeLocation != nil {
objectMap["computeLocation"] = ac.ComputeLocation
}
if ac.Description != nil {
objectMap["description"] = ac.Description
}
if ac.ResourceID != nil {
objectMap["resourceId"] = ac.ResourceID
}
if ac.ComputeType != "" {
objectMap["computeType"] = ac.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsAmlCompute() (*AmlCompute, bool) {
return &ac, true
}
// AsVirtualMachine is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for AmlCompute.
func (ac AmlCompute) AsBasicCompute() (BasicCompute, bool) {
return &ac, true
}
// AmlComputeNodeInformation compute node information related to a AmlCompute.
type AmlComputeNodeInformation struct {
// NodeID - READ-ONLY; ID of the compute node.
NodeID *string `json:"nodeId,omitempty"`
// PrivateIPAddress - READ-ONLY; Private IP address of the compute node.
PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
// PublicIPAddress - READ-ONLY; Public IP address of the compute node.
PublicIPAddress *string `json:"publicIpAddress,omitempty"`
// Port - READ-ONLY; SSH port number of the node.
Port *float64 `json:"port,omitempty"`
// NodeState - READ-ONLY; State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. Possible values include: 'Idle', 'Running', 'Preparing', 'Unusable', 'Leaving', 'Preempted'
NodeState NodeState `json:"nodeState,omitempty"`
// RunID - READ-ONLY; ID of the Experiment running on the node, if any else null.
RunID *string `json:"runId,omitempty"`
}
// AmlComputeNodesInformation compute node information related to a AmlCompute.
type AmlComputeNodesInformation struct {
autorest.Response `json:"-"`
// Nodes - READ-ONLY; The collection of returned AmlCompute nodes details.
Nodes *[]AmlComputeNodeInformation `json:"nodes,omitempty"`
// NextLink - READ-ONLY; The continuation token.
NextLink *string `json:"nextLink,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for AmlComputeNodesInformation.
func (acni AmlComputeNodesInformation) MarshalJSON() ([]byte, error) {
acni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute
objectMap := make(map[string]interface{})
if acni.ComputeType != "" {
objectMap["computeType"] = acni.ComputeType
}
return json.Marshal(objectMap)
}
// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
func (acni AmlComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
return &acni, true
}
// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
func (acni AmlComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
return nil, false
}
// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for AmlComputeNodesInformation.
func (acni AmlComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
return &acni, true
}
// AmlComputeProperties AML Compute properties
type AmlComputeProperties struct {
// VMSize - Virtual Machine Size
VMSize *string `json:"vmSize,omitempty"`
// VMPriority - Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority'
VMPriority VMPriority `json:"vmPriority,omitempty"`
// ScaleSettings - Scale settings for AML Compute
ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
// UserAccountCredentials - Credentials for an administrator user account that will be created on each compute node.
UserAccountCredentials *UserAccountCredentials `json:"userAccountCredentials,omitempty"`
// Subnet - Virtual network subnet resource ID the compute nodes belong to.
Subnet *ResourceID `json:"subnet,omitempty"`
// RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. Possible values include: 'RemoteLoginPortPublicAccessEnabled', 'RemoteLoginPortPublicAccessDisabled', 'RemoteLoginPortPublicAccessNotSpecified'
RemoteLoginPortPublicAccess RemoteLoginPortPublicAccess `json:"remoteLoginPortPublicAccess,omitempty"`
// AllocationState - READ-ONLY; Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. Possible values include: 'Steady', 'Resizing'
AllocationState AllocationState `json:"allocationState,omitempty"`
// AllocationStateTransitionTime - READ-ONLY; The time at which the compute entered its current allocation state.
AllocationStateTransitionTime *date.Time `json:"allocationStateTransitionTime,omitempty"`
// Errors - READ-ONLY; Collection of errors encountered by various compute nodes during node setup.
Errors *[]Error `json:"errors,omitempty"`
// CurrentNodeCount - READ-ONLY; The number of compute nodes currently assigned to the compute.
CurrentNodeCount *int32 `json:"currentNodeCount,omitempty"`
// TargetNodeCount - READ-ONLY; The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.
TargetNodeCount *int32 `json:"targetNodeCount,omitempty"`
// NodeStateCounts - READ-ONLY; Counts of various node states on the compute.
NodeStateCounts *NodeStateCounts `json:"nodeStateCounts,omitempty"`
}
// AmlUserFeature features enabled for a workspace
type AmlUserFeature struct {
// ID - Specifies the feature ID
ID *string `json:"id,omitempty"`
// DisplayName - Specifies the feature name
DisplayName *string `json:"displayName,omitempty"`
// Description - Describes the feature for user experience
Description *string `json:"description,omitempty"`
}
// ClusterUpdateParameters amlCompute update parameters.
type ClusterUpdateParameters struct {
// ClusterUpdateProperties - The properties of the amlCompute.
*ClusterUpdateProperties `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for ClusterUpdateParameters.
func (cup ClusterUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cup.ClusterUpdateProperties != nil {
objectMap["properties"] = cup.ClusterUpdateProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ClusterUpdateParameters struct.
func (cup *ClusterUpdateParameters) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var clusterUpdateProperties ClusterUpdateProperties
err = json.Unmarshal(*v, &clusterUpdateProperties)
if err != nil {
return err
}
cup.ClusterUpdateProperties = &clusterUpdateProperties
}
}
}
return nil
}
// ClusterUpdateProperties the properties of a amlCompute that need to be updated.
type ClusterUpdateProperties struct {
// ScaleSettings - Desired scale settings for the amlCompute.
ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"`
}
// BasicCompute machine Learning compute object.
type BasicCompute interface {
AsAKS() (*AKS, bool)
AsAmlCompute() (*AmlCompute, bool)
AsVirtualMachine() (*VirtualMachine, bool)
AsHDInsight() (*HDInsight, bool)
AsDataFactory() (*DataFactory, bool)
AsDatabricks() (*Databricks, bool)
AsDataLakeAnalytics() (*DataLakeAnalytics, bool)
AsCompute() (*Compute, bool)
}
// Compute machine Learning compute object.
type Compute struct {
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
func unmarshalBasicCompute(body []byte) (BasicCompute, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["computeType"] {
case string(ComputeTypeAKS1):
var a AKS
err := json.Unmarshal(body, &a)
return a, err
case string(ComputeTypeAmlCompute1):
var ac AmlCompute
err := json.Unmarshal(body, &ac)
return ac, err
case string(ComputeTypeVirtualMachine1):
var VM VirtualMachine
err := json.Unmarshal(body, &VM)
return VM, err
case string(ComputeTypeHDInsight1):
var hi HDInsight
err := json.Unmarshal(body, &hi)
return hi, err
case string(ComputeTypeDataFactory1):
var df DataFactory
err := json.Unmarshal(body, &df)
return df, err
case string(ComputeTypeDatabricks1):
var d Databricks
err := json.Unmarshal(body, &d)
return d, err
case string(ComputeTypeDataLakeAnalytics1):
var dla DataLakeAnalytics
err := json.Unmarshal(body, &dla)
return dla, err
default:
var c Compute
err := json.Unmarshal(body, &c)
return c, err
}
}
func unmarshalBasicComputeArray(body []byte) ([]BasicCompute, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
cArray := make([]BasicCompute, len(rawMessages))
for index, rawMessage := range rawMessages {
c, err := unmarshalBasicCompute(*rawMessage)
if err != nil {
return nil, err
}
cArray[index] = c
}
return cArray, nil
}
// MarshalJSON is the custom marshaler for Compute.
func (c Compute) MarshalJSON() ([]byte, error) {
c.ComputeType = ComputeTypeCompute
objectMap := make(map[string]interface{})
if c.ComputeLocation != nil {
objectMap["computeLocation"] = c.ComputeLocation
}
if c.Description != nil {
objectMap["description"] = c.Description
}
if c.ResourceID != nil {
objectMap["resourceId"] = c.ResourceID
}
if c.ComputeType != "" {
objectMap["computeType"] = c.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for Compute.
func (c Compute) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for Compute.
func (c Compute) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for Compute.
func (c Compute) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for Compute.
func (c Compute) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for Compute.
func (c Compute) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for Compute.
func (c Compute) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for Compute.
func (c Compute) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for Compute.
func (c Compute) AsCompute() (*Compute, bool) {
return &c, true
}
// AsBasicCompute is the BasicCompute implementation for Compute.
func (c Compute) AsBasicCompute() (BasicCompute, bool) {
return &c, true
}
// BasicComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for every
// type of compute.
type BasicComputeNodesInformation interface {
AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool)
AsComputeNodesInformation() (*ComputeNodesInformation, bool)
}
// ComputeNodesInformation compute nodes information related to a Machine Learning compute. Might differ for
// every type of compute.
type ComputeNodesInformation struct {
// NextLink - READ-ONLY; The continuation token.
NextLink *string `json:"nextLink,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation', 'ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute'
ComputeType ComputeTypeBasicComputeNodesInformation `json:"computeType,omitempty"`
}
func unmarshalBasicComputeNodesInformation(body []byte) (BasicComputeNodesInformation, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["computeType"] {
case string(ComputeTypeBasicComputeNodesInformationComputeTypeAmlCompute):
var acni AmlComputeNodesInformation
err := json.Unmarshal(body, &acni)
return acni, err
default:
var cni ComputeNodesInformation
err := json.Unmarshal(body, &cni)
return cni, err
}
}
func unmarshalBasicComputeNodesInformationArray(body []byte) ([]BasicComputeNodesInformation, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
cniArray := make([]BasicComputeNodesInformation, len(rawMessages))
for index, rawMessage := range rawMessages {
cni, err := unmarshalBasicComputeNodesInformation(*rawMessage)
if err != nil {
return nil, err
}
cniArray[index] = cni
}
return cniArray, nil
}
// MarshalJSON is the custom marshaler for ComputeNodesInformation.
func (cni ComputeNodesInformation) MarshalJSON() ([]byte, error) {
cni.ComputeType = ComputeTypeBasicComputeNodesInformationComputeTypeComputeNodesInformation
objectMap := make(map[string]interface{})
if cni.ComputeType != "" {
objectMap["computeType"] = cni.ComputeType
}
return json.Marshal(objectMap)
}
// AsAmlComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
func (cni ComputeNodesInformation) AsAmlComputeNodesInformation() (*AmlComputeNodesInformation, bool) {
return nil, false
}
// AsComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
func (cni ComputeNodesInformation) AsComputeNodesInformation() (*ComputeNodesInformation, bool) {
return &cni, true
}
// AsBasicComputeNodesInformation is the BasicComputeNodesInformation implementation for ComputeNodesInformation.
func (cni ComputeNodesInformation) AsBasicComputeNodesInformation() (BasicComputeNodesInformation, bool) {
return &cni, true
}
// ComputeResource machine Learning compute object wrapped into ARM resource envelope.
type ComputeResource struct {
autorest.Response `json:"-"`
// Properties - Compute properties
Properties BasicCompute `json:"properties,omitempty"`
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Specifies the name of the resource.
Name *string `json:"name,omitempty"`
// Identity - The identity of the resource.
Identity *Identity `json:"identity,omitempty"`
// Location - Specifies the location of the resource.
Location *string `json:"location,omitempty"`
// Type - READ-ONLY; Specifies the type of the resource.
Type *string `json:"type,omitempty"`
// Tags - Contains resource tags defined as key/value pairs.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for ComputeResource.
func (cr ComputeResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
objectMap["properties"] = cr.Properties
if cr.Identity != nil {
objectMap["identity"] = cr.Identity
}
if cr.Location != nil {
objectMap["location"] = cr.Location
}
if cr.Tags != nil {
objectMap["tags"] = cr.Tags
}
if cr.Sku != nil {
objectMap["sku"] = cr.Sku
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ComputeResource struct.
func (cr *ComputeResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
properties, err := unmarshalBasicCompute(*v)
if err != nil {
return err
}
cr.Properties = properties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
cr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
cr.Name = &name
}
case "identity":
if v != nil {
var identity Identity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
cr.Identity = &identity
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
cr.Location = &location
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
cr.Type = &typeVar
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
cr.Tags = tags
}
case "sku":
if v != nil {
var sku Sku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
}
cr.Sku = &sku
}
}
}
return nil
}
// BasicComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
type BasicComputeSecrets interface {
AsAksComputeSecrets() (*AksComputeSecrets, bool)
AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool)
AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool)
AsComputeSecrets() (*ComputeSecrets, bool)
}
// ComputeSecrets secrets related to a Machine Learning compute. Might differ for every type of compute.
type ComputeSecrets struct {
autorest.Response `json:"-"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
}
func unmarshalBasicComputeSecrets(body []byte) (BasicComputeSecrets, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["computeType"] {
case string(ComputeTypeBasicComputeSecretsComputeTypeAKS):
var acs AksComputeSecrets
err := json.Unmarshal(body, &acs)
return acs, err
case string(ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine):
var vms VirtualMachineSecrets
err := json.Unmarshal(body, &vms)
return vms, err
case string(ComputeTypeBasicComputeSecretsComputeTypeDatabricks):
var dcs DatabricksComputeSecrets
err := json.Unmarshal(body, &dcs)
return dcs, err
default:
var cs ComputeSecrets
err := json.Unmarshal(body, &cs)
return cs, err
}
}
func unmarshalBasicComputeSecretsArray(body []byte) ([]BasicComputeSecrets, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
csArray := make([]BasicComputeSecrets, len(rawMessages))
for index, rawMessage := range rawMessages {
cs, err := unmarshalBasicComputeSecrets(*rawMessage)
if err != nil {
return nil, err
}
csArray[index] = cs
}
return csArray, nil
}
// MarshalJSON is the custom marshaler for ComputeSecrets.
func (cs ComputeSecrets) MarshalJSON() ([]byte, error) {
cs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets
objectMap := make(map[string]interface{})
if cs.ComputeType != "" {
objectMap["computeType"] = cs.ComputeType
}
return json.Marshal(objectMap)
}
// AsAksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
func (cs ComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
return nil, false
}
// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
func (cs ComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
return nil, false
}
// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
func (cs ComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
return nil, false
}
// AsComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
func (cs ComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
return &cs, true
}
// AsBasicComputeSecrets is the BasicComputeSecrets implementation for ComputeSecrets.
func (cs ComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
return &cs, true
}
// ComputeSecretsModel ...
type ComputeSecretsModel struct {
autorest.Response `json:"-"`
Value BasicComputeSecrets `json:"value,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for ComputeSecretsModel struct.
func (csm *ComputeSecretsModel) UnmarshalJSON(body []byte) error {
cs, err := unmarshalBasicComputeSecrets(body)
if err != nil {
return err
}
csm.Value = cs
return nil
}
// Databricks a DataFactory compute.
type Databricks struct {
Properties *DatabricksProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for Databricks.
func (d Databricks) MarshalJSON() ([]byte, error) {
d.ComputeType = ComputeTypeDatabricks1
objectMap := make(map[string]interface{})
if d.Properties != nil {
objectMap["properties"] = d.Properties
}
if d.ComputeLocation != nil {
objectMap["computeLocation"] = d.ComputeLocation
}
if d.Description != nil {
objectMap["description"] = d.Description
}
if d.ResourceID != nil {
objectMap["resourceId"] = d.ResourceID
}
if d.ComputeType != "" {
objectMap["computeType"] = d.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for Databricks.
func (d Databricks) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for Databricks.
func (d Databricks) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for Databricks.
func (d Databricks) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for Databricks.
func (d Databricks) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for Databricks.
func (d Databricks) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for Databricks.
func (d Databricks) AsDatabricks() (*Databricks, bool) {
return &d, true
}
// AsDataLakeAnalytics is the BasicCompute implementation for Databricks.
func (d Databricks) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for Databricks.
func (d Databricks) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for Databricks.
func (d Databricks) AsBasicCompute() (BasicCompute, bool) {
return &d, true
}
// DatabricksComputeSecrets secrets related to a Machine Learning compute based on Databricks.
type DatabricksComputeSecrets struct {
// DatabricksAccessToken - access token for databricks account.
DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) MarshalJSON() ([]byte, error) {
dcs.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeDatabricks
objectMap := make(map[string]interface{})
if dcs.DatabricksAccessToken != nil {
objectMap["databricksAccessToken"] = dcs.DatabricksAccessToken
}
if dcs.ComputeType != "" {
objectMap["computeType"] = dcs.ComputeType
}
return json.Marshal(objectMap)
}
// AsAksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
return nil, false
}
// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
return nil, false
}
// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
return &dcs, true
}
// AsComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
return nil, false
}
// AsBasicComputeSecrets is the BasicComputeSecrets implementation for DatabricksComputeSecrets.
func (dcs DatabricksComputeSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
return &dcs, true
}
// DatabricksProperties ...
type DatabricksProperties struct {
// DatabricksAccessToken - Databricks access token
DatabricksAccessToken *string `json:"databricksAccessToken,omitempty"`
}
// DataFactory a DataFactory compute.
type DataFactory struct {
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for DataFactory.
func (df DataFactory) MarshalJSON() ([]byte, error) {
df.ComputeType = ComputeTypeDataFactory1
objectMap := make(map[string]interface{})
if df.ComputeLocation != nil {
objectMap["computeLocation"] = df.ComputeLocation
}
if df.Description != nil {
objectMap["description"] = df.Description
}
if df.ResourceID != nil {
objectMap["resourceId"] = df.ResourceID
}
if df.ComputeType != "" {
objectMap["computeType"] = df.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsDataFactory() (*DataFactory, bool) {
return &df, true
}
// AsDatabricks is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for DataFactory.
func (df DataFactory) AsBasicCompute() (BasicCompute, bool) {
return &df, true
}
// DataLakeAnalytics a DataLakeAnalytics compute.
type DataLakeAnalytics struct {
Properties *DataLakeAnalyticsProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for DataLakeAnalytics.
func (dla DataLakeAnalytics) MarshalJSON() ([]byte, error) {
dla.ComputeType = ComputeTypeDataLakeAnalytics1
objectMap := make(map[string]interface{})
if dla.Properties != nil {
objectMap["properties"] = dla.Properties
}
if dla.ComputeLocation != nil {
objectMap["computeLocation"] = dla.ComputeLocation
}
if dla.Description != nil {
objectMap["description"] = dla.Description
}
if dla.ResourceID != nil {
objectMap["resourceId"] = dla.ResourceID
}
if dla.ComputeType != "" {
objectMap["computeType"] = dla.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return &dla, true
}
// AsCompute is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for DataLakeAnalytics.
func (dla DataLakeAnalytics) AsBasicCompute() (BasicCompute, bool) {
return &dla, true
}
// DataLakeAnalyticsProperties ...
type DataLakeAnalyticsProperties struct {
// DataLakeStoreAccountName - DataLake Store Account Name
DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"`
}
// EncryptionProperty ...
type EncryptionProperty struct {
// Status - Indicates whether or not the encryption is enabled for the workspace. Possible values include: 'Enabled', 'Disabled'
Status EncryptionStatus `json:"status,omitempty"`
// KeyVaultProperties - Customer Key vault properties.
KeyVaultProperties *KeyVaultProperties `json:"keyVaultProperties,omitempty"`
}
// Error wrapper for error response to follow ARM guidelines.
type Error struct {
// Error - READ-ONLY; The error response.
Error *ErrorResponse `json:"error,omitempty"`
}
// ErrorDetail error detail information.
type ErrorDetail struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
// Message - Error message.
Message *string `json:"message,omitempty"`
}
// ErrorResponse error response information.
type ErrorResponse struct {
// Code - READ-ONLY; Error code.
Code *string `json:"code,omitempty"`
// Message - READ-ONLY; Error message.
Message *string `json:"message,omitempty"`
// Details - READ-ONLY; An array of error detail objects.
Details *[]ErrorDetail `json:"details,omitempty"`
}
// HDInsight a HDInsight compute.
type HDInsight struct {
Properties *HDInsightProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for HDInsight.
func (hi HDInsight) MarshalJSON() ([]byte, error) {
hi.ComputeType = ComputeTypeHDInsight1
objectMap := make(map[string]interface{})
if hi.Properties != nil {
objectMap["properties"] = hi.Properties
}
if hi.ComputeLocation != nil {
objectMap["computeLocation"] = hi.ComputeLocation
}
if hi.Description != nil {
objectMap["description"] = hi.Description
}
if hi.ResourceID != nil {
objectMap["resourceId"] = hi.ResourceID
}
if hi.ComputeType != "" {
objectMap["computeType"] = hi.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsVirtualMachine() (*VirtualMachine, bool) {
return nil, false
}
// AsHDInsight is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsHDInsight() (*HDInsight, bool) {
return &hi, true
}
// AsDataFactory is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for HDInsight.
func (hi HDInsight) AsBasicCompute() (BasicCompute, bool) {
return &hi, true
}
// HDInsightProperties ...
type HDInsightProperties struct {
// SSHPort - Port open for ssh connections on the master node of the cluster.
SSHPort *int32 `json:"sshPort,omitempty"`
// Address - Public IP address of the master node of the cluster.
Address *string `json:"address,omitempty"`
// AdministratorAccount - Admin credentials for master node of the cluster
AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
}
// Identity identity for the resource.
type Identity struct {
// PrincipalID - READ-ONLY; The principal ID of resource identity.
PrincipalID *string `json:"principalId,omitempty"`
// TenantID - READ-ONLY; The tenant ID of resource.
TenantID *string `json:"tenantId,omitempty"`
// Type - The identity type. Possible values include: 'SystemAssigned'
Type ResourceIdentityType `json:"type,omitempty"`
}
// KeyVaultProperties ...
type KeyVaultProperties struct {
// KeyVaultArmID - The ArmId of the keyVault where the customer owned encryption key is present.
KeyVaultArmID *string `json:"keyVaultArmId,omitempty"`
// KeyIdentifier - Key vault uri to access the encryption key.
KeyIdentifier *string `json:"keyIdentifier,omitempty"`
// IdentityClientID - For future use - The client id of the identity which will be used to access key vault.
IdentityClientID *string `json:"identityClientId,omitempty"`
}
// ListAmlUserFeatureResult the List Aml user feature operation response.
type ListAmlUserFeatureResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; The list of AML user facing features.
Value *[]AmlUserFeature `json:"value,omitempty"`
// NextLink - READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information.
NextLink *string `json:"nextLink,omitempty"`
}
// ListAmlUserFeatureResultIterator provides access to a complete listing of AmlUserFeature values.
type ListAmlUserFeatureResultIterator struct {
i int
page ListAmlUserFeatureResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ListAmlUserFeatureResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ListAmlUserFeatureResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListAmlUserFeatureResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter ListAmlUserFeatureResultIterator) Response() ListAmlUserFeatureResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ListAmlUserFeatureResultIterator) Value() AmlUserFeature {
if !iter.page.NotDone() {
return AmlUserFeature{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the ListAmlUserFeatureResultIterator type.
func NewListAmlUserFeatureResultIterator(page ListAmlUserFeatureResultPage) ListAmlUserFeatureResultIterator {
return ListAmlUserFeatureResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (laufr ListAmlUserFeatureResult) IsEmpty() bool {
return laufr.Value == nil || len(*laufr.Value) == 0
}
// listAmlUserFeatureResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (laufr ListAmlUserFeatureResult) listAmlUserFeatureResultPreparer(ctx context.Context) (*http.Request, error) {
if laufr.NextLink == nil || len(to.String(laufr.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(laufr.NextLink)))
}
// ListAmlUserFeatureResultPage contains a page of AmlUserFeature values.
type ListAmlUserFeatureResultPage struct {
fn func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)
laufr ListAmlUserFeatureResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ListAmlUserFeatureResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListAmlUserFeatureResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.laufr)
if err != nil {
return err
}
page.laufr = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ListAmlUserFeatureResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListAmlUserFeatureResultPage) NotDone() bool {
return !page.laufr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page ListAmlUserFeatureResultPage) Response() ListAmlUserFeatureResult {
return page.laufr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page ListAmlUserFeatureResultPage) Values() []AmlUserFeature {
if page.laufr.IsEmpty() {
return nil
}
return *page.laufr.Value
}
// Creates a new instance of the ListAmlUserFeatureResultPage type.
func NewListAmlUserFeatureResultPage(getNextPage func(context.Context, ListAmlUserFeatureResult) (ListAmlUserFeatureResult, error)) ListAmlUserFeatureResultPage {
return ListAmlUserFeatureResultPage{fn: getNextPage}
}
// ListUsagesResult the List Usages operation response.
type ListUsagesResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; The list of AML resource usages.
Value *[]Usage `json:"value,omitempty"`
// NextLink - READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information.
NextLink *string `json:"nextLink,omitempty"`
}
// ListUsagesResultIterator provides access to a complete listing of Usage values.
type ListUsagesResultIterator struct {
i int
page ListUsagesResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ListUsagesResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListUsagesResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter ListUsagesResultIterator) Response() ListUsagesResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ListUsagesResultIterator) Value() Usage {
if !iter.page.NotDone() {
return Usage{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the ListUsagesResultIterator type.
func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
return ListUsagesResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (lur ListUsagesResult) IsEmpty() bool {
return lur.Value == nil || len(*lur.Value) == 0
}
// listUsagesResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lur.NextLink)))
}
// ListUsagesResultPage contains a page of Usage values.
type ListUsagesResultPage struct {
fn func(context.Context, ListUsagesResult) (ListUsagesResult, error)
lur ListUsagesResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.lur)
if err != nil {
return err
}
page.lur = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ListUsagesResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListUsagesResultPage) NotDone() bool {
return !page.lur.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page ListUsagesResultPage) Response() ListUsagesResult {
return page.lur
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page ListUsagesResultPage) Values() []Usage {
if page.lur.IsEmpty() {
return nil
}
return *page.lur.Value
}
// Creates a new instance of the ListUsagesResultPage type.
func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
return ListUsagesResultPage{fn: getNextPage}
}
// ListWorkspaceKeysResult ...
type ListWorkspaceKeysResult struct {
autorest.Response `json:"-"`
// UserStorageKey - READ-ONLY
UserStorageKey *string `json:"userStorageKey,omitempty"`
// UserStorageResourceID - READ-ONLY
UserStorageResourceID *string `json:"userStorageResourceId,omitempty"`
// AppInsightsInstrumentationKey - READ-ONLY
AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"`
// ContainerRegistryCredentials - READ-ONLY
ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty"`
NotebookAccessKeys *NotebookListCredentialsResult `json:"notebookAccessKeys,omitempty"`
}
// ListWorkspaceQuotas the List WorkspaceQuotasByVMFamily operation response.
type ListWorkspaceQuotas struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; The list of Workspace Quotas by VM Family
Value *[]ResourceQuota `json:"value,omitempty"`
// NextLink - READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information.
NextLink *string `json:"nextLink,omitempty"`
}
// ListWorkspaceQuotasIterator provides access to a complete listing of ResourceQuota values.
type ListWorkspaceQuotasIterator struct {
i int
page ListWorkspaceQuotasPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ListWorkspaceQuotasIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ListWorkspaceQuotasIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListWorkspaceQuotasIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter ListWorkspaceQuotasIterator) Response() ListWorkspaceQuotas {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ListWorkspaceQuotasIterator) Value() ResourceQuota {
if !iter.page.NotDone() {
return ResourceQuota{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the ListWorkspaceQuotasIterator type.
func NewListWorkspaceQuotasIterator(page ListWorkspaceQuotasPage) ListWorkspaceQuotasIterator {
return ListWorkspaceQuotasIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (lwq ListWorkspaceQuotas) IsEmpty() bool {
return lwq.Value == nil || len(*lwq.Value) == 0
}
// listWorkspaceQuotasPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (lwq ListWorkspaceQuotas) listWorkspaceQuotasPreparer(ctx context.Context) (*http.Request, error) {
if lwq.NextLink == nil || len(to.String(lwq.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lwq.NextLink)))
}
// ListWorkspaceQuotasPage contains a page of ResourceQuota values.
type ListWorkspaceQuotasPage struct {
fn func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)
lwq ListWorkspaceQuotas
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ListWorkspaceQuotasPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ListWorkspaceQuotasPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.lwq)
if err != nil {
return err
}
page.lwq = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ListWorkspaceQuotasPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListWorkspaceQuotasPage) NotDone() bool {
return !page.lwq.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page ListWorkspaceQuotasPage) Response() ListWorkspaceQuotas {
return page.lwq
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page ListWorkspaceQuotasPage) Values() []ResourceQuota {
if page.lwq.IsEmpty() {
return nil
}
return *page.lwq.Value
}
// Creates a new instance of the ListWorkspaceQuotasPage type.
func NewListWorkspaceQuotasPage(getNextPage func(context.Context, ListWorkspaceQuotas) (ListWorkspaceQuotas, error)) ListWorkspaceQuotasPage {
return ListWorkspaceQuotasPage{fn: getNextPage}
}
// MachineLearningComputeCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type MachineLearningComputeCreateOrUpdateFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *MachineLearningComputeCreateOrUpdateFuture) Result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
cr, err = client.CreateOrUpdateResponder(cr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
}
}
return
}
// MachineLearningComputeDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type MachineLearningComputeDeleteFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *MachineLearningComputeDeleteFuture) Result(client MachineLearningComputeClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// MachineLearningComputeUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type MachineLearningComputeUpdateFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *MachineLearningComputeUpdateFuture) Result(client MachineLearningComputeClient) (cr ComputeResource, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("machinelearningservices.MachineLearningComputeUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
cr, err = client.UpdateResponder(cr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.MachineLearningComputeUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
}
}
return
}
// NodeStateCounts counts of various compute node states on the amlCompute.
type NodeStateCounts struct {
// IdleNodeCount - READ-ONLY; Number of compute nodes in idle state.
IdleNodeCount *int32 `json:"idleNodeCount,omitempty"`
// RunningNodeCount - READ-ONLY; Number of compute nodes which are running jobs.
RunningNodeCount *int32 `json:"runningNodeCount,omitempty"`
// PreparingNodeCount - READ-ONLY; Number of compute nodes which are being prepared.
PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty"`
// UnusableNodeCount - READ-ONLY; Number of compute nodes which are in unusable state.
UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty"`
// LeavingNodeCount - READ-ONLY; Number of compute nodes which are leaving the amlCompute.
LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty"`
// PreemptedNodeCount - READ-ONLY; Number of compute nodes which are in preempted state.
PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty"`
}
// NotebookListCredentialsResult ...
type NotebookListCredentialsResult struct {
PrimaryAccessKey *string `json:"primaryAccessKey,omitempty"`
SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty"`
}
// NotebookPreparationError ...
type NotebookPreparationError struct {
ErrorMessage *string `json:"errorMessage,omitempty"`
StatusCode *int32 `json:"statusCode,omitempty"`
}
// NotebookResourceInfo ...
type NotebookResourceInfo struct {
autorest.Response `json:"-"`
Fqdn *string `json:"fqdn,omitempty"`
// ResourceID - the data plane resourceId that used to initialize notebook component
ResourceID *string `json:"resourceId,omitempty"`
// NotebookPreparationError - The error that occurs when preparing notebook.
NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"`
}
// NotebooksPrepareFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type NotebooksPrepareFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *NotebooksPrepareFuture) Result(client NotebooksClient) (nri NotebookResourceInfo, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.NotebooksPrepareFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("machinelearningservices.NotebooksPrepareFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if nri.Response.Response, err = future.GetResult(sender); err == nil && nri.Response.Response.StatusCode != http.StatusNoContent {
nri, err = client.PrepareResponder(nri.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.NotebooksPrepareFuture", "Result", nri.Response.Response, "Failure responding to request")
}
}
return
}
// Operation azure Machine Learning workspace REST API operation
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
Name *string `json:"name,omitempty"`
// Display - Display name of operation
Display *OperationDisplay `json:"display,omitempty"`
}
// OperationDisplay display name of operation
type OperationDisplay struct {
// Provider - The resource provider name: Microsoft.MachineLearningExperimentation
Provider *string `json:"provider,omitempty"`
// Resource - The resource on which the operation is performed.
Resource *string `json:"resource,omitempty"`
// Operation - The operation that users can perform.
Operation *string `json:"operation,omitempty"`
// Description - The description for the operation.
Description *string `json:"description,omitempty"`
}
// OperationListResult an array of operations supported by the resource provider.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of AML workspace operations supported by the AML workspace resource provider.
Value *[]Operation `json:"value,omitempty"`
}
// PaginatedComputeResourcesList paginated list of Machine Learning compute objects wrapped in ARM resource
// envelope.
type PaginatedComputeResourcesList struct {
autorest.Response `json:"-"`
// Value - An array of Machine Learning compute objects wrapped in ARM resource envelope.
Value *[]ComputeResource `json:"value,omitempty"`
// NextLink - A continuation link (absolute URI) to the next page of results in the list.
NextLink *string `json:"nextLink,omitempty"`
}
// PaginatedComputeResourcesListIterator provides access to a complete listing of ComputeResource values.
type PaginatedComputeResourcesListIterator struct {
i int
page PaginatedComputeResourcesListPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *PaginatedComputeResourcesListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *PaginatedComputeResourcesListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PaginatedComputeResourcesListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter PaginatedComputeResourcesListIterator) Response() PaginatedComputeResourcesList {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter PaginatedComputeResourcesListIterator) Value() ComputeResource {
if !iter.page.NotDone() {
return ComputeResource{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the PaginatedComputeResourcesListIterator type.
func NewPaginatedComputeResourcesListIterator(page PaginatedComputeResourcesListPage) PaginatedComputeResourcesListIterator {
return PaginatedComputeResourcesListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (pcrl PaginatedComputeResourcesList) IsEmpty() bool {
return pcrl.Value == nil || len(*pcrl.Value) == 0
}
// paginatedComputeResourcesListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (pcrl PaginatedComputeResourcesList) paginatedComputeResourcesListPreparer(ctx context.Context) (*http.Request, error) {
if pcrl.NextLink == nil || len(to.String(pcrl.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pcrl.NextLink)))
}
// PaginatedComputeResourcesListPage contains a page of ComputeResource values.
type PaginatedComputeResourcesListPage struct {
fn func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)
pcrl PaginatedComputeResourcesList
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *PaginatedComputeResourcesListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/PaginatedComputeResourcesListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.pcrl)
if err != nil {
return err
}
page.pcrl = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *PaginatedComputeResourcesListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PaginatedComputeResourcesListPage) NotDone() bool {
return !page.pcrl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page PaginatedComputeResourcesListPage) Response() PaginatedComputeResourcesList {
return page.pcrl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page PaginatedComputeResourcesListPage) Values() []ComputeResource {
if page.pcrl.IsEmpty() {
return nil
}
return *page.pcrl.Value
}
// Creates a new instance of the PaginatedComputeResourcesListPage type.
func NewPaginatedComputeResourcesListPage(getNextPage func(context.Context, PaginatedComputeResourcesList) (PaginatedComputeResourcesList, error)) PaginatedComputeResourcesListPage {
return PaginatedComputeResourcesListPage{fn: getNextPage}
}
// Password ...
type Password struct {
// Name - READ-ONLY
Name *string `json:"name,omitempty"`
// Value - READ-ONLY
Value *string `json:"value,omitempty"`
}
// PrivateEndpoint the Private Endpoint resource.
type PrivateEndpoint struct {
// ID - READ-ONLY; The ARM identifier for Private Endpoint
ID *string `json:"id,omitempty"`
}
// PrivateEndpointConnection the Private Endpoint Connection resource.
type PrivateEndpointConnection struct {
autorest.Response `json:"-"`
// PrivateEndpointConnectionProperties - Resource properties.
*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Specifies the name of the resource.
Name *string `json:"name,omitempty"`
// Identity - The identity of the resource.
Identity *Identity `json:"identity,omitempty"`
// Location - Specifies the location of the resource.
Location *string `json:"location,omitempty"`
// Type - READ-ONLY; Specifies the type of the resource.
Type *string `json:"type,omitempty"`
// Tags - Contains resource tags defined as key/value pairs.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if pec.PrivateEndpointConnectionProperties != nil {
objectMap["properties"] = pec.PrivateEndpointConnectionProperties
}
if pec.Identity != nil {
objectMap["identity"] = pec.Identity
}
if pec.Location != nil {
objectMap["location"] = pec.Location
}
if pec.Tags != nil {
objectMap["tags"] = pec.Tags
}
if pec.Sku != nil {
objectMap["sku"] = pec.Sku
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
if err != nil {
return err
}
pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
pec.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
pec.Name = &name
}
case "identity":
if v != nil {
var identity Identity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
pec.Identity = &identity
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
pec.Location = &location
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
pec.Type = &typeVar
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
pec.Tags = tags
}
case "sku":
if v != nil {
var sku Sku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
}
pec.Sku = &sku
}
}
}
return nil
}
// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
type PrivateEndpointConnectionProperties struct {
// PrivateEndpoint - The resource of private end point.
PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
}
// PrivateLinkResource a private link resource
type PrivateLinkResource struct {
// PrivateLinkResourceProperties - Resource properties.
*PrivateLinkResourceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Specifies the name of the resource.
Name *string `json:"name,omitempty"`
// Identity - The identity of the resource.
Identity *Identity `json:"identity,omitempty"`
// Location - Specifies the location of the resource.
Location *string `json:"location,omitempty"`
// Type - READ-ONLY; Specifies the type of the resource.
Type *string `json:"type,omitempty"`
// Tags - Contains resource tags defined as key/value pairs.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateLinkResource.
func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if plr.PrivateLinkResourceProperties != nil {
objectMap["properties"] = plr.PrivateLinkResourceProperties
}
if plr.Identity != nil {
objectMap["identity"] = plr.Identity
}
if plr.Location != nil {
objectMap["location"] = plr.Location
}
if plr.Tags != nil {
objectMap["tags"] = plr.Tags
}
if plr.Sku != nil {
objectMap["sku"] = plr.Sku
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var privateLinkResourceProperties PrivateLinkResourceProperties
err = json.Unmarshal(*v, &privateLinkResourceProperties)
if err != nil {
return err
}
plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
plr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
plr.Name = &name
}
case "identity":
if v != nil {
var identity Identity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
plr.Identity = &identity
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
plr.Location = &location
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
plr.Type = &typeVar
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
plr.Tags = tags
}
case "sku":
if v != nil {
var sku Sku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
}
plr.Sku = &sku
}
}
}
return nil
}
// PrivateLinkResourceListResult a list of private link resources
type PrivateLinkResourceListResult struct {
autorest.Response `json:"-"`
// Value - Array of private link resources
Value *[]PrivateLinkResource `json:"value,omitempty"`
}
// PrivateLinkResourceProperties properties of a private link resource.
type PrivateLinkResourceProperties struct {
// GroupID - READ-ONLY; The private link resource group id.
GroupID *string `json:"groupId,omitempty"`
// RequiredMembers - READ-ONLY; The private link resource required member names.
RequiredMembers *[]string `json:"requiredMembers,omitempty"`
// RequiredZoneNames - The private link resource Private link DNS zone name.
RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
}
// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
// service consumer and provider.
type PrivateLinkServiceConnectionState struct {
// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout'
Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// QuotaBaseProperties the properties for Quota update or retrieval.
type QuotaBaseProperties struct {
// ID - Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Type - Specifies the resource type.
Type *string `json:"type,omitempty"`
// Limit - The maximum permitted quota of the resource.
Limit *int64 `json:"limit,omitempty"`
// Unit - An enum describing the unit of quota measurement. Possible values include: 'Count'
Unit QuotaUnit `json:"unit,omitempty"`
}
// QuotaUpdateParameters quota update parameters.
type QuotaUpdateParameters struct {
// Value - The list for update quota.
Value *[]QuotaBaseProperties `json:"value,omitempty"`
}
// RegistryListCredentialsResult ...
type RegistryListCredentialsResult struct {
// Location - READ-ONLY
Location *string `json:"location,omitempty"`
// Username - READ-ONLY
Username *string `json:"username,omitempty"`
Passwords *[]Password `json:"passwords,omitempty"`
}
// Resource azure Resource Manager resource envelope.
type Resource struct {
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Specifies the name of the resource.
Name *string `json:"name,omitempty"`
// Identity - The identity of the resource.
Identity *Identity `json:"identity,omitempty"`
// Location - Specifies the location of the resource.
Location *string `json:"location,omitempty"`
// Type - READ-ONLY; Specifies the type of the resource.
Type *string `json:"type,omitempty"`
// Tags - Contains resource tags defined as key/value pairs.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if r.Identity != nil {
objectMap["identity"] = r.Identity
}
if r.Location != nil {
objectMap["location"] = r.Location
}
if r.Tags != nil {
objectMap["tags"] = r.Tags
}
if r.Sku != nil {
objectMap["sku"] = r.Sku
}
return json.Marshal(objectMap)
}
// ResourceID represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.
type ResourceID struct {
// ID - The ID of the resource
ID *string `json:"id,omitempty"`
}
// ResourceName the Resource Name.
type ResourceName struct {
// Value - READ-ONLY; The name of the resource.
Value *string `json:"value,omitempty"`
// LocalizedValue - READ-ONLY; The localized name of the resource.
LocalizedValue *string `json:"localizedValue,omitempty"`
}
// ResourceQuota the quota assigned to a resource.
type ResourceQuota struct {
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Type - READ-ONLY; Specifies the resource type.
Type *string `json:"type,omitempty"`
// Name - READ-ONLY; Name of the resource.
Name *ResourceName `json:"name,omitempty"`
// Limit - READ-ONLY; The maximum permitted quota of the resource.
Limit *int64 `json:"limit,omitempty"`
// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
Unit QuotaUnit `json:"unit,omitempty"`
}
// ResourceSkuLocationInfo ...
type ResourceSkuLocationInfo struct {
// Location - READ-ONLY; Location of the SKU
Location *string `json:"location,omitempty"`
// Zones - READ-ONLY; List of availability zones where the SKU is supported.
Zones *[]string `json:"zones,omitempty"`
// ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
}
// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
type ResourceSkuZoneDetails struct {
// Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
Name *[]string `json:"name,omitempty"`
// Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
}
// Restriction the restriction because of which SKU cannot be used.
type Restriction struct {
// Type - READ-ONLY; The type of restrictions. As of now only possible value for this is location.
Type *string `json:"type,omitempty"`
// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
Values *[]string `json:"values,omitempty"`
// ReasonCode - The reason for the restriction. Possible values include: 'NotSpecified', 'NotAvailableForRegion', 'NotAvailableForSubscription'
ReasonCode ReasonCode `json:"reasonCode,omitempty"`
}
// ScaleSettings scale settings for AML Compute
type ScaleSettings struct {
// MaxNodeCount - Max number of nodes to use
MaxNodeCount *int32 `json:"maxNodeCount,omitempty"`
// MinNodeCount - Min number of nodes to use
MinNodeCount *int32 `json:"minNodeCount,omitempty"`
// NodeIdleTimeBeforeScaleDown - Node Idle Time before scaling down amlCompute
NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"`
}
// ServicePrincipalCredentials service principal credentials.
type ServicePrincipalCredentials struct {
// ClientID - Client Id
ClientID *string `json:"clientId,omitempty"`
// ClientSecret - Client secret
ClientSecret *string `json:"clientSecret,omitempty"`
}
// SharedPrivateLinkResource ...
type SharedPrivateLinkResource struct {
// Name - Unique name of the private link.
Name *string `json:"name,omitempty"`
// SharedPrivateLinkResourceProperty - Resource properties.
*SharedPrivateLinkResourceProperty `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for SharedPrivateLinkResource.
func (splr SharedPrivateLinkResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if splr.Name != nil {
objectMap["name"] = splr.Name
}
if splr.SharedPrivateLinkResourceProperty != nil {
objectMap["properties"] = splr.SharedPrivateLinkResourceProperty
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SharedPrivateLinkResource struct.
func (splr *SharedPrivateLinkResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
splr.Name = &name
}
case "properties":
if v != nil {
var sharedPrivateLinkResourceProperty SharedPrivateLinkResourceProperty
err = json.Unmarshal(*v, &sharedPrivateLinkResourceProperty)
if err != nil {
return err
}
splr.SharedPrivateLinkResourceProperty = &sharedPrivateLinkResourceProperty
}
}
}
return nil
}
// SharedPrivateLinkResourceProperty properties of a shared private link resource.
type SharedPrivateLinkResourceProperty struct {
// PrivateLinkResourceID - The resource id that private link links to.
PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"`
// GroupID - The private link resource group id.
GroupID *string `json:"groupId,omitempty"`
// RequestMessage - Request message.
RequestMessage *string `json:"requestMessage,omitempty"`
// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout'
Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}
// Sku sku of the resource
type Sku struct {
// Name - Name of the sku
Name *string `json:"name,omitempty"`
// Tier - Tier of the sku like Basic or Enterprise
Tier *string `json:"tier,omitempty"`
}
// SKUCapability features/user capabilities associated with the sku
type SKUCapability struct {
// Name - Capability/Feature ID
Name *string `json:"name,omitempty"`
// Value - Details about the feature/capability
Value *string `json:"value,omitempty"`
}
// SkuListResult list of skus with features
type SkuListResult struct {
autorest.Response `json:"-"`
Value *[]WorkspaceSku `json:"value,omitempty"`
// NextLink - The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the next page of Workspace Skus
NextLink *string `json:"nextLink,omitempty"`
}
// SkuListResultIterator provides access to a complete listing of WorkspaceSku values.
type SkuListResultIterator struct {
i int
page SkuListResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *SkuListResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *SkuListResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SkuListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter SkuListResultIterator) Response() SkuListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter SkuListResultIterator) Value() WorkspaceSku {
if !iter.page.NotDone() {
return WorkspaceSku{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the SkuListResultIterator type.
func NewSkuListResultIterator(page SkuListResultPage) SkuListResultIterator {
return SkuListResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (slr SkuListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
}
// skuListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (slr SkuListResult) skuListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
}
// SkuListResultPage contains a page of WorkspaceSku values.
type SkuListResultPage struct {
fn func(context.Context, SkuListResult) (SkuListResult, error)
slr SkuListResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *SkuListResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/SkuListResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
page.slr = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *SkuListResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SkuListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page SkuListResultPage) Response() SkuListResult {
return page.slr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page SkuListResultPage) Values() []WorkspaceSku {
if page.slr.IsEmpty() {
return nil
}
return *page.slr.Value
}
// Creates a new instance of the SkuListResultPage type.
func NewSkuListResultPage(getNextPage func(context.Context, SkuListResult) (SkuListResult, error)) SkuListResultPage {
return SkuListResultPage{fn: getNextPage}
}
// SslConfiguration the ssl configuration for scoring
type SslConfiguration struct {
// Status - Enable or disable ssl for scoring. Possible values include: 'Status1Disabled', 'Status1Enabled'
Status Status1 `json:"status,omitempty"`
// Cert - Cert data
Cert *string `json:"cert,omitempty"`
// Key - Key data
Key *string `json:"key,omitempty"`
// Cname - CNAME of the cert
Cname *string `json:"cname,omitempty"`
}
// SystemService a system service running on a compute.
type SystemService struct {
// SystemServiceType - READ-ONLY; The type of this system service.
SystemServiceType *string `json:"systemServiceType,omitempty"`
// PublicIPAddress - READ-ONLY; Public IP address
PublicIPAddress *string `json:"publicIpAddress,omitempty"`
// Version - READ-ONLY; The version for this type.
Version *string `json:"version,omitempty"`
}
// UpdateWorkspaceQuotas the properties for update Quota response.
type UpdateWorkspaceQuotas struct {
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Type - READ-ONLY; Specifies the resource type.
Type *string `json:"type,omitempty"`
// Limit - The maximum permitted quota of the resource.
Limit *int64 `json:"limit,omitempty"`
// Unit - READ-ONLY; An enum describing the unit of quota measurement. Possible values include: 'Count'
Unit QuotaUnit `json:"unit,omitempty"`
// Status - Status of update workspace quota. Possible values include: 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName', 'OperationNotSupportedForSku', 'OperationNotEnabledForRegion'
Status Status `json:"status,omitempty"`
}
// UpdateWorkspaceQuotasResult the result of update workspace quota.
type UpdateWorkspaceQuotasResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; The list of workspace quota update result.
Value *[]UpdateWorkspaceQuotas `json:"value,omitempty"`
// NextLink - READ-ONLY; The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.
NextLink *string `json:"nextLink,omitempty"`
}
// Usage describes AML Resource Usage.
type Usage struct {
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Type - READ-ONLY; Specifies the resource type.
Type *string `json:"type,omitempty"`
// Unit - READ-ONLY; An enum describing the unit of usage measurement. Possible values include: 'UsageUnitCount'
Unit UsageUnit `json:"unit,omitempty"`
// CurrentValue - READ-ONLY; The current usage of the resource.
CurrentValue *int64 `json:"currentValue,omitempty"`
// Limit - READ-ONLY; The maximum permitted usage of the resource.
Limit *int64 `json:"limit,omitempty"`
// Name - READ-ONLY; The name of the type of usage.
Name *UsageName `json:"name,omitempty"`
}
// UsageName the Usage Names.
type UsageName struct {
// Value - READ-ONLY; The name of the resource.
Value *string `json:"value,omitempty"`
// LocalizedValue - READ-ONLY; The localized name of the resource.
LocalizedValue *string `json:"localizedValue,omitempty"`
}
// UserAccountCredentials settings for user account that gets created on each on the nodes of a compute.
type UserAccountCredentials struct {
// AdminUserName - Name of the administrator user account which can be used to SSH to nodes.
AdminUserName *string `json:"adminUserName,omitempty"`
// AdminUserSSHPublicKey - SSH public key of the administrator user account.
AdminUserSSHPublicKey *string `json:"adminUserSshPublicKey,omitempty"`
// AdminUserPassword - Password of the administrator user account.
AdminUserPassword *string `json:"adminUserPassword,omitempty"`
}
// VirtualMachine a Machine Learning compute based on Azure Virtual Machines.
type VirtualMachine struct {
Properties *VirtualMachineProperties `json:"properties,omitempty"`
// ComputeLocation - Location for the underlying compute
ComputeLocation *string `json:"computeLocation,omitempty"`
// ProvisioningState - READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Description - The description of the Machine Learning compute.
Description *string `json:"description,omitempty"`
// CreatedOn - READ-ONLY; The date and time when the compute was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// ModifiedOn - READ-ONLY; The date and time when the compute was last modified.
ModifiedOn *date.Time `json:"modifiedOn,omitempty"`
// ResourceID - ARM resource id of the underlying compute
ResourceID *string `json:"resourceId,omitempty"`
// ProvisioningErrors - READ-ONLY; Errors during provisioning
ProvisioningErrors *[]Error `json:"provisioningErrors,omitempty"`
// IsAttachedCompute - READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.
IsAttachedCompute *bool `json:"isAttachedCompute,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeCompute', 'ComputeTypeAKS1', 'ComputeTypeAmlCompute1', 'ComputeTypeVirtualMachine1', 'ComputeTypeHDInsight1', 'ComputeTypeDataFactory1', 'ComputeTypeDatabricks1', 'ComputeTypeDataLakeAnalytics1'
ComputeType ComputeTypeBasicCompute `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for VirtualMachine.
func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
VM.ComputeType = ComputeTypeVirtualMachine1
objectMap := make(map[string]interface{})
if VM.Properties != nil {
objectMap["properties"] = VM.Properties
}
if VM.ComputeLocation != nil {
objectMap["computeLocation"] = VM.ComputeLocation
}
if VM.Description != nil {
objectMap["description"] = VM.Description
}
if VM.ResourceID != nil {
objectMap["resourceId"] = VM.ResourceID
}
if VM.ComputeType != "" {
objectMap["computeType"] = VM.ComputeType
}
return json.Marshal(objectMap)
}
// AsAKS is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsAKS() (*AKS, bool) {
return nil, false
}
// AsAmlCompute is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsAmlCompute() (*AmlCompute, bool) {
return nil, false
}
// AsVirtualMachine is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsVirtualMachine() (*VirtualMachine, bool) {
return &VM, true
}
// AsHDInsight is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsHDInsight() (*HDInsight, bool) {
return nil, false
}
// AsDataFactory is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsDataFactory() (*DataFactory, bool) {
return nil, false
}
// AsDatabricks is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsDatabricks() (*Databricks, bool) {
return nil, false
}
// AsDataLakeAnalytics is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsDataLakeAnalytics() (*DataLakeAnalytics, bool) {
return nil, false
}
// AsCompute is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsCompute() (*Compute, bool) {
return nil, false
}
// AsBasicCompute is the BasicCompute implementation for VirtualMachine.
func (VM VirtualMachine) AsBasicCompute() (BasicCompute, bool) {
return &VM, true
}
// VirtualMachineProperties ...
type VirtualMachineProperties struct {
// VirtualMachineSize - Virtual Machine size
VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
// SSHPort - Port open for ssh connections.
SSHPort *int32 `json:"sshPort,omitempty"`
// Address - Public IP address of the virtual machine.
Address *string `json:"address,omitempty"`
// AdministratorAccount - Admin credentials for virtual machine
AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
}
// VirtualMachineSecrets secrets related to a Machine Learning compute based on AKS.
type VirtualMachineSecrets struct {
// AdministratorAccount - Admin credentials for virtual machine.
AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"`
// ComputeType - Possible values include: 'ComputeTypeBasicComputeSecretsComputeTypeComputeSecrets', 'ComputeTypeBasicComputeSecretsComputeTypeAKS', 'ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine', 'ComputeTypeBasicComputeSecretsComputeTypeDatabricks'
ComputeType ComputeTypeBasicComputeSecrets `json:"computeType,omitempty"`
}
// MarshalJSON is the custom marshaler for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) MarshalJSON() ([]byte, error) {
vms.ComputeType = ComputeTypeBasicComputeSecretsComputeTypeVirtualMachine
objectMap := make(map[string]interface{})
if vms.AdministratorAccount != nil {
objectMap["administratorAccount"] = vms.AdministratorAccount
}
if vms.ComputeType != "" {
objectMap["computeType"] = vms.ComputeType
}
return json.Marshal(objectMap)
}
// AsAksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) AsAksComputeSecrets() (*AksComputeSecrets, bool) {
return nil, false
}
// AsVirtualMachineSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) AsVirtualMachineSecrets() (*VirtualMachineSecrets, bool) {
return &vms, true
}
// AsDatabricksComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) AsDatabricksComputeSecrets() (*DatabricksComputeSecrets, bool) {
return nil, false
}
// AsComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) AsComputeSecrets() (*ComputeSecrets, bool) {
return nil, false
}
// AsBasicComputeSecrets is the BasicComputeSecrets implementation for VirtualMachineSecrets.
func (vms VirtualMachineSecrets) AsBasicComputeSecrets() (BasicComputeSecrets, bool) {
return &vms, true
}
// VirtualMachineSize describes the properties of a VM size.
type VirtualMachineSize struct {
// Name - READ-ONLY; The name of the virtual machine size.
Name *string `json:"name,omitempty"`
// Family - READ-ONLY; The family name of the virtual machine size.
Family *string `json:"family,omitempty"`
// VCPUs - READ-ONLY; The number of vCPUs supported by the virtual machine size.
VCPUs *int32 `json:"vCPUs,omitempty"`
// Gpus - READ-ONLY; The number of gPUs supported by the virtual machine size.
Gpus *int32 `json:"gpus,omitempty"`
// OsVhdSizeMB - READ-ONLY; The OS VHD disk size, in MB, allowed by the virtual machine size.
OsVhdSizeMB *int32 `json:"osVhdSizeMB,omitempty"`
// MaxResourceVolumeMB - READ-ONLY; The resource volume size, in MB, allowed by the virtual machine size.
MaxResourceVolumeMB *int32 `json:"maxResourceVolumeMB,omitempty"`
// MemoryGB - READ-ONLY; The amount of memory, in GB, supported by the virtual machine size.
MemoryGB *float64 `json:"memoryGB,omitempty"`
// LowPriorityCapable - READ-ONLY; Specifies if the virtual machine size supports low priority VMs.
LowPriorityCapable *bool `json:"lowPriorityCapable,omitempty"`
// PremiumIO - READ-ONLY; Specifies if the virtual machine size supports premium IO.
PremiumIO *bool `json:"premiumIO,omitempty"`
}
// VirtualMachineSizeListResult the List Virtual Machine size operation response.
type VirtualMachineSizeListResult struct {
autorest.Response `json:"-"`
// AmlCompute - The list of virtual machine sizes supported by AmlCompute.
AmlCompute *[]VirtualMachineSize `json:"amlCompute,omitempty"`
}
// VirtualMachineSSHCredentials admin credentials for virtual machine
type VirtualMachineSSHCredentials struct {
// Username - Username of admin account
Username *string `json:"username,omitempty"`
// Password - Password of admin account
Password *string `json:"password,omitempty"`
// PublicKeyData - Public key data
PublicKeyData *string `json:"publicKeyData,omitempty"`
// PrivateKeyData - Private key data
PrivateKeyData *string `json:"privateKeyData,omitempty"`
}
// Workspace an object that represents a machine learning workspace.
type Workspace struct {
autorest.Response `json:"-"`
// WorkspaceProperties - The properties of the machine learning workspace.
*WorkspaceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Specifies the resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Specifies the name of the resource.
Name *string `json:"name,omitempty"`
// Identity - The identity of the resource.
Identity *Identity `json:"identity,omitempty"`
// Location - Specifies the location of the resource.
Location *string `json:"location,omitempty"`
// Type - READ-ONLY; Specifies the type of the resource.
Type *string `json:"type,omitempty"`
// Tags - Contains resource tags defined as key/value pairs.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
}
// MarshalJSON is the custom marshaler for Workspace.
func (w Workspace) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if w.WorkspaceProperties != nil {
objectMap["properties"] = w.WorkspaceProperties
}
if w.Identity != nil {
objectMap["identity"] = w.Identity
}
if w.Location != nil {
objectMap["location"] = w.Location
}
if w.Tags != nil {
objectMap["tags"] = w.Tags
}
if w.Sku != nil {
objectMap["sku"] = w.Sku
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Workspace struct.
func (w *Workspace) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var workspaceProperties WorkspaceProperties
err = json.Unmarshal(*v, &workspaceProperties)
if err != nil {
return err
}
w.WorkspaceProperties = &workspaceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
w.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
w.Name = &name
}
case "identity":
if v != nil {
var identity Identity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
w.Identity = &identity
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
w.Location = &location
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
w.Type = &typeVar
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
w.Tags = tags
}
case "sku":
if v != nil {
var sku Sku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
}
w.Sku = &sku
}
}
}
return nil
}
// WorkspaceListResult the result of a request to list machine learning workspaces.
type WorkspaceListResult struct {
autorest.Response `json:"-"`
// Value - The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces.
Value *[]Workspace `json:"value,omitempty"`
// NextLink - The URI that can be used to request the next list of machine learning workspaces.
NextLink *string `json:"nextLink,omitempty"`
}
// WorkspaceListResultIterator provides access to a complete listing of Workspace values.
type WorkspaceListResultIterator struct {
i int
page WorkspaceListResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *WorkspaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *WorkspaceListResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkspaceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter WorkspaceListResultIterator) Response() WorkspaceListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter WorkspaceListResultIterator) Value() Workspace {
if !iter.page.NotDone() {
return Workspace{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the WorkspaceListResultIterator type.
func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
return WorkspaceListResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (wlr WorkspaceListResult) IsEmpty() bool {
return wlr.Value == nil || len(*wlr.Value) == 0
}
// workspaceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (wlr WorkspaceListResult) workspaceListResultPreparer(ctx context.Context) (*http.Request, error) {
if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wlr.NextLink)))
}
// WorkspaceListResultPage contains a page of Workspace values.
type WorkspaceListResultPage struct {
fn func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)
wlr WorkspaceListResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *WorkspaceListResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
next, err := page.fn(ctx, page.wlr)
if err != nil {
return err
}
page.wlr = next
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *WorkspaceListResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkspaceListResultPage) NotDone() bool {
return !page.wlr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page WorkspaceListResultPage) Response() WorkspaceListResult {
return page.wlr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page WorkspaceListResultPage) Values() []Workspace {
if page.wlr.IsEmpty() {
return nil
}
return *page.wlr.Value
}
// Creates a new instance of the WorkspaceListResultPage type.
func NewWorkspaceListResultPage(getNextPage func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)) WorkspaceListResultPage {
return WorkspaceListResultPage{fn: getNextPage}
}
// WorkspaceProperties the properties of a machine learning workspace.
type WorkspaceProperties struct {
// WorkspaceID - READ-ONLY; The immutable id associated with this workspace.
WorkspaceID *string `json:"workspaceId,omitempty"`
// Description - The description of this workspace.
Description *string `json:"description,omitempty"`
// FriendlyName - The friendly name for this workspace. This name in mutable
FriendlyName *string `json:"friendlyName,omitempty"`
// CreationTime - READ-ONLY; The creation time of the machine learning workspace in ISO8601 format.
CreationTime *date.Time `json:"creationTime,omitempty"`
// KeyVault - ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created
KeyVault *string `json:"keyVault,omitempty"`
// ApplicationInsights - ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created
ApplicationInsights *string `json:"applicationInsights,omitempty"`
// ContainerRegistry - ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created
ContainerRegistry *string `json:"containerRegistry,omitempty"`
// StorageAccount - ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created
StorageAccount *string `json:"storageAccount,omitempty"`
// DiscoveryURL - Url for the discovery service to identify regional endpoints for machine learning experimentation services
DiscoveryURL *string `json:"discoveryUrl,omitempty"`
// ProvisioningState - READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. Possible values include: 'ProvisioningStateUnknown', 'ProvisioningStateUpdating', 'ProvisioningStateCreating', 'ProvisioningStateDeleting', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Encryption - The encryption settings of Azure ML workspace.
Encryption *EncryptionProperty `json:"encryption,omitempty"`
// HbiWorkspace - The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service
HbiWorkspace *bool `json:"hbiWorkspace,omitempty"`
// ServiceProvisionedResourceGroup - READ-ONLY; The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace
ServiceProvisionedResourceGroup *string `json:"serviceProvisionedResourceGroup,omitempty"`
// PrivateLinkCount - READ-ONLY; Count of private connections in the workspace
PrivateLinkCount *int32 `json:"privateLinkCount,omitempty"`
// ImageBuildCompute - The compute name for image build
ImageBuildCompute *string `json:"imageBuildCompute,omitempty"`
// AllowPublicAccessWhenBehindVnet - The flag to indicate whether to allow public access when behind VNet.
AllowPublicAccessWhenBehindVnet *bool `json:"allowPublicAccessWhenBehindVnet,omitempty"`
// PrivateEndpointConnections - READ-ONLY; The list of private endpoint connections in the workspace.
PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
// SharedPrivateLinkResources - The list of shared private link resources in this workspace.
SharedPrivateLinkResources *[]SharedPrivateLinkResource `json:"sharedPrivateLinkResources,omitempty"`
// NotebookInfo - READ-ONLY; The notebook info of Azure ML workspace.
NotebookInfo *NotebookResourceInfo `json:"notebookInfo,omitempty"`
}
// WorkspacePropertiesUpdateParameters the parameters for updating the properties of a machine learning
// workspace.
type WorkspacePropertiesUpdateParameters struct {
// Description - The description of this workspace.
Description *string `json:"description,omitempty"`
// FriendlyName - The friendly name for this workspace.
FriendlyName *string `json:"friendlyName,omitempty"`
}
// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type WorkspacesCreateOrUpdateFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w Workspace, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("machinelearningservices.WorkspacesCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if w.Response.Response, err = future.GetResult(sender); err == nil && w.Response.Response.StatusCode != http.StatusNoContent {
w, err = client.CreateOrUpdateResponder(w.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "machinelearningservices.WorkspacesCreateOrUpdateFuture", "Result", w.Response.Response, "Failure responding to request")
}
}
return
}
// WorkspaceSku describes Workspace Sku details and features
type WorkspaceSku struct {
// Locations - READ-ONLY; The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
Locations *[]string `json:"locations,omitempty"`
// LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
// Tier - READ-ONLY; Sku Tier like Basic or Enterprise
Tier *string `json:"tier,omitempty"`
// ResourceType - READ-ONLY
ResourceType *string `json:"resourceType,omitempty"`
// Name - READ-ONLY
Name *string `json:"name,omitempty"`
// Capabilities - READ-ONLY; List of features/user capabilities associated with the sku
Capabilities *[]SKUCapability `json:"capabilities,omitempty"`
// Restrictions - The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
Restrictions *[]Restriction `json:"restrictions,omitempty"`
}
// WorkspaceUpdateParameters the parameters for updating a machine learning workspace.
type WorkspaceUpdateParameters struct {
// Tags - The resource tags for the machine learning workspace.
Tags map[string]*string `json:"tags"`
// Sku - The sku of the workspace.
Sku *Sku `json:"sku,omitempty"`
// WorkspacePropertiesUpdateParameters - The properties that the machine learning workspace will be updated with.
*WorkspacePropertiesUpdateParameters `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for WorkspaceUpdateParameters.
func (wup WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if wup.Tags != nil {
objectMap["tags"] = wup.Tags
}
if wup.Sku != nil {
objectMap["sku"] = wup.Sku
}
if wup.WorkspacePropertiesUpdateParameters != nil {
objectMap["properties"] = wup.WorkspacePropertiesUpdateParameters
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for WorkspaceUpdateParameters struct.
func (wup *WorkspaceUpdateParameters) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
wup.Tags = tags
}
case "sku":
if v != nil {
var sku Sku
err = json.Unmarshal(*v, &sku)
if err != nil {
return err
}
wup.Sku = &sku
}
case "properties":
if v != nil {
var workspacePropertiesUpdateParameters WorkspacePropertiesUpdateParameters
err = json.Unmarshal(*v, &workspacePropertiesUpdateParameters)
if err != nil {
return err
}
wup.WorkspacePropertiesUpdateParameters = &workspacePropertiesUpdateParameters
}
}
}
return nil
}
|