1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627
|
package storsimple
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) 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/storsimple8000series/mgmt/2017-06-01/storsimple"
// AccessControlRecord the access control record.
type AccessControlRecord struct {
autorest.Response `json:"-"`
// AccessControlRecordProperties - The properties of access control record.
*AccessControlRecordProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for AccessControlRecord.
func (acr AccessControlRecord) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if acr.AccessControlRecordProperties != nil {
objectMap["properties"] = acr.AccessControlRecordProperties
}
if acr.Kind != "" {
objectMap["kind"] = acr.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AccessControlRecord struct.
func (acr *AccessControlRecord) 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 accessControlRecordProperties AccessControlRecordProperties
err = json.Unmarshal(*v, &accessControlRecordProperties)
if err != nil {
return err
}
acr.AccessControlRecordProperties = &accessControlRecordProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
acr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
acr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
acr.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
acr.Kind = kind
}
}
}
return nil
}
// AccessControlRecordList the collection of access control records.
type AccessControlRecordList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]AccessControlRecord `json:"value,omitempty"`
}
// AccessControlRecordProperties the properties of access control record.
type AccessControlRecordProperties struct {
// InitiatorName - The iSCSI initiator name (IQN).
InitiatorName *string `json:"initiatorName,omitempty"`
// VolumeCount - READ-ONLY; The number of volumes using the access control record.
VolumeCount *int32 `json:"volumeCount,omitempty"`
}
// MarshalJSON is the custom marshaler for AccessControlRecordProperties.
func (acrp AccessControlRecordProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if acrp.InitiatorName != nil {
objectMap["initiatorName"] = acrp.InitiatorName
}
return json.Marshal(objectMap)
}
// AccessControlRecordsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type AccessControlRecordsCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(AccessControlRecordsClient) (AccessControlRecord, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *AccessControlRecordsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for AccessControlRecordsCreateOrUpdateFuture.Result.
func (future *AccessControlRecordsCreateOrUpdateFuture) result(client AccessControlRecordsClient) (acr AccessControlRecord, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
acr.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if acr.Response.Response, err = future.GetResult(sender); err == nil && acr.Response.Response.StatusCode != http.StatusNoContent {
acr, err = client.CreateOrUpdateResponder(acr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsCreateOrUpdateFuture", "Result", acr.Response.Response, "Failure responding to request")
}
}
return
}
// AccessControlRecordsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type AccessControlRecordsDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(AccessControlRecordsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *AccessControlRecordsDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for AccessControlRecordsDeleteFuture.Result.
func (future *AccessControlRecordsDeleteFuture) result(client AccessControlRecordsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.AccessControlRecordsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.AccessControlRecordsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// AcsConfiguration the ACS configuration.
type AcsConfiguration struct {
// Namespace - The namespace.
Namespace *string `json:"namespace,omitempty"`
// Realm - The realm.
Realm *string `json:"realm,omitempty"`
// ServiceURL - The service URL.
ServiceURL *string `json:"serviceUrl,omitempty"`
}
// Alert the alert.
type Alert struct {
// AlertProperties - The properties of the alert.
*AlertProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Alert.
func (a Alert) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if a.AlertProperties != nil {
objectMap["properties"] = a.AlertProperties
}
if a.Kind != "" {
objectMap["kind"] = a.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Alert struct.
func (a *Alert) 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 alertProperties AlertProperties
err = json.Unmarshal(*v, &alertProperties)
if err != nil {
return err
}
a.AlertProperties = &alertProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
a.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
a.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
a.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
a.Kind = kind
}
}
}
return nil
}
// AlertErrorDetails the details of the error for which the alert was raised
type AlertErrorDetails struct {
// ErrorCode - The error code
ErrorCode *string `json:"errorCode,omitempty"`
// ErrorMessage - The error message
ErrorMessage *string `json:"errorMessage,omitempty"`
// Occurences - The number of occurrences
Occurences *int32 `json:"occurences,omitempty"`
}
// AlertFilter the OData filters to be used for Alert
type AlertFilter struct {
// Status - Specifies the status of the alerts to be filtered. Only 'Equality' operator is supported for this property. Possible values include: 'Active', 'Cleared'
Status AlertStatus `json:"status,omitempty"`
// Severity - Specifies the severity of the alerts to be filtered. Only 'Equality' operator is supported for this property. Possible values include: 'Informational', 'Warning', 'Critical'
Severity AlertSeverity `json:"severity,omitempty"`
// SourceType - Specifies the source type of the alerts to be filtered. Only 'Equality' operator is supported for this property. Possible values include: 'AlertSourceTypeResource', 'AlertSourceTypeDevice'
SourceType AlertSourceType `json:"sourceType,omitempty"`
// SourceName - Specifies the source name of the alerts to be filtered. Only 'Equality' operator is supported for this property.
SourceName *string `json:"sourceName,omitempty"`
// AppearedOnTime - Specifies the appeared time (in UTC) of the alerts to be filtered. Only 'Greater-Than' and 'Lesser-Than' operators are supported for this property.
AppearedOnTime *date.Time `json:"appearedOnTime,omitempty"`
}
// AlertList the collection of alerts.
type AlertList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Alert `json:"value,omitempty"`
// NextLink - The URI of the next page of alerts.
NextLink *string `json:"nextLink,omitempty"`
}
// AlertListIterator provides access to a complete listing of Alert values.
type AlertListIterator struct {
i int
page AlertListPage
}
// 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 *AlertListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AlertListIterator.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 *AlertListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AlertListIterator) 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 AlertListIterator) Response() AlertList {
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 AlertListIterator) Value() Alert {
if !iter.page.NotDone() {
return Alert{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AlertListIterator type.
func NewAlertListIterator(page AlertListPage) AlertListIterator {
return AlertListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (al AlertList) IsEmpty() bool {
return al.Value == nil || len(*al.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (al AlertList) hasNextLink() bool {
return al.NextLink != nil && len(*al.NextLink) != 0
}
// alertListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (al AlertList) alertListPreparer(ctx context.Context) (*http.Request, error) {
if !al.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(al.NextLink)))
}
// AlertListPage contains a page of Alert values.
type AlertListPage struct {
fn func(context.Context, AlertList) (AlertList, error)
al AlertList
}
// 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 *AlertListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AlertListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.al)
if err != nil {
return err
}
page.al = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
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 *AlertListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AlertListPage) NotDone() bool {
return !page.al.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AlertListPage) Response() AlertList {
return page.al
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AlertListPage) Values() []Alert {
if page.al.IsEmpty() {
return nil
}
return *page.al.Value
}
// Creates a new instance of the AlertListPage type.
func NewAlertListPage(cur AlertList, getNextPage func(context.Context, AlertList) (AlertList, error)) AlertListPage {
return AlertListPage{
fn: getNextPage,
al: cur,
}
}
// AlertNotificationProperties the properties of the alert notification settings.
type AlertNotificationProperties struct {
// EmailNotification - Indicates whether email notification enabled or not. Possible values include: 'Enabled', 'Disabled'
EmailNotification AlertEmailNotificationStatus `json:"emailNotification,omitempty"`
// AlertNotificationCulture - The alert notification culture.
AlertNotificationCulture *string `json:"alertNotificationCulture,omitempty"`
// NotificationToServiceOwners - The value indicating whether alert notification enabled for admin or not. Possible values include: 'Enabled', 'Disabled'
NotificationToServiceOwners AlertEmailNotificationStatus `json:"notificationToServiceOwners,omitempty"`
// AdditionalRecipientEmailList - The alert notification email list.
AdditionalRecipientEmailList *[]string `json:"additionalRecipientEmailList,omitempty"`
}
// AlertProperties the properties of alert
type AlertProperties struct {
// Title - The title of the alert
Title *string `json:"title,omitempty"`
// Scope - The scope of the alert. Possible values include: 'AlertScopeResource', 'AlertScopeDevice'
Scope AlertScope `json:"scope,omitempty"`
// AlertType - The type of the alert
AlertType *string `json:"alertType,omitempty"`
// AppearedAtTime - The UTC time at which the alert was raised
AppearedAtTime *date.Time `json:"appearedAtTime,omitempty"`
// AppearedAtSourceTime - The source time at which the alert was raised
AppearedAtSourceTime *date.Time `json:"appearedAtSourceTime,omitempty"`
// ClearedAtTime - The UTC time at which the alert was cleared
ClearedAtTime *date.Time `json:"clearedAtTime,omitempty"`
// ClearedAtSourceTime - The source time at which the alert was cleared
ClearedAtSourceTime *date.Time `json:"clearedAtSourceTime,omitempty"`
// Source - The source at which the alert was raised
Source *AlertSource `json:"source,omitempty"`
// Recommendation - The recommended action for the issue raised in the alert
Recommendation *string `json:"recommendation,omitempty"`
// ResolutionReason - The reason for resolving the alert
ResolutionReason *string `json:"resolutionReason,omitempty"`
// Severity - The severity of the alert. Possible values include: 'Informational', 'Warning', 'Critical'
Severity AlertSeverity `json:"severity,omitempty"`
// Status - The current status of the alert. Possible values include: 'Active', 'Cleared'
Status AlertStatus `json:"status,omitempty"`
// ErrorDetails - The details of the error for which the alert was raised
ErrorDetails *AlertErrorDetails `json:"errorDetails,omitempty"`
// DetailedInformation - More details about the alert
DetailedInformation map[string]*string `json:"detailedInformation"`
}
// MarshalJSON is the custom marshaler for AlertProperties.
func (ap AlertProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ap.Title != nil {
objectMap["title"] = ap.Title
}
if ap.Scope != "" {
objectMap["scope"] = ap.Scope
}
if ap.AlertType != nil {
objectMap["alertType"] = ap.AlertType
}
if ap.AppearedAtTime != nil {
objectMap["appearedAtTime"] = ap.AppearedAtTime
}
if ap.AppearedAtSourceTime != nil {
objectMap["appearedAtSourceTime"] = ap.AppearedAtSourceTime
}
if ap.ClearedAtTime != nil {
objectMap["clearedAtTime"] = ap.ClearedAtTime
}
if ap.ClearedAtSourceTime != nil {
objectMap["clearedAtSourceTime"] = ap.ClearedAtSourceTime
}
if ap.Source != nil {
objectMap["source"] = ap.Source
}
if ap.Recommendation != nil {
objectMap["recommendation"] = ap.Recommendation
}
if ap.ResolutionReason != nil {
objectMap["resolutionReason"] = ap.ResolutionReason
}
if ap.Severity != "" {
objectMap["severity"] = ap.Severity
}
if ap.Status != "" {
objectMap["status"] = ap.Status
}
if ap.ErrorDetails != nil {
objectMap["errorDetails"] = ap.ErrorDetails
}
if ap.DetailedInformation != nil {
objectMap["detailedInformation"] = ap.DetailedInformation
}
return json.Marshal(objectMap)
}
// AlertSettings the alert settings.
type AlertSettings struct {
autorest.Response `json:"-"`
// AlertNotificationProperties - The properties of the alert notification settings.
*AlertNotificationProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for AlertSettings.
func (as AlertSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if as.AlertNotificationProperties != nil {
objectMap["properties"] = as.AlertNotificationProperties
}
if as.Kind != "" {
objectMap["kind"] = as.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AlertSettings struct.
func (as *AlertSettings) 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 alertNotificationProperties AlertNotificationProperties
err = json.Unmarshal(*v, &alertNotificationProperties)
if err != nil {
return err
}
as.AlertNotificationProperties = &alertNotificationProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
as.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
as.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
as.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
as.Kind = kind
}
}
}
return nil
}
// AlertSource the source details at which the alert was raised
type AlertSource struct {
// Name - The name of the source
Name *string `json:"name,omitempty"`
// TimeZone - The time zone of the source
TimeZone *string `json:"timeZone,omitempty"`
// AlertSourceType - The source type of the alert. Possible values include: 'AlertSourceTypeResource', 'AlertSourceTypeDevice'
AlertSourceType AlertSourceType `json:"alertSourceType,omitempty"`
}
// AsymmetricEncryptedSecret represent the secrets intended for encryption with asymmetric key pair.
type AsymmetricEncryptedSecret struct {
// Value - The value of the secret.
Value *string `json:"value,omitempty"`
// EncryptionCertThumbprint - Thumbprint certificate that was used to encrypt "Value". If the value in unencrypted, it will be null.
EncryptionCertThumbprint *string `json:"encryptionCertThumbprint,omitempty"`
// EncryptionAlgorithm - The algorithm used to encrypt "Value". Possible values include: 'EncryptionAlgorithmNone', 'EncryptionAlgorithmAES256', 'EncryptionAlgorithmRSAESPKCS1V15'
EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"`
}
// AvailableProviderOperation represents available provider operation.
type AvailableProviderOperation struct {
// Name - The name of the operation being performed on a particular object. Name format: "{resourceProviderNamespace}/{resourceType}/{read|write|delete|action}". Eg. Microsoft.StorSimple/managers/devices/volumeContainers/read, Microsoft.StorSimple/managers/devices/alerts/clearAlerts/action
Name *string `json:"name,omitempty"`
// Display - Contains the localized display information for this particular operation/action.
Display *AvailableProviderOperationDisplay `json:"display,omitempty"`
// Origin - The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is "user,system"
Origin *string `json:"origin,omitempty"`
// Properties - Reserved for future use.
Properties interface{} `json:"properties,omitempty"`
}
// AvailableProviderOperationDisplay contains the localized display information for this particular
// operation/action. These value will be used by several clients for (a) custom role definitions for RBAC,
// (b) complex query filters for the event service and (c) audit history/records for management operations.
type AvailableProviderOperationDisplay struct {
// Provider - The localized friendly form of the resource provider name - it is expected to also include the publisher/company responsible. It should use Title Casing and begin with 'Microsoft' for 1st party services.
Provider *string `json:"provider,omitempty"`
// Resource - The localized friendly form of the resource type related to this action/operation - it should match the public documentation for the resource provider. It should use Title Casing - for examples, please refer to the 'name' section.
Resource *string `json:"resource,omitempty"`
// Operation - The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing and include the entity/resource to which it applies.
Operation *string `json:"operation,omitempty"`
// Description - The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise - it will be used in tool tips and detailed views.
Description *string `json:"description,omitempty"`
}
// AvailableProviderOperationList list of available provider operations.
type AvailableProviderOperationList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]AvailableProviderOperation `json:"value,omitempty"`
// NextLink - The NextLink.
NextLink *string `json:"nextLink,omitempty"`
}
// AvailableProviderOperationListIterator provides access to a complete listing of
// AvailableProviderOperation values.
type AvailableProviderOperationListIterator struct {
i int
page AvailableProviderOperationListPage
}
// 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 *AvailableProviderOperationListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AvailableProviderOperationListIterator.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 *AvailableProviderOperationListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AvailableProviderOperationListIterator) 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 AvailableProviderOperationListIterator) Response() AvailableProviderOperationList {
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 AvailableProviderOperationListIterator) Value() AvailableProviderOperation {
if !iter.page.NotDone() {
return AvailableProviderOperation{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AvailableProviderOperationListIterator type.
func NewAvailableProviderOperationListIterator(page AvailableProviderOperationListPage) AvailableProviderOperationListIterator {
return AvailableProviderOperationListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (apol AvailableProviderOperationList) IsEmpty() bool {
return apol.Value == nil || len(*apol.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (apol AvailableProviderOperationList) hasNextLink() bool {
return apol.NextLink != nil && len(*apol.NextLink) != 0
}
// availableProviderOperationListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (apol AvailableProviderOperationList) availableProviderOperationListPreparer(ctx context.Context) (*http.Request, error) {
if !apol.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(apol.NextLink)))
}
// AvailableProviderOperationListPage contains a page of AvailableProviderOperation values.
type AvailableProviderOperationListPage struct {
fn func(context.Context, AvailableProviderOperationList) (AvailableProviderOperationList, error)
apol AvailableProviderOperationList
}
// 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 *AvailableProviderOperationListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AvailableProviderOperationListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.apol)
if err != nil {
return err
}
page.apol = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
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 *AvailableProviderOperationListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AvailableProviderOperationListPage) NotDone() bool {
return !page.apol.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AvailableProviderOperationListPage) Response() AvailableProviderOperationList {
return page.apol
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AvailableProviderOperationListPage) Values() []AvailableProviderOperation {
if page.apol.IsEmpty() {
return nil
}
return *page.apol.Value
}
// Creates a new instance of the AvailableProviderOperationListPage type.
func NewAvailableProviderOperationListPage(cur AvailableProviderOperationList, getNextPage func(context.Context, AvailableProviderOperationList) (AvailableProviderOperationList, error)) AvailableProviderOperationListPage {
return AvailableProviderOperationListPage{
fn: getNextPage,
apol: cur,
}
}
// Backup the backup.
type Backup struct {
// BackupProperties - The properties of the backup.
*BackupProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Backup.
func (b Backup) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if b.BackupProperties != nil {
objectMap["properties"] = b.BackupProperties
}
if b.Kind != "" {
objectMap["kind"] = b.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Backup struct.
func (b *Backup) 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 backupProperties BackupProperties
err = json.Unmarshal(*v, &backupProperties)
if err != nil {
return err
}
b.BackupProperties = &backupProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
b.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
b.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
b.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
b.Kind = kind
}
}
}
return nil
}
// BackupElement the backup element.
type BackupElement struct {
// ElementID - The path ID that uniquely identifies the backup element.
ElementID *string `json:"elementId,omitempty"`
// ElementName - The name of the backup element.
ElementName *string `json:"elementName,omitempty"`
// ElementType - The hierarchical type of the backup element.
ElementType *string `json:"elementType,omitempty"`
// SizeInBytes - The size in bytes.
SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
// VolumeName - The name of the volume.
VolumeName *string `json:"volumeName,omitempty"`
// VolumeContainerID - The path ID of the volume container.
VolumeContainerID *string `json:"volumeContainerId,omitempty"`
// VolumeType - The volume type. Possible values include: 'Tiered', 'Archival', 'LocallyPinned'
VolumeType VolumeType `json:"volumeType,omitempty"`
}
// BackupFilter the OData filters to be used for backups.
type BackupFilter struct {
// BackupPolicyID - Specifies the backupPolicyId of the backups to be filtered. Only 'Equality' operator is supported for this property.
BackupPolicyID *string `json:"backupPolicyId,omitempty"`
// VolumeID - Specifies the volumeId of the backups to be filtered. Only 'Equality' operator is supported for this property.
VolumeID *string `json:"volumeId,omitempty"`
// CreatedTime - Specifies the creation time of the backups to be filtered. Only 'Greater Than or Equal To' and 'Lesser Than or Equal To' operators are supported for this property.
CreatedTime *date.Time `json:"createdTime,omitempty"`
}
// BackupList the collection of backups.
type BackupList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Backup `json:"value,omitempty"`
// NextLink - The NextLink.
NextLink *string `json:"nextLink,omitempty"`
}
// BackupListIterator provides access to a complete listing of Backup values.
type BackupListIterator struct {
i int
page BackupListPage
}
// 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 *BackupListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/BackupListIterator.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 *BackupListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter BackupListIterator) 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 BackupListIterator) Response() BackupList {
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 BackupListIterator) Value() Backup {
if !iter.page.NotDone() {
return Backup{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the BackupListIterator type.
func NewBackupListIterator(page BackupListPage) BackupListIterator {
return BackupListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (bl BackupList) IsEmpty() bool {
return bl.Value == nil || len(*bl.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (bl BackupList) hasNextLink() bool {
return bl.NextLink != nil && len(*bl.NextLink) != 0
}
// backupListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (bl BackupList) backupListPreparer(ctx context.Context) (*http.Request, error) {
if !bl.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(bl.NextLink)))
}
// BackupListPage contains a page of Backup values.
type BackupListPage struct {
fn func(context.Context, BackupList) (BackupList, error)
bl BackupList
}
// 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 *BackupListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/BackupListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.bl)
if err != nil {
return err
}
page.bl = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
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 *BackupListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page BackupListPage) NotDone() bool {
return !page.bl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page BackupListPage) Response() BackupList {
return page.bl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page BackupListPage) Values() []Backup {
if page.bl.IsEmpty() {
return nil
}
return *page.bl.Value
}
// Creates a new instance of the BackupListPage type.
func NewBackupListPage(cur BackupList, getNextPage func(context.Context, BackupList) (BackupList, error)) BackupListPage {
return BackupListPage{
fn: getNextPage,
bl: cur,
}
}
// BackupPoliciesBackupNowFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BackupPoliciesBackupNowFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupPoliciesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupPoliciesBackupNowFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupPoliciesBackupNowFuture.Result.
func (future *BackupPoliciesBackupNowFuture) result(client BackupPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesBackupNowFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesBackupNowFuture")
return
}
ar.Response = future.Response()
return
}
// BackupPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type BackupPoliciesCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupPoliciesClient) (BackupPolicy, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupPoliciesCreateOrUpdateFuture.Result.
func (future *BackupPoliciesCreateOrUpdateFuture) result(client BackupPoliciesClient) (bp BackupPolicy, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
bp.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if bp.Response.Response, err = future.GetResult(sender); err == nil && bp.Response.Response.StatusCode != http.StatusNoContent {
bp, err = client.CreateOrUpdateResponder(bp.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesCreateOrUpdateFuture", "Result", bp.Response.Response, "Failure responding to request")
}
}
return
}
// BackupPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BackupPoliciesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupPoliciesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupPoliciesDeleteFuture.Result.
func (future *BackupPoliciesDeleteFuture) result(client BackupPoliciesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupPoliciesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// BackupPolicy the backup policy.
type BackupPolicy struct {
autorest.Response `json:"-"`
// BackupPolicyProperties - The properties of the backup policy.
*BackupPolicyProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for BackupPolicy.
func (bp BackupPolicy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bp.BackupPolicyProperties != nil {
objectMap["properties"] = bp.BackupPolicyProperties
}
if bp.Kind != "" {
objectMap["kind"] = bp.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for BackupPolicy struct.
func (bp *BackupPolicy) 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 backupPolicyProperties BackupPolicyProperties
err = json.Unmarshal(*v, &backupPolicyProperties)
if err != nil {
return err
}
bp.BackupPolicyProperties = &backupPolicyProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
bp.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
bp.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bp.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
bp.Kind = kind
}
}
}
return nil
}
// BackupPolicyList the collection of backup policies.
type BackupPolicyList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]BackupPolicy `json:"value,omitempty"`
}
// BackupPolicyProperties the properties of the backup policy.
type BackupPolicyProperties struct {
// VolumeIds - The path IDs of the volumes which are part of the backup policy.
VolumeIds *[]string `json:"volumeIds,omitempty"`
// NextBackupTime - READ-ONLY; The time of the next backup for the backup policy.
NextBackupTime *date.Time `json:"nextBackupTime,omitempty"`
// LastBackupTime - READ-ONLY; The time of the last backup for the backup policy.
LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
// SchedulesCount - READ-ONLY; The count of schedules the backup policy contains.
SchedulesCount *int64 `json:"schedulesCount,omitempty"`
// ScheduledBackupStatus - READ-ONLY; Indicates whether at least one of the schedules in the backup policy is active or not. Possible values include: 'ScheduledBackupStatusDisabled', 'ScheduledBackupStatusEnabled'
ScheduledBackupStatus ScheduledBackupStatus `json:"scheduledBackupStatus,omitempty"`
// BackupPolicyCreationType - READ-ONLY; The backup policy creation type. Indicates whether this was created through SaaS or through StorSimple Snapshot Manager. Possible values include: 'BackupPolicyCreationTypeBySaaS', 'BackupPolicyCreationTypeBySSM'
BackupPolicyCreationType BackupPolicyCreationType `json:"backupPolicyCreationType,omitempty"`
// SsmHostName - READ-ONLY; If the backup policy was created by StorSimple Snapshot Manager, then this field indicates the hostname of the StorSimple Snapshot Manager.
SsmHostName *string `json:"ssmHostName,omitempty"`
}
// MarshalJSON is the custom marshaler for BackupPolicyProperties.
func (bpp BackupPolicyProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bpp.VolumeIds != nil {
objectMap["volumeIds"] = bpp.VolumeIds
}
return json.Marshal(objectMap)
}
// BackupProperties the properties of the backup.
type BackupProperties struct {
// CreatedOn - The time when the backup was created.
CreatedOn *date.Time `json:"createdOn,omitempty"`
// SizeInBytes - The backup size in bytes.
SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
// BackupType - The type of the backup. Possible values include: 'LocalSnapshot', 'CloudSnapshot'
BackupType BackupType `json:"backupType,omitempty"`
// BackupJobCreationType - The backup job creation type. Possible values include: 'Adhoc', 'BySchedule', 'BySSM'
BackupJobCreationType BackupJobCreationType `json:"backupJobCreationType,omitempty"`
// BackupPolicyID - The path ID of the backup policy.
BackupPolicyID *string `json:"backupPolicyId,omitempty"`
// SsmHostName - The StorSimple Snapshot Manager host name.
SsmHostName *string `json:"ssmHostName,omitempty"`
// Elements - The backup elements.
Elements *[]BackupElement `json:"elements,omitempty"`
}
// BackupSchedule the backup schedule.
type BackupSchedule struct {
autorest.Response `json:"-"`
// BackupScheduleProperties - The properties of the backup schedule.
*BackupScheduleProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for BackupSchedule.
func (bs BackupSchedule) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bs.BackupScheduleProperties != nil {
objectMap["properties"] = bs.BackupScheduleProperties
}
if bs.Kind != "" {
objectMap["kind"] = bs.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for BackupSchedule struct.
func (bs *BackupSchedule) 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 backupScheduleProperties BackupScheduleProperties
err = json.Unmarshal(*v, &backupScheduleProperties)
if err != nil {
return err
}
bs.BackupScheduleProperties = &backupScheduleProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
bs.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
bs.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bs.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
bs.Kind = kind
}
}
}
return nil
}
// BackupScheduleList the backup schedule list.
type BackupScheduleList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]BackupSchedule `json:"value,omitempty"`
}
// BackupScheduleProperties the properties of the backup schedule.
type BackupScheduleProperties struct {
// ScheduleRecurrence - The schedule recurrence.
ScheduleRecurrence *ScheduleRecurrence `json:"scheduleRecurrence,omitempty"`
// BackupType - The type of backup which needs to be taken. Possible values include: 'LocalSnapshot', 'CloudSnapshot'
BackupType BackupType `json:"backupType,omitempty"`
// RetentionCount - The number of backups to be retained.
RetentionCount *int64 `json:"retentionCount,omitempty"`
// StartTime - The start time of the schedule.
StartTime *date.Time `json:"startTime,omitempty"`
// ScheduleStatus - The schedule status. Possible values include: 'ScheduleStatusEnabled', 'ScheduleStatusDisabled'
ScheduleStatus ScheduleStatus `json:"scheduleStatus,omitempty"`
// LastSuccessfulRun - READ-ONLY; The last successful backup run which was triggered for the schedule.
LastSuccessfulRun *date.Time `json:"lastSuccessfulRun,omitempty"`
}
// MarshalJSON is the custom marshaler for BackupScheduleProperties.
func (bsp BackupScheduleProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bsp.ScheduleRecurrence != nil {
objectMap["scheduleRecurrence"] = bsp.ScheduleRecurrence
}
if bsp.BackupType != "" {
objectMap["backupType"] = bsp.BackupType
}
if bsp.RetentionCount != nil {
objectMap["retentionCount"] = bsp.RetentionCount
}
if bsp.StartTime != nil {
objectMap["startTime"] = bsp.StartTime
}
if bsp.ScheduleStatus != "" {
objectMap["scheduleStatus"] = bsp.ScheduleStatus
}
return json.Marshal(objectMap)
}
// BackupSchedulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type BackupSchedulesCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupSchedulesClient) (BackupSchedule, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupSchedulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupSchedulesCreateOrUpdateFuture.Result.
func (future *BackupSchedulesCreateOrUpdateFuture) result(client BackupSchedulesClient) (bs BackupSchedule, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
bs.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
bs, err = client.CreateOrUpdateResponder(bs.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesCreateOrUpdateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
}
return
}
// BackupSchedulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BackupSchedulesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupSchedulesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupSchedulesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupSchedulesDeleteFuture.Result.
func (future *BackupSchedulesDeleteFuture) result(client BackupSchedulesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupSchedulesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupSchedulesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// BackupsCloneFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type BackupsCloneFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupsCloneFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupsCloneFuture.Result.
func (future *BackupsCloneFuture) result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupsCloneFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupsCloneFuture")
return
}
ar.Response = future.Response()
return
}
// BackupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BackupsDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupsDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupsDeleteFuture.Result.
func (future *BackupsDeleteFuture) result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// BackupsRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BackupsRestoreFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BackupsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BackupsRestoreFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BackupsRestoreFuture.Result.
func (future *BackupsRestoreFuture) result(client BackupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BackupsRestoreFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BackupsRestoreFuture")
return
}
ar.Response = future.Response()
return
}
// BandwidthRateSettingProperties the properties of the bandwidth setting.
type BandwidthRateSettingProperties struct {
// Schedules - The schedules.
Schedules *[]BandwidthSchedule `json:"schedules,omitempty"`
// VolumeCount - READ-ONLY; The number of volumes that uses the bandwidth setting.
VolumeCount *int32 `json:"volumeCount,omitempty"`
}
// MarshalJSON is the custom marshaler for BandwidthRateSettingProperties.
func (brsp BandwidthRateSettingProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if brsp.Schedules != nil {
objectMap["schedules"] = brsp.Schedules
}
return json.Marshal(objectMap)
}
// BandwidthSchedule the schedule for bandwidth setting.
type BandwidthSchedule struct {
// Start - The start time of the schedule.
Start *Time `json:"start,omitempty"`
// Stop - The stop time of the schedule.
Stop *Time `json:"stop,omitempty"`
// RateInMbps - The rate in Mbps.
RateInMbps *int32 `json:"rateInMbps,omitempty"`
// Days - The days of the week when this schedule is applicable.
Days *[]DayOfWeek `json:"days,omitempty"`
}
// BandwidthSetting the bandwidth setting.
type BandwidthSetting struct {
autorest.Response `json:"-"`
// BandwidthRateSettingProperties - The properties of the bandwidth setting.
*BandwidthRateSettingProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for BandwidthSetting.
func (bs BandwidthSetting) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bs.BandwidthRateSettingProperties != nil {
objectMap["properties"] = bs.BandwidthRateSettingProperties
}
if bs.Kind != "" {
objectMap["kind"] = bs.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for BandwidthSetting struct.
func (bs *BandwidthSetting) 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 bandwidthRateSettingProperties BandwidthRateSettingProperties
err = json.Unmarshal(*v, &bandwidthRateSettingProperties)
if err != nil {
return err
}
bs.BandwidthRateSettingProperties = &bandwidthRateSettingProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
bs.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
bs.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
bs.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
bs.Kind = kind
}
}
}
return nil
}
// BandwidthSettingList the collection of bandwidth setting entities.
type BandwidthSettingList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]BandwidthSetting `json:"value,omitempty"`
}
// BandwidthSettingsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type BandwidthSettingsCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BandwidthSettingsClient) (BandwidthSetting, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BandwidthSettingsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BandwidthSettingsCreateOrUpdateFuture.Result.
func (future *BandwidthSettingsCreateOrUpdateFuture) result(client BandwidthSettingsClient) (bs BandwidthSetting, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
bs.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if bs.Response.Response, err = future.GetResult(sender); err == nil && bs.Response.Response.StatusCode != http.StatusNoContent {
bs, err = client.CreateOrUpdateResponder(bs.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsCreateOrUpdateFuture", "Result", bs.Response.Response, "Failure responding to request")
}
}
return
}
// BandwidthSettingsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type BandwidthSettingsDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(BandwidthSettingsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *BandwidthSettingsDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for BandwidthSettingsDeleteFuture.Result.
func (future *BandwidthSettingsDeleteFuture) result(client BandwidthSettingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.BandwidthSettingsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.BandwidthSettingsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// BaseModel represents the base class for all other ARM object models
type BaseModel struct {
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for BaseModel.
func (bm BaseModel) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if bm.Kind != "" {
objectMap["kind"] = bm.Kind
}
return json.Marshal(objectMap)
}
// ChapSettings the Challenge-Handshake Authentication Protocol (CHAP) settings.
type ChapSettings struct {
// InitiatorUser - The CHAP initiator user.
InitiatorUser *string `json:"initiatorUser,omitempty"`
// InitiatorSecret - The CHAP initiator secret.
InitiatorSecret *AsymmetricEncryptedSecret `json:"initiatorSecret,omitempty"`
// TargetUser - The CHAP target user.
TargetUser *string `json:"targetUser,omitempty"`
// TargetSecret - The target secret.
TargetSecret *AsymmetricEncryptedSecret `json:"targetSecret,omitempty"`
}
// ClearAlertRequest the request for clearing the alert
type ClearAlertRequest struct {
// ResolutionMessage - The resolution message while clearing the alert
ResolutionMessage *string `json:"resolutionMessage,omitempty"`
// Alerts - The list of alert IDs to be cleared
Alerts *[]string `json:"alerts,omitempty"`
}
// CloneRequest the clone job request.
type CloneRequest struct {
// TargetDeviceID - The path ID of the device which will act as the clone target.
TargetDeviceID *string `json:"targetDeviceId,omitempty"`
// TargetVolumeName - The name of the new volume which will be created and the backup will be cloned into.
TargetVolumeName *string `json:"targetVolumeName,omitempty"`
// TargetAccessControlRecordIds - The list of path IDs of the access control records to be associated to the new cloned volume.
TargetAccessControlRecordIds *[]string `json:"targetAccessControlRecordIds,omitempty"`
// BackupElement - The backup element that is cloned.
BackupElement *BackupElement `json:"backupElement,omitempty"`
}
// CloudAppliance the cloud appliance.
type CloudAppliance struct {
// Name - The name.
Name *string `json:"name,omitempty"`
// VnetName - The name of the virtual network.
VnetName *string `json:"vnetName,omitempty"`
// VnetRegion - The virtual network region.
VnetRegion *string `json:"vnetRegion,omitempty"`
// IsVnetDNSConfigured - Indicates whether virtual network used is configured with DNS or not.
IsVnetDNSConfigured *bool `json:"isVnetDnsConfigured,omitempty"`
// IsVnetExpressConfigured - Indicates whether virtual network used is configured with express route or not.
IsVnetExpressConfigured *bool `json:"isVnetExpressConfigured,omitempty"`
// SubnetName - The name of the subnet.
SubnetName *string `json:"subnetName,omitempty"`
// StorageAccountName - The name of the storage account.
StorageAccountName *string `json:"storageAccountName,omitempty"`
// StorageAccountType - The type of the storage account.
StorageAccountType *string `json:"storageAccountType,omitempty"`
// VMType - The type of the virtual machine.
VMType *string `json:"vmType,omitempty"`
// VMImageName - The name of the virtual machine image.
VMImageName *string `json:"vmImageName,omitempty"`
// ModelNumber - The model number.
ModelNumber *string `json:"modelNumber,omitempty"`
}
// CloudApplianceConfiguration the cloud appliance configuration
type CloudApplianceConfiguration struct {
// CloudApplianceConfigurationProperties - The properties.
*CloudApplianceConfigurationProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for CloudApplianceConfiguration.
func (cac CloudApplianceConfiguration) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cac.CloudApplianceConfigurationProperties != nil {
objectMap["properties"] = cac.CloudApplianceConfigurationProperties
}
if cac.Kind != "" {
objectMap["kind"] = cac.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for CloudApplianceConfiguration struct.
func (cac *CloudApplianceConfiguration) 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 cloudApplianceConfigurationProperties CloudApplianceConfigurationProperties
err = json.Unmarshal(*v, &cloudApplianceConfigurationProperties)
if err != nil {
return err
}
cac.CloudApplianceConfigurationProperties = &cloudApplianceConfigurationProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
cac.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
cac.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
cac.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
cac.Kind = kind
}
}
}
return nil
}
// CloudApplianceConfigurationList the cloud appliance configuration list
type CloudApplianceConfigurationList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]CloudApplianceConfiguration `json:"value,omitempty"`
}
// CloudApplianceConfigurationProperties the properties of cloud appliance configuration.
type CloudApplianceConfigurationProperties struct {
// ModelNumber - The model number.
ModelNumber *string `json:"modelNumber,omitempty"`
// CloudPlatform - The cloud platform.
CloudPlatform *string `json:"cloudPlatform,omitempty"`
// AcsConfiguration - The ACS configuration.
AcsConfiguration *AcsConfiguration `json:"acsConfiguration,omitempty"`
// SupportedStorageAccountTypes - The supported storage account types.
SupportedStorageAccountTypes *[]string `json:"supportedStorageAccountTypes,omitempty"`
// SupportedRegions - The supported regions.
SupportedRegions *[]string `json:"supportedRegions,omitempty"`
// SupportedVMTypes - The supported virtual machine types.
SupportedVMTypes *[]string `json:"supportedVmTypes,omitempty"`
// SupportedVMImages - The supported virtual machine images.
SupportedVMImages *[]VMImage `json:"supportedVmImages,omitempty"`
}
// CloudApplianceSettings the cloud appliance settings.
type CloudApplianceSettings struct {
// ServiceDataEncryptionKey - The service data encryption key (encrypted with DAK).
ServiceDataEncryptionKey *AsymmetricEncryptedSecret `json:"serviceDataEncryptionKey,omitempty"`
// ChannelIntegrityKey - The channel integrity key (encrypted with DAK).
ChannelIntegrityKey *AsymmetricEncryptedSecret `json:"channelIntegrityKey,omitempty"`
}
// CloudAppliancesProvisionFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type CloudAppliancesProvisionFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(CloudAppliancesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *CloudAppliancesProvisionFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for CloudAppliancesProvisionFuture.Result.
func (future *CloudAppliancesProvisionFuture) result(client CloudAppliancesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.CloudAppliancesProvisionFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.CloudAppliancesProvisionFuture")
return
}
ar.Response = future.Response()
return
}
// ConfigureDeviceRequest the mandatory device configuration request.
type ConfigureDeviceRequest struct {
// ConfigureDeviceRequestProperties - The properties of the configure device request.
*ConfigureDeviceRequestProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for ConfigureDeviceRequest.
func (cdr ConfigureDeviceRequest) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cdr.ConfigureDeviceRequestProperties != nil {
objectMap["properties"] = cdr.ConfigureDeviceRequestProperties
}
if cdr.Kind != "" {
objectMap["kind"] = cdr.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ConfigureDeviceRequest struct.
func (cdr *ConfigureDeviceRequest) 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 configureDeviceRequestProperties ConfigureDeviceRequestProperties
err = json.Unmarshal(*v, &configureDeviceRequestProperties)
if err != nil {
return err
}
cdr.ConfigureDeviceRequestProperties = &configureDeviceRequestProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
cdr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
cdr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
cdr.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
cdr.Kind = kind
}
}
}
return nil
}
// ConfigureDeviceRequestProperties the properties of the configure device request.
type ConfigureDeviceRequestProperties struct {
// FriendlyName - The friendly name for the device.
FriendlyName *string `json:"friendlyName,omitempty"`
// CurrentDeviceName - The current name of the device.
CurrentDeviceName *string `json:"currentDeviceName,omitempty"`
// TimeZone - The device time zone. For eg: "Pacific Standard Time"
TimeZone *string `json:"timeZone,omitempty"`
// DNSSettings - The secondary DNS Settings of the device.
DNSSettings *SecondaryDNSSettings `json:"dnsSettings,omitempty"`
// NetworkInterfaceData0Settings - The 'Data 0' network interface card settings.
NetworkInterfaceData0Settings *NetworkInterfaceData0Settings `json:"networkInterfaceData0Settings,omitempty"`
}
// ControllerPowerStateChangeRequest the controller power state change request.
type ControllerPowerStateChangeRequest struct {
// ControllerPowerStateChangeRequestProperties - The properties of the controller power state change request.
*ControllerPowerStateChangeRequestProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for ControllerPowerStateChangeRequest.
func (cpscr ControllerPowerStateChangeRequest) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if cpscr.ControllerPowerStateChangeRequestProperties != nil {
objectMap["properties"] = cpscr.ControllerPowerStateChangeRequestProperties
}
if cpscr.Kind != "" {
objectMap["kind"] = cpscr.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ControllerPowerStateChangeRequest struct.
func (cpscr *ControllerPowerStateChangeRequest) 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 controllerPowerStateChangeRequestProperties ControllerPowerStateChangeRequestProperties
err = json.Unmarshal(*v, &controllerPowerStateChangeRequestProperties)
if err != nil {
return err
}
cpscr.ControllerPowerStateChangeRequestProperties = &controllerPowerStateChangeRequestProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
cpscr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
cpscr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
cpscr.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
cpscr.Kind = kind
}
}
}
return nil
}
// ControllerPowerStateChangeRequestProperties the properties of the controller power state change request.
type ControllerPowerStateChangeRequestProperties struct {
// Action - The power state that the request is expecting for the controller of the device. Possible values include: 'Start', 'Restart', 'Shutdown'
Action ControllerPowerStateAction `json:"action,omitempty"`
// ActiveController - The active controller that the request is expecting on the device. Possible values include: 'ControllerIDUnknown', 'ControllerIDNone', 'ControllerIDController0', 'ControllerIDController1'
ActiveController ControllerID `json:"activeController,omitempty"`
// Controller0State - The controller 0's status that the request is expecting on the device. Possible values include: 'ControllerStatusNotPresent', 'ControllerStatusPoweredOff', 'ControllerStatusOk', 'ControllerStatusRecovering', 'ControllerStatusWarning', 'ControllerStatusFailure'
Controller0State ControllerStatus `json:"controller0State,omitempty"`
// Controller1State - The controller 1's status that the request is expecting on the device. Possible values include: 'ControllerStatusNotPresent', 'ControllerStatusPoweredOff', 'ControllerStatusOk', 'ControllerStatusRecovering', 'ControllerStatusWarning', 'ControllerStatusFailure'
Controller1State ControllerStatus `json:"controller1State,omitempty"`
}
// DataStatistics the additional details related to the data related statistics of a job. Currently
// applicable only for Backup, Clone and Restore jobs.
type DataStatistics struct {
// TotalData - The total bytes of data to be processed, as part of the job.
TotalData *int64 `json:"totalData,omitempty"`
// ProcessedData - The number of bytes of data processed till now, as part of the job.
ProcessedData *int64 `json:"processedData,omitempty"`
// CloudData - The number of bytes of data written to cloud, as part of the job.
CloudData *int64 `json:"cloudData,omitempty"`
// Throughput - The average throughput of data processed(bytes/sec), as part of the job.
Throughput *int64 `json:"throughput,omitempty"`
}
// Device the StorSimple device.
type Device struct {
autorest.Response `json:"-"`
// DeviceProperties - The properties of the StorSimple device.
*DeviceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Device.
func (d Device) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if d.DeviceProperties != nil {
objectMap["properties"] = d.DeviceProperties
}
if d.Kind != "" {
objectMap["kind"] = d.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Device struct.
func (d *Device) 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 deviceProperties DeviceProperties
err = json.Unmarshal(*v, &deviceProperties)
if err != nil {
return err
}
d.DeviceProperties = &deviceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
d.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
d.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
d.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
d.Kind = kind
}
}
}
return nil
}
// DeviceDetails the additional device details regarding the end point count and volume container count.
type DeviceDetails struct {
// EndpointCount - The total number of endpoints that are currently on the device ( i.e. number of volumes).
EndpointCount *int32 `json:"endpointCount,omitempty"`
// VolumeContainerCount - The total number of volume containers on the device.
VolumeContainerCount *int32 `json:"volumeContainerCount,omitempty"`
}
// DeviceList the collection of devices.
type DeviceList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Device `json:"value,omitempty"`
}
// DevicePatch the device patch.
type DevicePatch struct {
// DevicePatchProperties - The properties of the device patch.
*DevicePatchProperties `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for DevicePatch.
func (dp DevicePatch) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if dp.DevicePatchProperties != nil {
objectMap["properties"] = dp.DevicePatchProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for DevicePatch struct.
func (dp *DevicePatch) 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 devicePatchProperties DevicePatchProperties
err = json.Unmarshal(*v, &devicePatchProperties)
if err != nil {
return err
}
dp.DevicePatchProperties = &devicePatchProperties
}
}
}
return nil
}
// DevicePatchProperties the properties of the device patch.
type DevicePatchProperties struct {
// DeviceDescription - Short description given for the device
DeviceDescription *string `json:"deviceDescription,omitempty"`
}
// DeviceProperties the properties of the StorSimple device.
type DeviceProperties struct {
// FriendlyName - The friendly name of the device.
FriendlyName *string `json:"friendlyName,omitempty"`
// ActivationTime - The UTC time at which the device was activated
ActivationTime *date.Time `json:"activationTime,omitempty"`
// Culture - The language culture setting on the device. For eg: "en-US"
Culture *string `json:"culture,omitempty"`
// DeviceDescription - The device description.
DeviceDescription *string `json:"deviceDescription,omitempty"`
// DeviceSoftwareVersion - The version number of the software running on the device.
DeviceSoftwareVersion *string `json:"deviceSoftwareVersion,omitempty"`
// FriendlySoftwareName - The friendly name of the software running on the device.
FriendlySoftwareName *string `json:"friendlySoftwareName,omitempty"`
// DeviceConfigurationStatus - The current configuration status of the device. Possible values include: 'Complete', 'Pending'
DeviceConfigurationStatus DeviceConfigurationStatus `json:"deviceConfigurationStatus,omitempty"`
// TargetIqn - The target IQN.
TargetIqn *string `json:"targetIqn,omitempty"`
// ModelDescription - The device model.
ModelDescription *string `json:"modelDescription,omitempty"`
// Status - The current status of the device. Possible values include: 'Unknown', 'Online', 'Offline', 'Deactivated', 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', 'Deactivating', 'Deleted', 'ReadyToSetup'
Status DeviceStatus `json:"status,omitempty"`
// SerialNumber - The serial number.
SerialNumber *string `json:"serialNumber,omitempty"`
// DeviceType - The type of the device. Possible values include: 'DeviceTypeInvalid', 'DeviceTypeSeries8000VirtualAppliance', 'DeviceTypeSeries8000PhysicalAppliance'
DeviceType DeviceType `json:"deviceType,omitempty"`
// ActiveController - The identifier of the active controller of the device. Possible values include: 'ControllerIDUnknown', 'ControllerIDNone', 'ControllerIDController0', 'ControllerIDController1'
ActiveController ControllerID `json:"activeController,omitempty"`
// FriendlySoftwareVersion - The device friendly software version.
FriendlySoftwareVersion *string `json:"friendlySoftwareVersion,omitempty"`
// AvailableLocalStorageInBytes - The storage in bytes that is available locally on the device.
AvailableLocalStorageInBytes *int64 `json:"availableLocalStorageInBytes,omitempty"`
// AvailableTieredStorageInBytes - The storage in bytes that is available on the device for tiered volumes.
AvailableTieredStorageInBytes *int64 `json:"availableTieredStorageInBytes,omitempty"`
// ProvisionedTieredStorageInBytes - The storage in bytes that has been provisioned on the device for tiered volumes.
ProvisionedTieredStorageInBytes *int64 `json:"provisionedTieredStorageInBytes,omitempty"`
// ProvisionedLocalStorageInBytes - The storage in bytes used for locally pinned volumes on the device (including additional local reservation).
ProvisionedLocalStorageInBytes *int64 `json:"provisionedLocalStorageInBytes,omitempty"`
// ProvisionedVolumeSizeInBytes - Total capacity in bytes of tiered and locally pinned volumes on the device
ProvisionedVolumeSizeInBytes *int64 `json:"provisionedVolumeSizeInBytes,omitempty"`
// UsingStorageInBytes - The storage in bytes that is currently being used on the device, including both local and cloud.
UsingStorageInBytes *int64 `json:"usingStorageInBytes,omitempty"`
// TotalTieredStorageInBytes - The total tiered storage available on the device in bytes.
TotalTieredStorageInBytes *int64 `json:"totalTieredStorageInBytes,omitempty"`
// AgentGroupVersion - The device agent group version.
AgentGroupVersion *int32 `json:"agentGroupVersion,omitempty"`
// NetworkInterfaceCardCount - The number of network interface cards
NetworkInterfaceCardCount *int32 `json:"networkInterfaceCardCount,omitempty"`
// DeviceLocation - The location of the virtual appliance.
DeviceLocation *string `json:"deviceLocation,omitempty"`
// VirtualMachineAPIType - READ-ONLY; The virtual machine API type. Possible values include: 'Classic', 'Arm'
VirtualMachineAPIType VirtualMachineAPIType `json:"virtualMachineApiType,omitempty"`
// Details - The additional device details regarding the end point count and volume container count.
Details *DeviceDetails `json:"details,omitempty"`
// RolloverDetails - The additional device details for the service data encryption key rollover.
RolloverDetails *DeviceRolloverDetails `json:"rolloverDetails,omitempty"`
}
// MarshalJSON is the custom marshaler for DeviceProperties.
func (dp DeviceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if dp.FriendlyName != nil {
objectMap["friendlyName"] = dp.FriendlyName
}
if dp.ActivationTime != nil {
objectMap["activationTime"] = dp.ActivationTime
}
if dp.Culture != nil {
objectMap["culture"] = dp.Culture
}
if dp.DeviceDescription != nil {
objectMap["deviceDescription"] = dp.DeviceDescription
}
if dp.DeviceSoftwareVersion != nil {
objectMap["deviceSoftwareVersion"] = dp.DeviceSoftwareVersion
}
if dp.FriendlySoftwareName != nil {
objectMap["friendlySoftwareName"] = dp.FriendlySoftwareName
}
if dp.DeviceConfigurationStatus != "" {
objectMap["deviceConfigurationStatus"] = dp.DeviceConfigurationStatus
}
if dp.TargetIqn != nil {
objectMap["targetIqn"] = dp.TargetIqn
}
if dp.ModelDescription != nil {
objectMap["modelDescription"] = dp.ModelDescription
}
if dp.Status != "" {
objectMap["status"] = dp.Status
}
if dp.SerialNumber != nil {
objectMap["serialNumber"] = dp.SerialNumber
}
if dp.DeviceType != "" {
objectMap["deviceType"] = dp.DeviceType
}
if dp.ActiveController != "" {
objectMap["activeController"] = dp.ActiveController
}
if dp.FriendlySoftwareVersion != nil {
objectMap["friendlySoftwareVersion"] = dp.FriendlySoftwareVersion
}
if dp.AvailableLocalStorageInBytes != nil {
objectMap["availableLocalStorageInBytes"] = dp.AvailableLocalStorageInBytes
}
if dp.AvailableTieredStorageInBytes != nil {
objectMap["availableTieredStorageInBytes"] = dp.AvailableTieredStorageInBytes
}
if dp.ProvisionedTieredStorageInBytes != nil {
objectMap["provisionedTieredStorageInBytes"] = dp.ProvisionedTieredStorageInBytes
}
if dp.ProvisionedLocalStorageInBytes != nil {
objectMap["provisionedLocalStorageInBytes"] = dp.ProvisionedLocalStorageInBytes
}
if dp.ProvisionedVolumeSizeInBytes != nil {
objectMap["provisionedVolumeSizeInBytes"] = dp.ProvisionedVolumeSizeInBytes
}
if dp.UsingStorageInBytes != nil {
objectMap["usingStorageInBytes"] = dp.UsingStorageInBytes
}
if dp.TotalTieredStorageInBytes != nil {
objectMap["totalTieredStorageInBytes"] = dp.TotalTieredStorageInBytes
}
if dp.AgentGroupVersion != nil {
objectMap["agentGroupVersion"] = dp.AgentGroupVersion
}
if dp.NetworkInterfaceCardCount != nil {
objectMap["networkInterfaceCardCount"] = dp.NetworkInterfaceCardCount
}
if dp.DeviceLocation != nil {
objectMap["deviceLocation"] = dp.DeviceLocation
}
if dp.Details != nil {
objectMap["details"] = dp.Details
}
if dp.RolloverDetails != nil {
objectMap["rolloverDetails"] = dp.RolloverDetails
}
return json.Marshal(objectMap)
}
// DeviceRolloverDetails the additional device details for the service data encryption key rollover.
type DeviceRolloverDetails struct {
// AuthorizationEligibility - The eligibility status of device for service data encryption key rollover. Possible values include: 'InEligible', 'Eligible'
AuthorizationEligibility AuthorizationEligibility `json:"authorizationEligibility,omitempty"`
// AuthorizationStatus - The authorization status of the device for service data encryption key rollover. Possible values include: 'AuthorizationStatusDisabled', 'AuthorizationStatusEnabled'
AuthorizationStatus AuthorizationStatus `json:"authorizationStatus,omitempty"`
// InEligibilityReason - The reason for inEligibility of device, in case it's not eligible for service data encryption key rollover. Possible values include: 'DeviceNotOnline', 'NotSupportedAppliance', 'RolloverPending'
InEligibilityReason InEligibilityCategory `json:"inEligibilityReason,omitempty"`
}
// DevicesConfigureFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesConfigureFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesConfigureFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesConfigureFuture.Result.
func (future *DevicesConfigureFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesConfigureFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesConfigureFuture")
return
}
ar.Response = future.Response()
return
}
// DevicesDeactivateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesDeactivateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesDeactivateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesDeactivateFuture.Result.
func (future *DevicesDeactivateFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesDeactivateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeactivateFuture")
return
}
ar.Response = future.Response()
return
}
// DevicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesDeleteFuture.Result.
func (future *DevicesDeleteFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// DeviceSettingsCreateOrUpdateAlertSettingsFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type DeviceSettingsCreateOrUpdateAlertSettingsFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DeviceSettingsClient) (AlertSettings, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DeviceSettingsCreateOrUpdateAlertSettingsFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DeviceSettingsCreateOrUpdateAlertSettingsFuture.Result.
func (future *DeviceSettingsCreateOrUpdateAlertSettingsFuture) result(client DeviceSettingsClient) (as AlertSettings, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
as.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if as.Response.Response, err = future.GetResult(sender); err == nil && as.Response.Response.StatusCode != http.StatusNoContent {
as, err = client.CreateOrUpdateAlertSettingsResponder(as.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateAlertSettingsFuture", "Result", as.Response.Response, "Failure responding to request")
}
}
return
}
// DeviceSettingsCreateOrUpdateTimeSettingsFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type DeviceSettingsCreateOrUpdateTimeSettingsFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DeviceSettingsClient) (TimeSettings, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DeviceSettingsCreateOrUpdateTimeSettingsFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DeviceSettingsCreateOrUpdateTimeSettingsFuture.Result.
func (future *DeviceSettingsCreateOrUpdateTimeSettingsFuture) result(client DeviceSettingsClient) (ts TimeSettings, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ts.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if ts.Response.Response, err = future.GetResult(sender); err == nil && ts.Response.Response.StatusCode != http.StatusNoContent {
ts, err = client.CreateOrUpdateTimeSettingsResponder(ts.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsCreateOrUpdateTimeSettingsFuture", "Result", ts.Response.Response, "Failure responding to request")
}
}
return
}
// DeviceSettingsSyncRemotemanagementCertificateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type DeviceSettingsSyncRemotemanagementCertificateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DeviceSettingsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DeviceSettingsSyncRemotemanagementCertificateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DeviceSettingsSyncRemotemanagementCertificateFuture.Result.
func (future *DeviceSettingsSyncRemotemanagementCertificateFuture) result(client DeviceSettingsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsSyncRemotemanagementCertificateFuture")
return
}
ar.Response = future.Response()
return
}
// DeviceSettingsUpdateNetworkSettingsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DeviceSettingsUpdateNetworkSettingsFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DeviceSettingsClient) (NetworkSettings, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DeviceSettingsUpdateNetworkSettingsFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DeviceSettingsUpdateNetworkSettingsFuture.Result.
func (future *DeviceSettingsUpdateNetworkSettingsFuture) result(client DeviceSettingsClient) (ns NetworkSettings, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ns.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateNetworkSettingsFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if ns.Response.Response, err = future.GetResult(sender); err == nil && ns.Response.Response.StatusCode != http.StatusNoContent {
ns, err = client.UpdateNetworkSettingsResponder(ns.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateNetworkSettingsFuture", "Result", ns.Response.Response, "Failure responding to request")
}
}
return
}
// DeviceSettingsUpdateSecuritySettingsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DeviceSettingsUpdateSecuritySettingsFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DeviceSettingsClient) (SecuritySettings, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DeviceSettingsUpdateSecuritySettingsFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DeviceSettingsUpdateSecuritySettingsFuture.Result.
func (future *DeviceSettingsUpdateSecuritySettingsFuture) result(client DeviceSettingsClient) (ss SecuritySettings, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ss.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DeviceSettingsUpdateSecuritySettingsFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if ss.Response.Response, err = future.GetResult(sender); err == nil && ss.Response.Response.StatusCode != http.StatusNoContent {
ss, err = client.UpdateSecuritySettingsResponder(ss.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DeviceSettingsUpdateSecuritySettingsFuture", "Result", ss.Response.Response, "Failure responding to request")
}
}
return
}
// DevicesFailoverFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesFailoverFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesFailoverFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesFailoverFuture.Result.
func (future *DevicesFailoverFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesFailoverFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesFailoverFuture")
return
}
ar.Response = future.Response()
return
}
// DevicesInstallUpdatesFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesInstallUpdatesFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesInstallUpdatesFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesInstallUpdatesFuture.Result.
func (future *DevicesInstallUpdatesFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesInstallUpdatesFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesInstallUpdatesFuture")
return
}
ar.Response = future.Response()
return
}
// DevicesScanForUpdatesFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DevicesScanForUpdatesFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(DevicesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *DevicesScanForUpdatesFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for DevicesScanForUpdatesFuture.Result.
func (future *DevicesScanForUpdatesFuture) result(client DevicesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.DevicesScanForUpdatesFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.DevicesScanForUpdatesFuture")
return
}
ar.Response = future.Response()
return
}
// DimensionFilter the dimension filter.
type DimensionFilter struct {
// Name - Specifies the dimension name. E.g., NetworkInterface. Valid values are the ones specified in the field "dimensions" in the ListMetricDefinitions call. Only 'Equality' operator is supported for this property.
Name *string `json:"name,omitempty"`
// Values - Specifies the dimension value. E.g., Data0. Valid values are the ones returned in the field "dimensions" in the ListMetricDefinitions call. Only 'Equality' operator is supported for this property.
Values *string `json:"values,omitempty"`
}
// DNSSettings the DNS(Domain Name Server) settings of a device.
type DNSSettings struct {
// PrimaryDNSServer - The primary IPv4 DNS server for the device
PrimaryDNSServer *string `json:"primaryDnsServer,omitempty"`
// PrimaryIpv6DNSServer - The primary IPv6 DNS server for the device
PrimaryIpv6DNSServer *string `json:"primaryIpv6DnsServer,omitempty"`
// SecondaryDNSServers - The secondary IPv4 DNS server for the device
SecondaryDNSServers *[]string `json:"secondaryDnsServers,omitempty"`
// SecondaryIpv6DNSServers - The secondary IPv6 DNS server for the device
SecondaryIpv6DNSServers *[]string `json:"secondaryIpv6DnsServers,omitempty"`
}
// EncryptionSettings the encryption settings.
type EncryptionSettings struct {
autorest.Response `json:"-"`
// EncryptionSettingsProperties - The properties of the encryption settings.
*EncryptionSettingsProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for EncryptionSettings.
func (es EncryptionSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if es.EncryptionSettingsProperties != nil {
objectMap["properties"] = es.EncryptionSettingsProperties
}
if es.Kind != "" {
objectMap["kind"] = es.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for EncryptionSettings struct.
func (es *EncryptionSettings) 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 encryptionSettingsProperties EncryptionSettingsProperties
err = json.Unmarshal(*v, &encryptionSettingsProperties)
if err != nil {
return err
}
es.EncryptionSettingsProperties = &encryptionSettingsProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
es.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
es.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
es.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
es.Kind = kind
}
}
}
return nil
}
// EncryptionSettingsProperties the properties of encryption settings.
type EncryptionSettingsProperties struct {
// EncryptionStatus - The encryption status to indicates if encryption is enabled or not. Possible values include: 'EncryptionStatusEnabled', 'EncryptionStatusDisabled'
EncryptionStatus EncryptionStatus `json:"encryptionStatus,omitempty"`
// KeyRolloverStatus - The key rollover status to indicates if key rollover is required or not. If secret's encryption has been upgraded, then it requires key rollover. Possible values include: 'Required', 'NotRequired'
KeyRolloverStatus KeyRolloverStatus `json:"keyRolloverStatus,omitempty"`
}
// FailoverRequest the request object for triggering a failover of volume containers, from a source device
// to a target device.
type FailoverRequest struct {
// TargetDeviceID - The ARM path ID of the device which will act as the failover target.
TargetDeviceID *string `json:"targetDeviceId,omitempty"`
// VolumeContainers - The list of path IDs of the volume containers which needs to be failed-over to the target device.
VolumeContainers *[]string `json:"volumeContainers,omitempty"`
}
// FailoverSet the failover set on a device.
type FailoverSet struct {
// VolumeContainers - The list of meta data of volume containers, which are part of the failover set.
VolumeContainers *[]VolumeContainerFailoverMetadata `json:"volumeContainers,omitempty"`
// EligibilityResult - The eligibility result of the failover set, for failover.
EligibilityResult *FailoverSetEligibilityResult `json:"eligibilityResult,omitempty"`
}
// FailoverSetEligibilityResult the eligibility result of failover set, for failover.
type FailoverSetEligibilityResult struct {
// IsEligibleForFailover - Represents if this failover set is eligible for failover or not.
IsEligibleForFailover *bool `json:"isEligibleForFailover,omitempty"`
// ErrorMessage - The error message, if the failover set is not eligible for failover.
ErrorMessage *string `json:"errorMessage,omitempty"`
}
// FailoverSetsList the list of failover sets.
type FailoverSetsList struct {
autorest.Response `json:"-"`
// Value - The list of failover sets.
Value *[]FailoverSet `json:"value,omitempty"`
}
// FailoverTarget represents the eligibility of a device as a failover target device.
type FailoverTarget struct {
// DeviceID - The path ID of the device.
DeviceID *string `json:"deviceId,omitempty"`
// DeviceStatus - The status of the device. Possible values include: 'Unknown', 'Online', 'Offline', 'Deactivated', 'RequiresAttention', 'MaintenanceMode', 'Creating', 'Provisioning', 'Deactivating', 'Deleted', 'ReadyToSetup'
DeviceStatus DeviceStatus `json:"deviceStatus,omitempty"`
// ModelDescription - The model number of the device.
ModelDescription *string `json:"modelDescription,omitempty"`
// DeviceSoftwareVersion - The software version of the device.
DeviceSoftwareVersion *string `json:"deviceSoftwareVersion,omitempty"`
// DataContainersCount - The count of data containers on the device.
DataContainersCount *int32 `json:"dataContainersCount,omitempty"`
// VolumesCount - The count of volumes on the device.
VolumesCount *int32 `json:"volumesCount,omitempty"`
// AvailableLocalStorageInBytes - The amount of free local storage available on the device in bytes.
AvailableLocalStorageInBytes *int64 `json:"availableLocalStorageInBytes,omitempty"`
// AvailableTieredStorageInBytes - The amount of free tiered storage available for the device in bytes.
AvailableTieredStorageInBytes *int64 `json:"availableTieredStorageInBytes,omitempty"`
// DeviceLocation - The geo location (applicable only for cloud appliances) of the device.
DeviceLocation *string `json:"deviceLocation,omitempty"`
// FriendlyDeviceSoftwareVersion - The friendly name for the current version of software on the device.
FriendlyDeviceSoftwareVersion *string `json:"friendlyDeviceSoftwareVersion,omitempty"`
// EligibilityResult - The eligibility result of the device, as a failover target device.
EligibilityResult *TargetEligibilityResult `json:"eligibilityResult,omitempty"`
}
// FailoverTargetsList the list of all devices in a resource and their eligibility status as a failover
// target device.
type FailoverTargetsList struct {
autorest.Response `json:"-"`
// Value - The list of all the failover targets.
Value *[]FailoverTarget `json:"value,omitempty"`
}
// Feature the feature.
type Feature struct {
// Name - The name of the feature.
Name *string `json:"name,omitempty"`
// Status - The feature support status. Possible values include: 'NotAvailable', 'UnsupportedDeviceVersion', 'Supported'
Status FeatureSupportStatus `json:"status,omitempty"`
}
// FeatureFilter the OData filter to be used for features.
type FeatureFilter struct {
// DeviceID - Specifies the device ID for which the features are required. Only 'Equality' operator is supported for this property.
DeviceID *string `json:"deviceId,omitempty"`
}
// FeatureList the collections of features.
type FeatureList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Feature `json:"value,omitempty"`
}
// HardwareComponent the hardware component.
type HardwareComponent struct {
// ComponentID - The component ID.
ComponentID *string `json:"componentId,omitempty"`
// DisplayName - The display name of the hardware component.
DisplayName *string `json:"displayName,omitempty"`
// Status - The status of the hardware component. Possible values include: 'HardwareComponentStatusUnknown', 'HardwareComponentStatusNotPresent', 'HardwareComponentStatusPoweredOff', 'HardwareComponentStatusOk', 'HardwareComponentStatusRecovering', 'HardwareComponentStatusWarning', 'HardwareComponentStatusFailure'
Status HardwareComponentStatus `json:"status,omitempty"`
// StatusDisplayName - The display name of the status of hardware component.
StatusDisplayName *string `json:"statusDisplayName,omitempty"`
}
// HardwareComponentGroup the hardware component group.
type HardwareComponentGroup struct {
// HardwareComponentGroupProperties - The properties of the hardware component group.
*HardwareComponentGroupProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for HardwareComponentGroup.
func (hcg HardwareComponentGroup) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if hcg.HardwareComponentGroupProperties != nil {
objectMap["properties"] = hcg.HardwareComponentGroupProperties
}
if hcg.Kind != "" {
objectMap["kind"] = hcg.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for HardwareComponentGroup struct.
func (hcg *HardwareComponentGroup) 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 hardwareComponentGroupProperties HardwareComponentGroupProperties
err = json.Unmarshal(*v, &hardwareComponentGroupProperties)
if err != nil {
return err
}
hcg.HardwareComponentGroupProperties = &hardwareComponentGroupProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
hcg.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
hcg.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
hcg.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
hcg.Kind = kind
}
}
}
return nil
}
// HardwareComponentGroupList the collection of hardware component groups.
type HardwareComponentGroupList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]HardwareComponentGroup `json:"value,omitempty"`
}
// HardwareComponentGroupProperties the properties of hardware component group.
type HardwareComponentGroupProperties struct {
// DisplayName - The display name the hardware component group.
DisplayName *string `json:"displayName,omitempty"`
// LastUpdatedTime - The last updated time.
LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
// Components - The list of hardware components.
Components *[]HardwareComponent `json:"components,omitempty"`
}
// HardwareComponentGroupsChangeControllerPowerStateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type HardwareComponentGroupsChangeControllerPowerStateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(HardwareComponentGroupsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *HardwareComponentGroupsChangeControllerPowerStateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for HardwareComponentGroupsChangeControllerPowerStateFuture.Result.
func (future *HardwareComponentGroupsChangeControllerPowerStateFuture) result(client HardwareComponentGroupsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.HardwareComponentGroupsChangeControllerPowerStateFuture")
return
}
ar.Response = future.Response()
return
}
// Job the job.
type Job struct {
autorest.Response `json:"-"`
// Status - The current status of the job. Possible values include: 'Running', 'Succeeded', 'Failed', 'Canceled'
Status JobStatus `json:"status,omitempty"`
// StartTime - The UTC time at which the job was started.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - The UTC time at which the job completed.
EndTime *date.Time `json:"endTime,omitempty"`
// PercentComplete - The percentage of the job that is already complete.
PercentComplete *int32 `json:"percentComplete,omitempty"`
// Error - The error details, if any, for the job.
Error *JobErrorDetails `json:"error,omitempty"`
// JobProperties - The properties of the job.
*JobProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Job.
func (j Job) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if j.Status != "" {
objectMap["status"] = j.Status
}
if j.StartTime != nil {
objectMap["startTime"] = j.StartTime
}
if j.EndTime != nil {
objectMap["endTime"] = j.EndTime
}
if j.PercentComplete != nil {
objectMap["percentComplete"] = j.PercentComplete
}
if j.Error != nil {
objectMap["error"] = j.Error
}
if j.JobProperties != nil {
objectMap["properties"] = j.JobProperties
}
if j.Kind != "" {
objectMap["kind"] = j.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Job struct.
func (j *Job) 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 "status":
if v != nil {
var status JobStatus
err = json.Unmarshal(*v, &status)
if err != nil {
return err
}
j.Status = status
}
case "startTime":
if v != nil {
var startTime date.Time
err = json.Unmarshal(*v, &startTime)
if err != nil {
return err
}
j.StartTime = &startTime
}
case "endTime":
if v != nil {
var endTime date.Time
err = json.Unmarshal(*v, &endTime)
if err != nil {
return err
}
j.EndTime = &endTime
}
case "percentComplete":
if v != nil {
var percentComplete int32
err = json.Unmarshal(*v, &percentComplete)
if err != nil {
return err
}
j.PercentComplete = &percentComplete
}
case "error":
if v != nil {
var errorVar JobErrorDetails
err = json.Unmarshal(*v, &errorVar)
if err != nil {
return err
}
j.Error = &errorVar
}
case "properties":
if v != nil {
var jobProperties JobProperties
err = json.Unmarshal(*v, &jobProperties)
if err != nil {
return err
}
j.JobProperties = &jobProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
j.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
j.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
j.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
j.Kind = kind
}
}
}
return nil
}
// JobErrorDetails the job error details. Contains list of job error items.
type JobErrorDetails struct {
// ErrorDetails - The error details.
ErrorDetails *[]JobErrorItem `json:"errorDetails,omitempty"`
// Code - The error code intended for programmatic access.
Code *string `json:"code,omitempty"`
// Message - The error message intended to describe the error in detail.
Message *string `json:"message,omitempty"`
}
// JobErrorItem the job error items.
type JobErrorItem struct {
// Recommendations - The recommended actions.
Recommendations *[]string `json:"recommendations,omitempty"`
// Code - The error code intended for programmatic access.
Code *string `json:"code,omitempty"`
// Message - The error message intended to describe the error in detail.
Message *string `json:"message,omitempty"`
}
// JobFilter the OData filter to be used for jobs.
type JobFilter struct {
// Status - Specifies the status of the jobs to be filtered. For e.g., "Running", "Succeeded", "Failed" or "Canceled". Only 'Equality' operator is supported for this property.
Status *string `json:"status,omitempty"`
// JobType - Specifies the type of the jobs to be filtered. For e.g., "ScheduledBackup", "ManualBackup", "RestoreBackup", "CloneVolume", "FailoverVolumeContainers", "CreateLocallyPinnedVolume", "ModifyVolume", "InstallUpdates", "SupportPackageLogs", or "CreateCloudAppliance". Only 'Equality' operator can be used for this property.
JobType *string `json:"jobType,omitempty"`
// StartTime - Specifies the start time of the jobs to be filtered. Only 'Greater Than or Equal To' and 'Lesser Than or Equal To' operators are supported for this property.
StartTime *date.Time `json:"startTime,omitempty"`
}
// JobList the collection of jobs.
type JobList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Job `json:"value,omitempty"`
// NextLink - The NextLink.
NextLink *string `json:"nextLink,omitempty"`
}
// JobListIterator provides access to a complete listing of Job values.
type JobListIterator struct {
i int
page JobListPage
}
// 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 *JobListIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/JobListIterator.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 *JobListIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JobListIterator) 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 JobListIterator) Response() JobList {
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 JobListIterator) Value() Job {
if !iter.page.NotDone() {
return Job{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the JobListIterator type.
func NewJobListIterator(page JobListPage) JobListIterator {
return JobListIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (jl JobList) IsEmpty() bool {
return jl.Value == nil || len(*jl.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (jl JobList) hasNextLink() bool {
return jl.NextLink != nil && len(*jl.NextLink) != 0
}
// jobListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (jl JobList) jobListPreparer(ctx context.Context) (*http.Request, error) {
if !jl.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jl.NextLink)))
}
// JobListPage contains a page of Job values.
type JobListPage struct {
fn func(context.Context, JobList) (JobList, error)
jl JobList
}
// 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 *JobListPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/JobListPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.jl)
if err != nil {
return err
}
page.jl = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
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 *JobListPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JobListPage) NotDone() bool {
return !page.jl.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page JobListPage) Response() JobList {
return page.jl
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page JobListPage) Values() []Job {
if page.jl.IsEmpty() {
return nil
}
return *page.jl.Value
}
// Creates a new instance of the JobListPage type.
func NewJobListPage(cur JobList, getNextPage func(context.Context, JobList) (JobList, error)) JobListPage {
return JobListPage{
fn: getNextPage,
jl: cur,
}
}
// JobProperties the properties of the job.
type JobProperties struct {
// JobType - The type of the job. Possible values include: 'ScheduledBackup', 'ManualBackup', 'RestoreBackup', 'CloneVolume', 'FailoverVolumeContainers', 'CreateLocallyPinnedVolume', 'ModifyVolume', 'InstallUpdates', 'SupportPackageLogs', 'CreateCloudAppliance'
JobType JobType `json:"jobType,omitempty"`
// DataStats - The data statistics properties of the job.
DataStats *DataStatistics `json:"dataStats,omitempty"`
// EntityLabel - The entity identifier for which the job ran.
EntityLabel *string `json:"entityLabel,omitempty"`
// EntityType - The entity type for which the job ran.
EntityType *string `json:"entityType,omitempty"`
// JobStages - The job stages.
JobStages *[]JobStage `json:"jobStages,omitempty"`
// DeviceID - The device ID in which the job ran.
DeviceID *string `json:"deviceId,omitempty"`
// IsCancellable - Represents whether the job is cancellable or not.
IsCancellable *bool `json:"isCancellable,omitempty"`
// BackupType - The backup type (CloudSnapshot | LocalSnapshot). Applicable only for backup jobs. Possible values include: 'LocalSnapshot', 'CloudSnapshot'
BackupType BackupType `json:"backupType,omitempty"`
// SourceDeviceID - The source device ID of the failover job.
SourceDeviceID *string `json:"sourceDeviceId,omitempty"`
// BackupPointInTime - The time of the backup used for the failover.
BackupPointInTime *date.Time `json:"backupPointInTime,omitempty"`
}
// JobsCancelFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type JobsCancelFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(JobsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *JobsCancelFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for JobsCancelFuture.Result.
func (future *JobsCancelFuture) result(client JobsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.JobsCancelFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.JobsCancelFuture")
return
}
ar.Response = future.Response()
return
}
// JobStage the details about the specific stage of a job.
type JobStage struct {
// Message - The message of the job stage.
Message *string `json:"message,omitempty"`
// StageStatus - The stage status. Possible values include: 'Running', 'Succeeded', 'Failed', 'Canceled'
StageStatus JobStatus `json:"stageStatus,omitempty"`
// Detail - The details of the stage.
Detail *string `json:"detail,omitempty"`
// ErrorCode - The error code of the stage if any.
ErrorCode *string `json:"errorCode,omitempty"`
}
// Key the key.
type Key struct {
autorest.Response `json:"-"`
// ActivationKey - The activation key for the device.
ActivationKey *string `json:"activationKey,omitempty"`
}
// ListFailoverTargetsRequest the request object for fetching the list of failover targets (eligible
// devices for failover).
type ListFailoverTargetsRequest struct {
// VolumeContainers - The list of path IDs of the volume containers that needs to be failed-over, for which we want to fetch the eligible targets.
VolumeContainers *[]string `json:"volumeContainers,omitempty"`
}
// Manager the StorSimple Manager.
type Manager struct {
autorest.Response `json:"-"`
// ManagerProperties - The properties of the StorSimple Manager.
*ManagerProperties `json:"properties,omitempty"`
// Etag - The etag of the manager.
Etag *string `json:"etag,omitempty"`
// ID - READ-ONLY; The resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The resource name.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The resource type.
Type *string `json:"type,omitempty"`
// Location - The geo location of the resource.
Location *string `json:"location,omitempty"`
// Tags - The tags attached to the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for Manager.
func (mVar Manager) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if mVar.ManagerProperties != nil {
objectMap["properties"] = mVar.ManagerProperties
}
if mVar.Etag != nil {
objectMap["etag"] = mVar.Etag
}
if mVar.Location != nil {
objectMap["location"] = mVar.Location
}
if mVar.Tags != nil {
objectMap["tags"] = mVar.Tags
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Manager struct.
func (mVar *Manager) 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 managerProperties ManagerProperties
err = json.Unmarshal(*v, &managerProperties)
if err != nil {
return err
}
mVar.ManagerProperties = &managerProperties
}
case "etag":
if v != nil {
var etag string
err = json.Unmarshal(*v, &etag)
if err != nil {
return err
}
mVar.Etag = &etag
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
mVar.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
mVar.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
mVar.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
mVar.Location = &location
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
mVar.Tags = tags
}
}
}
return nil
}
// ManagerExtendedInfo the extended info of the manager.
type ManagerExtendedInfo struct {
autorest.Response `json:"-"`
// ManagerExtendedInfoProperties - The extended info properties.
*ManagerExtendedInfoProperties `json:"properties,omitempty"`
// Etag - The etag of the resource.
Etag *string `json:"etag,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for ManagerExtendedInfo.
func (mei ManagerExtendedInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if mei.ManagerExtendedInfoProperties != nil {
objectMap["properties"] = mei.ManagerExtendedInfoProperties
}
if mei.Etag != nil {
objectMap["etag"] = mei.Etag
}
if mei.Kind != "" {
objectMap["kind"] = mei.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ManagerExtendedInfo struct.
func (mei *ManagerExtendedInfo) 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 managerExtendedInfoProperties ManagerExtendedInfoProperties
err = json.Unmarshal(*v, &managerExtendedInfoProperties)
if err != nil {
return err
}
mei.ManagerExtendedInfoProperties = &managerExtendedInfoProperties
}
case "etag":
if v != nil {
var etag string
err = json.Unmarshal(*v, &etag)
if err != nil {
return err
}
mei.Etag = &etag
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
mei.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
mei.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
mei.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
mei.Kind = kind
}
}
}
return nil
}
// ManagerExtendedInfoProperties the properties of the manager extended info.
type ManagerExtendedInfoProperties struct {
// Version - The version of the extended info being persisted.
Version *string `json:"version,omitempty"`
// IntegrityKey - Represents the CIK of the resource.
IntegrityKey *string `json:"integrityKey,omitempty"`
// EncryptionKey - Represents the CEK of the resource.
EncryptionKey *string `json:"encryptionKey,omitempty"`
// EncryptionKeyThumbprint - Represents the Cert thumbprint that was used to encrypt the CEK.
EncryptionKeyThumbprint *string `json:"encryptionKeyThumbprint,omitempty"`
// PortalCertificateThumbprint - Represents the portal thumbprint which can be used optionally to encrypt the entire data before storing it.
PortalCertificateThumbprint *string `json:"portalCertificateThumbprint,omitempty"`
// Algorithm - Represents the encryption algorithm used to encrypt the keys. None - if Key is saved in plain text format. Algorithm name - if key is encrypted
Algorithm *string `json:"algorithm,omitempty"`
}
// ManagerIntrinsicSettings intrinsic settings which refers to the type of the StorSimple Manager.
type ManagerIntrinsicSettings struct {
// Type - The type of StorSimple Manager. Possible values include: 'GardaV1', 'HelsinkiV1'
Type ManagerType `json:"type,omitempty"`
}
// ManagerList the list of StorSimple Managers.
type ManagerList struct {
autorest.Response `json:"-"`
// Value - The list of StorSimple managers.
Value *[]Manager `json:"value,omitempty"`
}
// ManagerPatch the StorSimple Manager patch.
type ManagerPatch struct {
// Tags - The tags attached to the Manager.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for ManagerPatch.
func (mp ManagerPatch) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if mp.Tags != nil {
objectMap["tags"] = mp.Tags
}
return json.Marshal(objectMap)
}
// ManagerProperties the properties of the StorSimple Manager.
type ManagerProperties struct {
// CisIntrinsicSettings - Represents the type of StorSimple Manager.
CisIntrinsicSettings *ManagerIntrinsicSettings `json:"cisIntrinsicSettings,omitempty"`
// Sku - Specifies the Sku.
Sku *ManagerSku `json:"sku,omitempty"`
// ProvisioningState - Specifies the state of the resource as it is getting provisioned. Value of "Succeeded" means the Manager was successfully created.
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// ManagerSku the Sku.
type ManagerSku struct {
// Name - Refers to the sku name which should be "Standard"
Name *string `json:"name,omitempty"`
}
// MetricAvailablity the metric availability.
type MetricAvailablity struct {
// TimeGrain - The aggregation interval for the metric.
TimeGrain *string `json:"timeGrain,omitempty"`
// Retention - The retention period for the metric at the specified timegrain.
Retention *string `json:"retention,omitempty"`
}
// MetricData the metric data.
type MetricData struct {
// TimeStamp - The time stamp of the metric data.
TimeStamp *date.Time `json:"timeStamp,omitempty"`
// Sum - The sum of all samples at the time stamp.
Sum *float64 `json:"sum,omitempty"`
// Count - The count of all samples at the time stamp.
Count *int32 `json:"count,omitempty"`
// Average - The average of all samples at the time stamp.
Average *float64 `json:"average,omitempty"`
// Minimum - The minimum of all samples at the time stamp.
Minimum *float64 `json:"minimum,omitempty"`
// Maximum - The maximum of all samples at the time stamp.
Maximum *float64 `json:"maximum,omitempty"`
}
// MetricDefinition the monitoring metric definition.
type MetricDefinition struct {
// Name - The metric name.
Name *MetricName `json:"name,omitempty"`
// Unit - The metric unit. Possible values include: 'Bytes', 'BytesPerSecond', 'Count', 'CountPerSecond', 'Percent', 'Seconds'
Unit MetricUnit `json:"unit,omitempty"`
// PrimaryAggregationType - The metric aggregation type. Possible values include: 'MetricAggregationTypeAverage', 'MetricAggregationTypeLast', 'MetricAggregationTypeMaximum', 'MetricAggregationTypeMinimum', 'MetricAggregationTypeNone', 'MetricAggregationTypeTotal'
PrimaryAggregationType MetricAggregationType `json:"primaryAggregationType,omitempty"`
// ResourceID - The metric source ID.
ResourceID *string `json:"resourceId,omitempty"`
// MetricAvailabilities - The available metric granularities.
MetricAvailabilities *[]MetricAvailablity `json:"metricAvailabilities,omitempty"`
// Dimensions - The available metric dimensions.
Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
// Category - The category of the metric.
Category *string `json:"category,omitempty"`
// Type - The metric definition type.
Type *string `json:"type,omitempty"`
}
// MetricDefinitionList the list of metric definitions.
type MetricDefinitionList struct {
autorest.Response `json:"-"`
// Value - The list of metric definitions.
Value *[]MetricDefinition `json:"value,omitempty"`
}
// MetricDimension the metric dimension. It indicates the source of the metric.
type MetricDimension struct {
// Name - The metric dimension name.
Name *string `json:"name,omitempty"`
// Value - The metric dimension values.
Value *string `json:"value,omitempty"`
}
// MetricFilter the OData filters to be used for metrics.
type MetricFilter struct {
// Name - Specifies the metric name filter specifying the name of the metric to be filtered on. Only 'Equality' operator is supported for this property.
Name *MetricNameFilter `json:"name,omitempty"`
// StartTime - Specifies the start time of the time range to be queried. Only 'Greater Than Or Equal To' operator is supported for this property.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - Specifies the end time of the time range to be queried. Only 'Less Than Or Equal To' operator is supported for this property.
EndTime *date.Time `json:"endTime,omitempty"`
// TimeGrain - Specifies the time granularity of the metrics to be returned. E.g., "P1D". Valid values are the ones returned as the field "timeGrain" in the ListMetricDefinitions call. Only 'Equality' operator is supported for this property.
TimeGrain *string `json:"timeGrain,omitempty"`
// Category - Specifies the category of the metrics to be filtered. E.g., "CapacityUtilization". Valid values are the ones returned as the field "category" in the ListMetricDefinitions call. Only 'Equality' operator is supported for this property.
Category *string `json:"category,omitempty"`
// Dimensions - Specifies the source(the dimension) of the metrics to be filtered. Only 'Equality' operator is supported for this property.
Dimensions *DimensionFilter `json:"dimensions,omitempty"`
}
// MetricList the metric list.
type MetricList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Metrics `json:"value,omitempty"`
}
// MetricName the metric name.
type MetricName struct {
// Value - The metric name.
Value *string `json:"value,omitempty"`
// LocalizedValue - The localized metric name.
LocalizedValue *string `json:"localizedValue,omitempty"`
}
// MetricNameFilter the metric name filter, specifying the name of the metric to be filtered on.
type MetricNameFilter struct {
// Value - Specifies the metric name to be filtered on. E.g., CloudStorageUsed. Valid values are the ones returned in the field "name" in the ListMetricDefinitions call. Only 'Equality' operator is supported for this property.
Value *string `json:"value,omitempty"`
}
// Metrics the monitoring metric.
type Metrics struct {
// ResourceID - The ID of metric source.
ResourceID *string `json:"resourceId,omitempty"`
// StartTime - The start time of the metric data.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - The end time of the metric data.
EndTime *date.Time `json:"endTime,omitempty"`
// TimeGrain - The time granularity of the metric data.
TimeGrain *string `json:"timeGrain,omitempty"`
// PrimaryAggregation - The metric aggregation type. Possible values include: 'MetricAggregationTypeAverage', 'MetricAggregationTypeLast', 'MetricAggregationTypeMaximum', 'MetricAggregationTypeMinimum', 'MetricAggregationTypeNone', 'MetricAggregationTypeTotal'
PrimaryAggregation MetricAggregationType `json:"primaryAggregation,omitempty"`
// Name - The name of the metric.
Name *MetricName `json:"name,omitempty"`
// Dimensions - The metric dimensions.
Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
// Unit - The unit of the metric data. Possible values include: 'Bytes', 'BytesPerSecond', 'Count', 'CountPerSecond', 'Percent', 'Seconds'
Unit MetricUnit `json:"unit,omitempty"`
// Type - The type of the metric data.
Type *string `json:"type,omitempty"`
// Values - The list of the metric data.
Values *[]MetricData `json:"values,omitempty"`
}
// NetworkAdapterList the collection of network adapters on the device.
type NetworkAdapterList struct {
// Value - The value.
Value *[]NetworkAdapters `json:"value,omitempty"`
}
// NetworkAdapters represents the network adapter on device.
type NetworkAdapters struct {
// InterfaceID - The ID of the network adapter. Possible values include: 'NetInterfaceIDInvalid', 'NetInterfaceIDData0', 'NetInterfaceIDData1', 'NetInterfaceIDData2', 'NetInterfaceIDData3', 'NetInterfaceIDData4', 'NetInterfaceIDData5'
InterfaceID NetInterfaceID `json:"interfaceId,omitempty"`
// NetInterfaceStatus - Value indicating status of network adapter. Possible values include: 'NetInterfaceStatusEnabled', 'NetInterfaceStatusDisabled'
NetInterfaceStatus NetInterfaceStatus `json:"netInterfaceStatus,omitempty"`
// IsDefault - Value indicating whether this instance is default.
IsDefault *bool `json:"isDefault,omitempty"`
// IscsiAndCloudStatus - Value indicating cloud and ISCSI status of network adapter. Possible values include: 'ISCSIAndCloudStatusDisabled', 'ISCSIAndCloudStatusIscsiEnabled', 'ISCSIAndCloudStatusCloudEnabled', 'ISCSIAndCloudStatusIscsiAndCloudEnabled'
IscsiAndCloudStatus ISCSIAndCloudStatus `json:"iscsiAndCloudStatus,omitempty"`
// Speed - The speed of the network adapter.
Speed *int64 `json:"speed,omitempty"`
// Mode - The mode of network adapter, either IPv4, IPv6 or both. Possible values include: 'NetworkModeInvalid', 'NetworkModeIPV4', 'NetworkModeIPV6', 'NetworkModeBOTH'
Mode NetworkMode `json:"mode,omitempty"`
// NicIpv4Settings - The IPv4 configuration of the network adapter.
NicIpv4Settings *NicIPv4 `json:"nicIpv4Settings,omitempty"`
// NicIpv6Settings - The IPv6 configuration of the network adapter.
NicIpv6Settings *NicIPv6 `json:"nicIpv6Settings,omitempty"`
}
// NetworkInterfaceData0Settings the 'Data 0' network interface card settings.
type NetworkInterfaceData0Settings struct {
// ControllerZeroIP - The controller 0's IPv4 address.
ControllerZeroIP *string `json:"controllerZeroIp,omitempty"`
// ControllerOneIP - The controller 1's IPv4 address.
ControllerOneIP *string `json:"controllerOneIp,omitempty"`
}
// NetworkSettings represents the network settings of a device.
type NetworkSettings struct {
autorest.Response `json:"-"`
// NetworkSettingsProperties - The properties of network settings of a device.
*NetworkSettingsProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for NetworkSettings.
func (ns NetworkSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ns.NetworkSettingsProperties != nil {
objectMap["properties"] = ns.NetworkSettingsProperties
}
if ns.Kind != "" {
objectMap["kind"] = ns.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for NetworkSettings struct.
func (ns *NetworkSettings) 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 networkSettingsProperties NetworkSettingsProperties
err = json.Unmarshal(*v, &networkSettingsProperties)
if err != nil {
return err
}
ns.NetworkSettingsProperties = &networkSettingsProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
ns.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
ns.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
ns.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
ns.Kind = kind
}
}
}
return nil
}
// NetworkSettingsPatch represents the patch request for the network settings of a device.
type NetworkSettingsPatch struct {
// NetworkSettingsPatchProperties - The properties of the network settings patch.
*NetworkSettingsPatchProperties `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for NetworkSettingsPatch.
func (nsp NetworkSettingsPatch) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if nsp.NetworkSettingsPatchProperties != nil {
objectMap["properties"] = nsp.NetworkSettingsPatchProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for NetworkSettingsPatch struct.
func (nsp *NetworkSettingsPatch) 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 networkSettingsPatchProperties NetworkSettingsPatchProperties
err = json.Unmarshal(*v, &networkSettingsPatchProperties)
if err != nil {
return err
}
nsp.NetworkSettingsPatchProperties = &networkSettingsPatchProperties
}
}
}
return nil
}
// NetworkSettingsPatchProperties the properties of the network settings patch.
type NetworkSettingsPatchProperties struct {
// DNSSettings - The DNS (Domain Name System) settings of device.
DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
// NetworkAdapters - The network adapter list of device.
NetworkAdapters *NetworkAdapterList `json:"networkAdapters,omitempty"`
}
// NetworkSettingsProperties the properties of the network settings of device.
type NetworkSettingsProperties struct {
// DNSSettings - The DNS (Domain Name System) settings of device.
DNSSettings *DNSSettings `json:"dnsSettings,omitempty"`
// NetworkAdapters - The network adapter list of device.
NetworkAdapters *NetworkAdapterList `json:"networkAdapters,omitempty"`
// WebproxySettings - The webproxy settings of device.
WebproxySettings *WebproxySettings `json:"webproxySettings,omitempty"`
}
// NicIPv4 details related to the IPv4 address configuration.
type NicIPv4 struct {
// Ipv4Address - The IPv4 address of the network adapter.
Ipv4Address *string `json:"ipv4Address,omitempty"`
// Ipv4Netmask - The IPv4 netmask of the network adapter.
Ipv4Netmask *string `json:"ipv4Netmask,omitempty"`
// Ipv4Gateway - The IPv4 gateway of the network adapter.
Ipv4Gateway *string `json:"ipv4Gateway,omitempty"`
// Controller0Ipv4Address - The IPv4 address of Controller0.
Controller0Ipv4Address *string `json:"controller0Ipv4Address,omitempty"`
// Controller1Ipv4Address - The IPv4 address of Controller1.
Controller1Ipv4Address *string `json:"controller1Ipv4Address,omitempty"`
}
// NicIPv6 details related to the IPv6 address configuration.
type NicIPv6 struct {
// Ipv6Address - The IPv6 address of the network adapter.
Ipv6Address *string `json:"ipv6Address,omitempty"`
// Ipv6Prefix - The IPv6 prefix of the network adapter.
Ipv6Prefix *string `json:"ipv6Prefix,omitempty"`
// Ipv6Gateway - The IPv6 gateway of the network adapter.
Ipv6Gateway *string `json:"ipv6Gateway,omitempty"`
// Controller0Ipv6Address - The IPv6 address of Controller0.
Controller0Ipv6Address *string `json:"controller0Ipv6Address,omitempty"`
// Controller1Ipv6Address - The IPv6 address of Controller1.
Controller1Ipv6Address *string `json:"controller1Ipv6Address,omitempty"`
}
// PublicKey the public key.
type PublicKey struct {
autorest.Response `json:"-"`
// Key - The key.
Key *string `json:"key,omitempty"`
}
// RemoteManagementSettings the settings for remote management of a device.
type RemoteManagementSettings struct {
// RemoteManagementMode - The remote management mode. Possible values include: 'RemoteManagementModeConfigurationUnknown', 'RemoteManagementModeConfigurationDisabled', 'RemoteManagementModeConfigurationHTTPSEnabled', 'RemoteManagementModeConfigurationHTTPSAndHTTPEnabled'
RemoteManagementMode RemoteManagementModeConfiguration `json:"remoteManagementMode,omitempty"`
// RemoteManagementCertificate - The remote management certificates.
RemoteManagementCertificate *string `json:"remoteManagementCertificate,omitempty"`
}
// RemoteManagementSettingsPatch the settings for updating remote management mode of the device.
type RemoteManagementSettingsPatch struct {
// RemoteManagementMode - The remote management mode. Possible values include: 'RemoteManagementModeConfigurationUnknown', 'RemoteManagementModeConfigurationDisabled', 'RemoteManagementModeConfigurationHTTPSEnabled', 'RemoteManagementModeConfigurationHTTPSAndHTTPEnabled'
RemoteManagementMode RemoteManagementModeConfiguration `json:"remoteManagementMode,omitempty"`
}
// Resource the Azure Resource.
type Resource struct {
// ID - READ-ONLY; The resource ID.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The resource name.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The resource type.
Type *string `json:"type,omitempty"`
// Location - The geo location of the resource.
Location *string `json:"location,omitempty"`
// Tags - The tags attached to the resource.
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if r.Location != nil {
objectMap["location"] = r.Location
}
if r.Tags != nil {
objectMap["tags"] = r.Tags
}
return json.Marshal(objectMap)
}
// ScheduleRecurrence the schedule recurrence.
type ScheduleRecurrence struct {
// RecurrenceType - The recurrence type. Possible values include: 'Minutes', 'Hourly', 'Daily', 'Weekly'
RecurrenceType RecurrenceType `json:"recurrenceType,omitempty"`
// RecurrenceValue - The recurrence value.
RecurrenceValue *int32 `json:"recurrenceValue,omitempty"`
// WeeklyDaysList - The week days list. Applicable only for schedules of recurrence type 'weekly'.
WeeklyDaysList *[]DayOfWeek `json:"weeklyDaysList,omitempty"`
}
// SecondaryDNSSettings the secondary DNS settings.
type SecondaryDNSSettings struct {
// SecondaryDNSServers - The list of secondary DNS Server IP addresses.
SecondaryDNSServers *[]string `json:"secondaryDnsServers,omitempty"`
}
// SecuritySettings the security settings of a device.
type SecuritySettings struct {
autorest.Response `json:"-"`
// SecuritySettingsProperties - The properties of the security settings of a device.
*SecuritySettingsProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for SecuritySettings.
func (ss SecuritySettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ss.SecuritySettingsProperties != nil {
objectMap["properties"] = ss.SecuritySettingsProperties
}
if ss.Kind != "" {
objectMap["kind"] = ss.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SecuritySettings struct.
func (ss *SecuritySettings) 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 securitySettingsProperties SecuritySettingsProperties
err = json.Unmarshal(*v, &securitySettingsProperties)
if err != nil {
return err
}
ss.SecuritySettingsProperties = &securitySettingsProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
ss.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
ss.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
ss.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
ss.Kind = kind
}
}
}
return nil
}
// SecuritySettingsPatch represents the patch request for the security settings of a device.
type SecuritySettingsPatch struct {
// SecuritySettingsPatchProperties - The properties of the security settings patch.
*SecuritySettingsPatchProperties `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for SecuritySettingsPatch.
func (ssp SecuritySettingsPatch) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ssp.SecuritySettingsPatchProperties != nil {
objectMap["properties"] = ssp.SecuritySettingsPatchProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SecuritySettingsPatch struct.
func (ssp *SecuritySettingsPatch) 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 securitySettingsPatchProperties SecuritySettingsPatchProperties
err = json.Unmarshal(*v, &securitySettingsPatchProperties)
if err != nil {
return err
}
ssp.SecuritySettingsPatchProperties = &securitySettingsPatchProperties
}
}
}
return nil
}
// SecuritySettingsPatchProperties the properties of the security settings patch.
type SecuritySettingsPatchProperties struct {
// RemoteManagementSettings - The remote management settings.
RemoteManagementSettings *RemoteManagementSettingsPatch `json:"remoteManagementSettings,omitempty"`
// DeviceAdminPassword - The device administrator password.
DeviceAdminPassword *AsymmetricEncryptedSecret `json:"deviceAdminPassword,omitempty"`
// SnapshotPassword - The snapshot manager password.
SnapshotPassword *AsymmetricEncryptedSecret `json:"snapshotPassword,omitempty"`
// ChapSettings - The device CHAP and reverse-CHAP settings.
ChapSettings *ChapSettings `json:"chapSettings,omitempty"`
// CloudApplianceSettings - The cloud appliance settings.
CloudApplianceSettings *CloudApplianceSettings `json:"cloudApplianceSettings,omitempty"`
}
// SecuritySettingsProperties the properties of security settings of a device.
type SecuritySettingsProperties struct {
// RemoteManagementSettings - The settings for remote management of a device.
RemoteManagementSettings *RemoteManagementSettings `json:"remoteManagementSettings,omitempty"`
// ChapSettings - The Challenge-Handshake Authentication Protocol (CHAP) settings.
ChapSettings *ChapSettings `json:"chapSettings,omitempty"`
}
// SendTestAlertEmailRequest the request for sending test alert email
type SendTestAlertEmailRequest struct {
// EmailList - The list of email IDs to send the test alert email
EmailList *[]string `json:"emailList,omitempty"`
}
// StorageAccountCredential the storage account credential.
type StorageAccountCredential struct {
autorest.Response `json:"-"`
// StorageAccountCredentialProperties - The storage account credential properties.
*StorageAccountCredentialProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for StorageAccountCredential.
func (sac StorageAccountCredential) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sac.StorageAccountCredentialProperties != nil {
objectMap["properties"] = sac.StorageAccountCredentialProperties
}
if sac.Kind != "" {
objectMap["kind"] = sac.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for StorageAccountCredential struct.
func (sac *StorageAccountCredential) 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 storageAccountCredentialProperties StorageAccountCredentialProperties
err = json.Unmarshal(*v, &storageAccountCredentialProperties)
if err != nil {
return err
}
sac.StorageAccountCredentialProperties = &storageAccountCredentialProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
sac.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
sac.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
sac.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
sac.Kind = kind
}
}
}
return nil
}
// StorageAccountCredentialList the collection of storage account credential entities.
type StorageAccountCredentialList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]StorageAccountCredential `json:"value,omitempty"`
}
// StorageAccountCredentialProperties the storage account credential properties.
type StorageAccountCredentialProperties struct {
// EndPoint - The storage endpoint
EndPoint *string `json:"endPoint,omitempty"`
// SslStatus - Signifies whether SSL needs to be enabled or not. Possible values include: 'SslStatusEnabled', 'SslStatusDisabled'
SslStatus SslStatus `json:"sslStatus,omitempty"`
// AccessKey - The details of the storage account password.
AccessKey *AsymmetricEncryptedSecret `json:"accessKey,omitempty"`
// VolumesCount - READ-ONLY; The count of volumes using this storage account credential.
VolumesCount *int32 `json:"volumesCount,omitempty"`
}
// MarshalJSON is the custom marshaler for StorageAccountCredentialProperties.
func (sacp StorageAccountCredentialProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sacp.EndPoint != nil {
objectMap["endPoint"] = sacp.EndPoint
}
if sacp.SslStatus != "" {
objectMap["sslStatus"] = sacp.SslStatus
}
if sacp.AccessKey != nil {
objectMap["accessKey"] = sacp.AccessKey
}
return json.Marshal(objectMap)
}
// StorageAccountCredentialsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type StorageAccountCredentialsCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(StorageAccountCredentialsClient) (StorageAccountCredential, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *StorageAccountCredentialsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for StorageAccountCredentialsCreateOrUpdateFuture.Result.
func (future *StorageAccountCredentialsCreateOrUpdateFuture) result(client StorageAccountCredentialsClient) (sac StorageAccountCredential, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
sac.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if sac.Response.Response, err = future.GetResult(sender); err == nil && sac.Response.Response.StatusCode != http.StatusNoContent {
sac, err = client.CreateOrUpdateResponder(sac.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsCreateOrUpdateFuture", "Result", sac.Response.Response, "Failure responding to request")
}
}
return
}
// StorageAccountCredentialsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type StorageAccountCredentialsDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(StorageAccountCredentialsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *StorageAccountCredentialsDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for StorageAccountCredentialsDeleteFuture.Result.
func (future *StorageAccountCredentialsDeleteFuture) result(client StorageAccountCredentialsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.StorageAccountCredentialsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.StorageAccountCredentialsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// SymmetricEncryptedSecret represents the secrets encrypted using Symmetric Encryption Key.
type SymmetricEncryptedSecret struct {
autorest.Response `json:"-"`
// Value - The value of the secret itself. If the secret is in plaintext or null then EncryptionAlgorithm will be none.
Value *string `json:"value,omitempty"`
// ValueCertificateThumbprint - The thumbprint of the cert that was used to encrypt "Value".
ValueCertificateThumbprint *string `json:"valueCertificateThumbprint,omitempty"`
// EncryptionAlgorithm - The algorithm used to encrypt the "Value". Possible values include: 'EncryptionAlgorithmNone', 'EncryptionAlgorithmAES256', 'EncryptionAlgorithmRSAESPKCS1V15'
EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"`
}
// TargetEligibilityErrorMessage the error/warning message due to which the device is ineligible as a
// failover target device.
type TargetEligibilityErrorMessage struct {
// Message - The localized error message stating the reason why the device is not eligible as a target device.
Message *string `json:"message,omitempty"`
// Resolution - The localized resolution message for the error.
Resolution *string `json:"resolution,omitempty"`
// ResultCode - The result code for the error, due to which the device does not qualify as a failover target device. Possible values include: 'TargetAndSourceCannotBeSameError', 'TargetIsNotOnlineError', 'TargetSourceIncompatibleVersionError', 'LocalToTieredVolumesConversionWarning', 'TargetInsufficientCapacityError', 'TargetInsufficientLocalVolumeMemoryError', 'TargetInsufficientTieredVolumeMemoryError'
ResultCode TargetEligibilityResultCode `json:"resultCode,omitempty"`
}
// TargetEligibilityResult the eligibility result of device, as a failover target device.
type TargetEligibilityResult struct {
// EligibilityStatus - The eligibility status of device, as a failover target device. Possible values include: 'TargetEligibilityStatusNotEligible', 'TargetEligibilityStatusEligible'
EligibilityStatus TargetEligibilityStatus `json:"eligibilityStatus,omitempty"`
// Messages - The list of error messages, if a device does not qualify as a failover target device.
Messages *[]TargetEligibilityErrorMessage `json:"messages,omitempty"`
}
// Time the time.
type Time struct {
// Hours - The hour.
Hours *int32 `json:"hours,omitempty"`
// Minutes - The minute.
Minutes *int32 `json:"minutes,omitempty"`
// Seconds - The second.
Seconds *int32 `json:"seconds,omitempty"`
}
// TimeSettings the time settings of a device.
type TimeSettings struct {
autorest.Response `json:"-"`
// TimeSettingsProperties - The properties of the time settings of a device.
*TimeSettingsProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for TimeSettings.
func (ts TimeSettings) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ts.TimeSettingsProperties != nil {
objectMap["properties"] = ts.TimeSettingsProperties
}
if ts.Kind != "" {
objectMap["kind"] = ts.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for TimeSettings struct.
func (ts *TimeSettings) 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 timeSettingsProperties TimeSettingsProperties
err = json.Unmarshal(*v, &timeSettingsProperties)
if err != nil {
return err
}
ts.TimeSettingsProperties = &timeSettingsProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
ts.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
ts.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
ts.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
ts.Kind = kind
}
}
}
return nil
}
// TimeSettingsProperties the properties of time settings of a device.
type TimeSettingsProperties struct {
// TimeZone - The timezone of device, like '(UTC -06:00) Central America'
TimeZone *string `json:"timeZone,omitempty"`
// PrimaryTimeServer - The primary Network Time Protocol (NTP) server name, like 'time.windows.com'.
PrimaryTimeServer *string `json:"primaryTimeServer,omitempty"`
// SecondaryTimeServer - The secondary Network Time Protocol (NTP) server name, like 'time.contoso.com'. It's optional.
SecondaryTimeServer *[]string `json:"secondaryTimeServer,omitempty"`
}
// Updates the updates profile of a device.
type Updates struct {
autorest.Response `json:"-"`
// UpdatesProperties - The properties of the updates profile.
*UpdatesProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Updates.
func (u Updates) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if u.UpdatesProperties != nil {
objectMap["properties"] = u.UpdatesProperties
}
if u.Kind != "" {
objectMap["kind"] = u.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Updates struct.
func (u *Updates) 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 updatesProperties UpdatesProperties
err = json.Unmarshal(*v, &updatesProperties)
if err != nil {
return err
}
u.UpdatesProperties = &updatesProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
u.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
u.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
u.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
u.Kind = kind
}
}
}
return nil
}
// UpdatesProperties the properties of the updates profile.
type UpdatesProperties struct {
// RegularUpdatesAvailable - Set to 'true' if regular updates are available for the device.
RegularUpdatesAvailable *bool `json:"regularUpdatesAvailable,omitempty"`
// MaintenanceModeUpdatesAvailable - Set to 'true' if maintenance mode update available.
MaintenanceModeUpdatesAvailable *bool `json:"maintenanceModeUpdatesAvailable,omitempty"`
// IsUpdateInProgress - Indicates whether an update is in progress or not.
IsUpdateInProgress *bool `json:"isUpdateInProgress,omitempty"`
// LastUpdatedTime - The time when the last update was completed.
LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
}
// VMImage the virtual machine image.
type VMImage struct {
// Name - The name.
Name *string `json:"name,omitempty"`
// Version - The version.
Version *string `json:"version,omitempty"`
// Offer - The offer.
Offer *string `json:"offer,omitempty"`
// Publisher - The publisher.
Publisher *string `json:"publisher,omitempty"`
// Sku - The SKU.
Sku *string `json:"sku,omitempty"`
}
// Volume the volume.
type Volume struct {
autorest.Response `json:"-"`
// VolumeProperties - The properties of the volume.
*VolumeProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for Volume.
func (vVar Volume) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if vVar.VolumeProperties != nil {
objectMap["properties"] = vVar.VolumeProperties
}
if vVar.Kind != "" {
objectMap["kind"] = vVar.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for Volume struct.
func (vVar *Volume) 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 volumeProperties VolumeProperties
err = json.Unmarshal(*v, &volumeProperties)
if err != nil {
return err
}
vVar.VolumeProperties = &volumeProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
vVar.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
vVar.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
vVar.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
vVar.Kind = kind
}
}
}
return nil
}
// VolumeContainer the volume container.
type VolumeContainer struct {
autorest.Response `json:"-"`
// VolumeContainerProperties - The volume container properties.
*VolumeContainerProperties `json:"properties,omitempty"`
// ID - READ-ONLY; The path ID that uniquely identifies the object.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the object.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The hierarchical type of the object.
Type *string `json:"type,omitempty"`
// Kind - The Kind of the object. Currently only Series8000 is supported. Possible values include: 'Series8000'
Kind Kind `json:"kind,omitempty"`
}
// MarshalJSON is the custom marshaler for VolumeContainer.
func (vc VolumeContainer) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if vc.VolumeContainerProperties != nil {
objectMap["properties"] = vc.VolumeContainerProperties
}
if vc.Kind != "" {
objectMap["kind"] = vc.Kind
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for VolumeContainer struct.
func (vc *VolumeContainer) 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 volumeContainerProperties VolumeContainerProperties
err = json.Unmarshal(*v, &volumeContainerProperties)
if err != nil {
return err
}
vc.VolumeContainerProperties = &volumeContainerProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
vc.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
vc.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
vc.Type = &typeVar
}
case "kind":
if v != nil {
var kind Kind
err = json.Unmarshal(*v, &kind)
if err != nil {
return err
}
vc.Kind = kind
}
}
}
return nil
}
// VolumeContainerFailoverMetadata the metadata of the volume container, that is being considered as part
// of a failover set.
type VolumeContainerFailoverMetadata struct {
// VolumeContainerID - The path ID of the volume container.
VolumeContainerID *string `json:"volumeContainerId,omitempty"`
// Volumes - The list of metadata of volumes inside the volume container, which contains valid cloud snapshots.
Volumes *[]VolumeFailoverMetadata `json:"volumes,omitempty"`
}
// VolumeContainerList the collection of volume container entities.
type VolumeContainerList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]VolumeContainer `json:"value,omitempty"`
}
// VolumeContainerProperties the properties of volume container.
type VolumeContainerProperties struct {
// EncryptionKey - The key used to encrypt data in the volume container. It is required when property 'EncryptionStatus' is "Enabled".
EncryptionKey *AsymmetricEncryptedSecret `json:"encryptionKey,omitempty"`
// EncryptionStatus - READ-ONLY; The flag to denote whether encryption is enabled or not. Possible values include: 'EncryptionStatusEnabled', 'EncryptionStatusDisabled'
EncryptionStatus EncryptionStatus `json:"encryptionStatus,omitempty"`
// VolumeCount - READ-ONLY; The number of volumes in the volume Container.
VolumeCount *int32 `json:"volumeCount,omitempty"`
// StorageAccountCredentialID - The path ID of storage account associated with the volume container.
StorageAccountCredentialID *string `json:"storageAccountCredentialId,omitempty"`
// OwnerShipStatus - READ-ONLY; The owner ship status of the volume container. Only when the status is "NotOwned", the delete operation on the volume container is permitted. Possible values include: 'Owned', 'NotOwned'
OwnerShipStatus OwnerShipStatus `json:"ownerShipStatus,omitempty"`
// BandWidthRateInMbps - The bandwidth-rate set on the volume container.
BandWidthRateInMbps *int32 `json:"bandWidthRateInMbps,omitempty"`
// BandwidthSettingID - The ID of the bandwidth setting associated with the volume container.
BandwidthSettingID *string `json:"bandwidthSettingId,omitempty"`
// TotalCloudStorageUsageInBytes - READ-ONLY; The total cloud storage for the volume container.
TotalCloudStorageUsageInBytes *int64 `json:"totalCloudStorageUsageInBytes,omitempty"`
}
// MarshalJSON is the custom marshaler for VolumeContainerProperties.
func (vcp VolumeContainerProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if vcp.EncryptionKey != nil {
objectMap["encryptionKey"] = vcp.EncryptionKey
}
if vcp.StorageAccountCredentialID != nil {
objectMap["storageAccountCredentialId"] = vcp.StorageAccountCredentialID
}
if vcp.BandWidthRateInMbps != nil {
objectMap["bandWidthRateInMbps"] = vcp.BandWidthRateInMbps
}
if vcp.BandwidthSettingID != nil {
objectMap["bandwidthSettingId"] = vcp.BandwidthSettingID
}
return json.Marshal(objectMap)
}
// VolumeContainersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VolumeContainersCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(VolumeContainersClient) (VolumeContainer, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *VolumeContainersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for VolumeContainersCreateOrUpdateFuture.Result.
func (future *VolumeContainersCreateOrUpdateFuture) result(client VolumeContainersClient) (vc VolumeContainer, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
vc.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
}
}
return
}
// VolumeContainersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VolumeContainersDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(VolumeContainersClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *VolumeContainersDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for VolumeContainersDeleteFuture.Result.
func (future *VolumeContainersDeleteFuture) result(client VolumeContainersClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumeContainersDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.VolumeContainersDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// VolumeFailoverMetadata the metadata of a volume that has valid cloud snapshot.
type VolumeFailoverMetadata struct {
// VolumeID - The path ID of the volume.
VolumeID *string `json:"volumeId,omitempty"`
// VolumeType - The type of the volume. Possible values include: 'Tiered', 'Archival', 'LocallyPinned'
VolumeType VolumeType `json:"volumeType,omitempty"`
// SizeInBytes - The size of the volume in bytes at the time the snapshot was taken.
SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
// BackupCreatedDate - The date at which the snapshot was taken.
BackupCreatedDate *date.Time `json:"backupCreatedDate,omitempty"`
// BackupElementID - The path ID of the backup-element for this volume, inside the backup set.
BackupElementID *string `json:"backupElementId,omitempty"`
// BackupID - The path ID of the backup set.
BackupID *string `json:"backupId,omitempty"`
// BackupPolicyID - The path ID of the backup policy using which the snapshot was taken.
BackupPolicyID *string `json:"backupPolicyId,omitempty"`
}
// VolumeList the collection of volumes.
type VolumeList struct {
autorest.Response `json:"-"`
// Value - The value.
Value *[]Volume `json:"value,omitempty"`
}
// VolumeProperties the properties of volume.
type VolumeProperties struct {
// SizeInBytes - The size of the volume in bytes.
SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
// VolumeType - The type of the volume. Possible values include: 'Tiered', 'Archival', 'LocallyPinned'
VolumeType VolumeType `json:"volumeType,omitempty"`
// VolumeContainerID - READ-ONLY; The ID of the volume container, in which this volume is created.
VolumeContainerID *string `json:"volumeContainerId,omitempty"`
// AccessControlRecordIds - The IDs of the access control records, associated with the volume.
AccessControlRecordIds *[]string `json:"accessControlRecordIds,omitempty"`
// VolumeStatus - The volume status. Possible values include: 'VolumeStatusOnline', 'VolumeStatusOffline'
VolumeStatus VolumeStatus `json:"volumeStatus,omitempty"`
// OperationStatus - READ-ONLY; The operation status on the volume. Possible values include: 'OperationStatusNone', 'OperationStatusUpdating', 'OperationStatusDeleting', 'OperationStatusRestoring'
OperationStatus OperationStatus `json:"operationStatus,omitempty"`
// BackupStatus - READ-ONLY; The backup status of the volume. Possible values include: 'BackupStatusEnabled', 'BackupStatusDisabled'
BackupStatus BackupStatus `json:"backupStatus,omitempty"`
// MonitoringStatus - The monitoring status of the volume. Possible values include: 'MonitoringStatusEnabled', 'MonitoringStatusDisabled'
MonitoringStatus MonitoringStatus `json:"monitoringStatus,omitempty"`
// BackupPolicyIds - READ-ONLY; The IDs of the backup policies, in which this volume is part of.
BackupPolicyIds *[]string `json:"backupPolicyIds,omitempty"`
}
// MarshalJSON is the custom marshaler for VolumeProperties.
func (vp VolumeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if vp.SizeInBytes != nil {
objectMap["sizeInBytes"] = vp.SizeInBytes
}
if vp.VolumeType != "" {
objectMap["volumeType"] = vp.VolumeType
}
if vp.AccessControlRecordIds != nil {
objectMap["accessControlRecordIds"] = vp.AccessControlRecordIds
}
if vp.VolumeStatus != "" {
objectMap["volumeStatus"] = vp.VolumeStatus
}
if vp.MonitoringStatus != "" {
objectMap["monitoringStatus"] = vp.MonitoringStatus
}
return json.Marshal(objectMap)
}
// VolumesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VolumesCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(VolumesClient) (Volume, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *VolumesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for VolumesCreateOrUpdateFuture.Result.
func (future *VolumesCreateOrUpdateFuture) result(client VolumesClient) (vVar Volume, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
vVar.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.VolumesCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if vVar.Response.Response, err = future.GetResult(sender); err == nil && vVar.Response.Response.StatusCode != http.StatusNoContent {
vVar, err = client.CreateOrUpdateResponder(vVar.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumesCreateOrUpdateFuture", "Result", vVar.Response.Response, "Failure responding to request")
}
}
return
}
// VolumesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VolumesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(VolumesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *VolumesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for VolumesDeleteFuture.Result.
func (future *VolumesDeleteFuture) result(client VolumesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "storsimple.VolumesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("storsimple.VolumesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// WebproxySettings the web proxy settings on the device.
type WebproxySettings struct {
// ConnectionURI - The connection URI.
ConnectionURI *string `json:"connectionUri,omitempty"`
// Authentication - The authentication type. Possible values include: 'Invalid', 'None', 'Basic', 'NTLM'
Authentication AuthenticationType `json:"authentication,omitempty"`
// Username - The webproxy username.
Username *string `json:"username,omitempty"`
}
|