1: <?php
2:
3: namespace Saklient\Cloud\Resources;
4:
5: require_once __DIR__ . "/../../../Saklient/Errors/HttpException.php";
6: use \Saklient\Errors\HttpException;
7: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
8: use \Saklient\Errors\SaklientException;
9: require_once __DIR__ . "/../../../Saklient/Cloud/Client.php";
10: use \Saklient\Cloud\Client;
11: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Resource.php";
12: use \Saklient\Cloud\Resources\Resource;
13: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Icon.php";
14: use \Saklient\Cloud\Resources\Icon;
15: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Iface.php";
16: use \Saklient\Cloud\Resources\Iface;
17: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Swytch.php";
18: use \Saklient\Cloud\Resources\Swytch;
19: require_once __DIR__ . "/../../../Saklient/Cloud/Enums/EApplianceClass.php";
20: use \Saklient\Cloud\Enums\EApplianceClass;
21: require_once __DIR__ . "/../../../Saklient/Cloud/Enums/EAvailability.php";
22: use \Saklient\Cloud\Enums\EAvailability;
23: require_once __DIR__ . "/../../../Saklient/Cloud/Enums/EServerInstanceStatus.php";
24: use \Saklient\Cloud\Enums\EServerInstanceStatus;
25: require_once __DIR__ . "/../../../Saklient/Cloud/Models/Model_Swytch.php";
26: use \Saklient\Cloud\Models\Model_Swytch;
27: require_once __DIR__ . "/../../../Saklient/Util.php";
28: use \Saklient\Util;
29:
30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47:
48: class Appliance extends Resource {
49:
50: 51: 52: 53: 54: 55: 56:
57: protected $m_id;
58:
59: 60: 61: 62: 63: 64: 65:
66: protected $m_clazz;
67:
68: 69: 70: 71: 72: 73: 74:
75: protected $m_name;
76:
77: 78: 79: 80: 81: 82: 83:
84: protected $m_description;
85:
86: 87: 88: 89: 90: 91: 92:
93: protected $m_tags;
94:
95: 96: 97: 98: 99: 100: 101:
102: protected $m_icon;
103:
104: 105: 106: 107: 108: 109: 110:
111: protected $m_planId;
112:
113: 114: 115: 116: 117: 118: 119:
120: protected $m_ifaces;
121:
122: 123: 124: 125: 126: 127: 128:
129: protected $m_rawAnnotation;
130:
131: 132: 133: 134: 135: 136: 137:
138: protected $m_rawSettings;
139:
140: 141: 142: 143: 144:
145: protected $m_rawSettingsHash;
146:
147: 148: 149: 150: 151: 152: 153:
154: protected $m_status;
155:
156: 157: 158: 159: 160: 161: 162:
163: protected $m_serviceClass;
164:
165: 166: 167: 168: 169: 170: 171:
172: protected $m_availability;
173:
174: 175: 176: 177: 178: 179: 180:
181: protected $m_swytchId;
182:
183: 184: 185: 186: 187: 188:
189: protected function _apiPath()
190: {
191: return "/appliance";
192: }
193:
194: 195: 196: 197: 198: 199:
200: protected function _rootKey()
201: {
202: return "Appliance";
203: }
204:
205: 206: 207: 208: 209: 210:
211: protected function _rootKeyM()
212: {
213: return "Appliances";
214: }
215:
216: 217: 218: 219: 220: 221:
222: public function _className()
223: {
224: return "Appliance";
225: }
226:
227: 228: 229: 230: 231: 232:
233: public function _id()
234: {
235: return $this->get_id();
236: }
237:
238: 239: 240: 241: 242: 243:
244: public function save()
245: {
246: return $this->_save();
247: }
248:
249: 250: 251: 252: 253: 254:
255: public function reload()
256: {
257: return $this->_reload();
258: }
259:
260: 261: 262: 263: 264: 265: 266:
267: public function __construct(\Saklient\Cloud\Client $client, $obj, $wrapped=false)
268: {
269: parent::__construct($client);
270: Util::validateArgCount(func_num_args(), 2);
271: Util::validateType($client, "\\Saklient\\Cloud\\Client");
272: Util::validateType($wrapped, "boolean");
273: $this->apiDeserialize($obj, $wrapped);
274: }
275:
276: 277: 278: 279: 280: 281: 282:
283: protected function _onBeforeSave($query)
284: {
285: Util::validateArgCount(func_num_args(), 1);
286: Util::setByPath($query, "OriginalSettingsHash", $this->get_rawSettingsHash());
287: }
288:
289: 290: 291: 292: 293: 294:
295: public function getSwytch()
296: {
297: $model = Util::createClassInstance("saklient.cloud.models.Model_Swytch", new \ArrayObject([$this->_client]));
298: $id = $this->get_swytchId();
299: return $model->getById($id);
300: }
301:
302: 303: 304: 305: 306: 307:
308: public function apply()
309: {
310: $this->_client->request("PUT", $this->_apiPath() . "/" . Util::urlEncode($this->_id()) . "/config");
311: return $this;
312: }
313:
314: 315: 316: 317: 318: 319:
320: public function boot()
321: {
322: $this->_client->request("PUT", $this->_apiPath() . "/" . Util::urlEncode($this->_id()) . "/power");
323: return $this;
324: }
325:
326: 327: 328: 329: 330: 331:
332: public function shutdown()
333: {
334: $this->_client->request("DELETE", $this->_apiPath() . "/" . Util::urlEncode($this->_id()) . "/power");
335: return $this;
336: }
337:
338: 339: 340: 341: 342: 343:
344: public function stop()
345: {
346: $this->_client->request("DELETE", $this->_apiPath() . "/" . Util::urlEncode($this->_id()) . "/power", (object)['Force' => true]);
347: return $this;
348: }
349:
350: 351: 352: 353: 354: 355:
356: public function reboot()
357: {
358: $this->_client->request("PUT", $this->_apiPath() . "/" . Util::urlEncode($this->_id()) . "/reset");
359: return $this;
360: }
361:
362: 363: 364: 365: 366: 367: 368:
369: public function sleepWhileCreating($timeoutSec=600)
370: {
371: Util::validateType($timeoutSec, "int");
372: $step = 10;
373: while (0 < $timeoutSec) {
374: try {
375: $this->reload();
376: }
377: catch (HttpException $ex) {
378: }
379: $a = $this->get_availability();
380: if ($a == EAvailability::available) {
381: return true;
382: }
383: if ($a != EAvailability::migrating) {
384: $timeoutSec = 0;
385: }
386: $timeoutSec -= $step;
387: if (0 < $timeoutSec) {
388: Util::sleep($step);
389: }
390: }
391: return false;
392: }
393:
394: 395: 396: 397: 398: 399: 400:
401: public function sleepUntilUp($timeoutSec=600)
402: {
403: Util::validateType($timeoutSec, "int");
404: return $this->sleepUntil(EServerInstanceStatus::up, $timeoutSec);
405: }
406:
407: 408: 409: 410: 411: 412: 413:
414: public function sleepUntilDown($timeoutSec=600)
415: {
416: Util::validateType($timeoutSec, "int");
417: return $this->sleepUntil(EServerInstanceStatus::down, $timeoutSec);
418: }
419:
420: 421: 422: 423: 424: 425: 426: 427: 428:
429: private function sleepUntil($status, $timeoutSec=600)
430: {
431: Util::validateArgCount(func_num_args(), 1);
432: Util::validateType($status, "string");
433: Util::validateType($timeoutSec, "int");
434: $step = 10;
435: while (0 < $timeoutSec) {
436: try {
437: $this->reload();
438: }
439: catch (HttpException $ex) {
440: }
441: $s = $this->get_status();
442: if ($s == null) {
443: $s = EServerInstanceStatus::down;
444: }
445: if ($s == $status) {
446: return true;
447: }
448: $timeoutSec -= $step;
449: if (0 < $timeoutSec) {
450: Util::sleep($step);
451: }
452: }
453: return false;
454: }
455:
456: 457: 458: 459: 460:
461: private $n_id = false;
462:
463: 464: 465: 466: 467: 468: 469:
470: private function get_id()
471: {
472: return $this->m_id;
473: }
474:
475:
476:
477: 478: 479: 480: 481:
482: private $n_clazz = false;
483:
484: 485: 486: 487: 488: 489: 490:
491: private function get_clazz()
492: {
493: return $this->m_clazz;
494: }
495:
496: 497: 498: 499: 500: 501: 502: 503:
504: private function set_clazz($v)
505: {
506: Util::validateArgCount(func_num_args(), 1);
507: Util::validateType($v, "string");
508: if (!$this->isNew) {
509: throw new SaklientException("immutable_field", "Immutable fields cannot be modified after the resource creation: " . "Saklient\\Cloud\\Resources\\Appliance#clazz");
510: }
511: $this->m_clazz = $v;
512: $this->n_clazz = true;
513: return $this->m_clazz;
514: }
515:
516:
517:
518: 519: 520: 521: 522:
523: private $n_name = false;
524:
525: 526: 527: 528: 529: 530: 531:
532: private function get_name()
533: {
534: return $this->m_name;
535: }
536:
537: 538: 539: 540: 541: 542: 543: 544:
545: private function set_name($v)
546: {
547: Util::validateArgCount(func_num_args(), 1);
548: Util::validateType($v, "string");
549: $this->m_name = $v;
550: $this->n_name = true;
551: return $this->m_name;
552: }
553:
554:
555:
556: 557: 558: 559: 560:
561: private $n_description = false;
562:
563: 564: 565: 566: 567: 568: 569:
570: private function get_description()
571: {
572: return $this->m_description;
573: }
574:
575: 576: 577: 578: 579: 580: 581: 582:
583: private function set_description($v)
584: {
585: Util::validateArgCount(func_num_args(), 1);
586: Util::validateType($v, "string");
587: $this->m_description = $v;
588: $this->n_description = true;
589: return $this->m_description;
590: }
591:
592:
593:
594: 595: 596: 597: 598:
599: private $n_tags = false;
600:
601: 602: 603: 604: 605: 606: 607:
608: private function get_tags()
609: {
610: $this->n_tags = true;
611: return $this->m_tags;
612: }
613:
614: 615: 616: 617: 618: 619: 620: 621:
622: private function set_tags($v)
623: {
624: Util::validateArgCount(func_num_args(), 1);
625: Util::validateType($v, "\\ArrayObject");
626: if (is_array($v)) $v = Client::array2ArrayObject($v);
627: $this->m_tags = $v;
628: $this->n_tags = true;
629: return $this->m_tags;
630: }
631:
632:
633:
634: 635: 636: 637: 638:
639: private $n_icon = false;
640:
641: 642: 643: 644: 645: 646: 647:
648: private function get_icon()
649: {
650: return $this->m_icon;
651: }
652:
653: 654: 655: 656: 657: 658: 659: 660:
661: private function set_icon(\Saklient\Cloud\Resources\Icon $v=null)
662: {
663: Util::validateArgCount(func_num_args(), 1);
664: Util::validateType($v, "\\Saklient\\Cloud\\Resources\\Icon");
665: $this->m_icon = $v;
666: $this->n_icon = true;
667: return $this->m_icon;
668: }
669:
670:
671:
672: 673: 674: 675: 676:
677: private $n_planId = false;
678:
679: 680: 681: 682: 683: 684: 685:
686: private function get_planId()
687: {
688: return $this->m_planId;
689: }
690:
691: 692: 693: 694: 695: 696: 697: 698:
699: private function set_planId($v)
700: {
701: Util::validateArgCount(func_num_args(), 1);
702: Util::validateType($v, "int");
703: if (!$this->isNew) {
704: throw new SaklientException("immutable_field", "Immutable fields cannot be modified after the resource creation: " . "Saklient\\Cloud\\Resources\\Appliance#planId");
705: }
706: $this->m_planId = $v;
707: $this->n_planId = true;
708: return $this->m_planId;
709: }
710:
711:
712:
713: 714: 715: 716: 717:
718: private $n_ifaces = false;
719:
720: 721: 722: 723: 724: 725: 726:
727: private function get_ifaces()
728: {
729: return $this->m_ifaces;
730: }
731:
732:
733:
734: 735: 736: 737: 738:
739: private $n_rawAnnotation = false;
740:
741: 742: 743: 744: 745: 746: 747:
748: private function get_rawAnnotation()
749: {
750: return $this->m_rawAnnotation;
751: }
752:
753: 754: 755: 756: 757: 758: 759: 760:
761: private function set_rawAnnotation($v)
762: {
763: Util::validateArgCount(func_num_args(), 1);
764: if (!$this->isNew) {
765: throw new SaklientException("immutable_field", "Immutable fields cannot be modified after the resource creation: " . "Saklient\\Cloud\\Resources\\Appliance#rawAnnotation");
766: }
767: $this->m_rawAnnotation = $v;
768: $this->n_rawAnnotation = true;
769: return $this->m_rawAnnotation;
770: }
771:
772:
773:
774: 775: 776: 777: 778:
779: private $n_rawSettings = false;
780:
781: 782: 783: 784: 785: 786: 787:
788: private function get_rawSettings()
789: {
790: $this->n_rawSettings = true;
791: return $this->m_rawSettings;
792: }
793:
794: 795: 796: 797: 798: 799: 800: 801:
802: private function set_rawSettings($v)
803: {
804: Util::validateArgCount(func_num_args(), 1);
805: $this->m_rawSettings = $v;
806: $this->n_rawSettings = true;
807: return $this->m_rawSettings;
808: }
809:
810:
811:
812: 813: 814: 815: 816:
817: private $n_rawSettingsHash = false;
818:
819: 820: 821: 822: 823: 824: 825:
826: private function get_rawSettingsHash()
827: {
828: return $this->m_rawSettingsHash;
829: }
830:
831:
832:
833: 834: 835: 836: 837:
838: private $n_status = false;
839:
840: 841: 842: 843: 844: 845: 846:
847: private function get_status()
848: {
849: return $this->m_status;
850: }
851:
852:
853:
854: 855: 856: 857: 858:
859: private $n_serviceClass = false;
860:
861: 862: 863: 864: 865: 866: 867:
868: private function get_serviceClass()
869: {
870: return $this->m_serviceClass;
871: }
872:
873:
874:
875: 876: 877: 878: 879:
880: private $n_availability = false;
881:
882: 883: 884: 885: 886: 887: 888:
889: private function get_availability()
890: {
891: return $this->m_availability;
892: }
893:
894:
895:
896: 897: 898: 899: 900:
901: private $n_swytchId = false;
902:
903: 904: 905: 906: 907: 908: 909:
910: private function get_swytchId()
911: {
912: return $this->m_swytchId;
913: }
914:
915:
916:
917: 918: 919: 920: 921: 922: 923:
924: protected function apiDeserializeImpl($r)
925: {
926: Util::validateArgCount(func_num_args(), 1);
927: $this->isNew = $r == null;
928: if ($this->isNew) {
929: $r = (object)[];
930: }
931: $this->isIncomplete = false;
932: if (Util::existsPath($r, "ID")) {
933: $this->m_id = Util::getByPath($r, "ID") == null ? null : "" . Util::getByPath($r, "ID");
934: }
935: else {
936: $this->m_id = null;
937: $this->isIncomplete = true;
938: }
939: $this->n_id = false;
940: if (Util::existsPath($r, "Class")) {
941: $this->m_clazz = Util::getByPath($r, "Class") == null ? null : "" . Util::getByPath($r, "Class");
942: }
943: else {
944: $this->m_clazz = null;
945: $this->isIncomplete = true;
946: }
947: $this->n_clazz = false;
948: if (Util::existsPath($r, "Name")) {
949: $this->m_name = Util::getByPath($r, "Name") == null ? null : "" . Util::getByPath($r, "Name");
950: }
951: else {
952: $this->m_name = null;
953: $this->isIncomplete = true;
954: }
955: $this->n_name = false;
956: if (Util::existsPath($r, "Description")) {
957: $this->m_description = Util::getByPath($r, "Description") == null ? null : "" . Util::getByPath($r, "Description");
958: }
959: else {
960: $this->m_description = null;
961: $this->isIncomplete = true;
962: }
963: $this->n_description = false;
964: if (Util::existsPath($r, "Tags")) {
965: if (Util::getByPath($r, "Tags") == null) {
966: $this->m_tags = new \ArrayObject([]);
967: }
968: else {
969: $this->m_tags = new \ArrayObject([]);
970: foreach (Util::getByPath($r, "Tags") as $t) {
971: $v1 = null;
972: $v1 = $t == null ? null : "" . $t;
973: $this->m_tags->append($v1);
974: }
975: }
976: }
977: else {
978: $this->m_tags = null;
979: $this->isIncomplete = true;
980: }
981: $this->n_tags = false;
982: if (Util::existsPath($r, "Icon")) {
983: $this->m_icon = Util::getByPath($r, "Icon") == null ? null : new Icon($this->_client, Util::getByPath($r, "Icon"));
984: }
985: else {
986: $this->m_icon = null;
987: $this->isIncomplete = true;
988: }
989: $this->n_icon = false;
990: if (Util::existsPath($r, "Plan.ID")) {
991: $this->m_planId = Util::getByPath($r, "Plan.ID") == null ? null : intval("" . Util::getByPath($r, "Plan.ID"));
992: }
993: else {
994: $this->m_planId = null;
995: $this->isIncomplete = true;
996: }
997: $this->n_planId = false;
998: if (Util::existsPath($r, "Interfaces")) {
999: if (Util::getByPath($r, "Interfaces") == null) {
1000: $this->m_ifaces = new \ArrayObject([]);
1001: }
1002: else {
1003: $this->m_ifaces = new \ArrayObject([]);
1004: foreach (Util::getByPath($r, "Interfaces") as $t) {
1005: $v2 = null;
1006: $v2 = $t == null ? null : new Iface($this->_client, $t);
1007: $this->m_ifaces->append($v2);
1008: }
1009: }
1010: }
1011: else {
1012: $this->m_ifaces = null;
1013: $this->isIncomplete = true;
1014: }
1015: $this->n_ifaces = false;
1016: if (Util::existsPath($r, "Remark")) {
1017: $this->m_rawAnnotation = Util::getByPath($r, "Remark");
1018: }
1019: else {
1020: $this->m_rawAnnotation = null;
1021: $this->isIncomplete = true;
1022: }
1023: $this->n_rawAnnotation = false;
1024: if (Util::existsPath($r, "Settings")) {
1025: $this->m_rawSettings = Util::getByPath($r, "Settings");
1026: }
1027: else {
1028: $this->m_rawSettings = null;
1029: $this->isIncomplete = true;
1030: }
1031: $this->n_rawSettings = false;
1032: if (Util::existsPath($r, "SettingsHash")) {
1033: $this->m_rawSettingsHash = Util::getByPath($r, "SettingsHash") == null ? null : "" . Util::getByPath($r, "SettingsHash");
1034: }
1035: else {
1036: $this->m_rawSettingsHash = null;
1037: $this->isIncomplete = true;
1038: }
1039: $this->n_rawSettingsHash = false;
1040: if (Util::existsPath($r, "Instance.Status")) {
1041: $this->m_status = Util::getByPath($r, "Instance.Status") == null ? null : "" . Util::getByPath($r, "Instance.Status");
1042: }
1043: else {
1044: $this->m_status = null;
1045: $this->isIncomplete = true;
1046: }
1047: $this->n_status = false;
1048: if (Util::existsPath($r, "ServiceClass")) {
1049: $this->m_serviceClass = Util::getByPath($r, "ServiceClass") == null ? null : "" . Util::getByPath($r, "ServiceClass");
1050: }
1051: else {
1052: $this->m_serviceClass = null;
1053: $this->isIncomplete = true;
1054: }
1055: $this->n_serviceClass = false;
1056: if (Util::existsPath($r, "Availability")) {
1057: $this->m_availability = Util::getByPath($r, "Availability") == null ? null : "" . Util::getByPath($r, "Availability");
1058: }
1059: else {
1060: $this->m_availability = null;
1061: $this->isIncomplete = true;
1062: }
1063: $this->n_availability = false;
1064: if (Util::existsPath($r, "Switch.ID")) {
1065: $this->m_swytchId = Util::getByPath($r, "Switch.ID") == null ? null : "" . Util::getByPath($r, "Switch.ID");
1066: }
1067: else {
1068: $this->m_swytchId = null;
1069: $this->isIncomplete = true;
1070: }
1071: $this->n_swytchId = false;
1072: }
1073:
1074: 1075: 1076: 1077: 1078: 1079:
1080: protected function apiSerializeImpl($withClean=false)
1081: {
1082: Util::validateType($withClean, "boolean");
1083: $missing = new \ArrayObject([]);
1084: $ret = (object)[];
1085: if ($withClean || $this->n_id) {
1086: Util::setByPath($ret, "ID", $this->m_id);
1087: }
1088: if ($withClean || $this->n_clazz) {
1089: Util::setByPath($ret, "Class", $this->m_clazz);
1090: }
1091: else {
1092: if ($this->isNew) {
1093: $missing->append("clazz");
1094: }
1095: }
1096: if ($withClean || $this->n_name) {
1097: Util::setByPath($ret, "Name", $this->m_name);
1098: }
1099: else {
1100: if ($this->isNew) {
1101: $missing->append("name");
1102: }
1103: }
1104: if ($withClean || $this->n_description) {
1105: Util::setByPath($ret, "Description", $this->m_description);
1106: }
1107: if ($withClean || $this->n_tags) {
1108: Util::setByPath($ret, "Tags", new \ArrayObject([]));
1109: foreach ($this->m_tags as $r1) {
1110: $v = null;
1111: $v = $r1;
1112: $ret->{"Tags"}->append($v);
1113: }
1114: }
1115: if ($withClean || $this->n_icon) {
1116: Util::setByPath($ret, "Icon", $withClean ? ($this->m_icon == null ? null : $this->m_icon->apiSerialize($withClean)) : ($this->m_icon == null ? (object)['ID' => "0"] : $this->m_icon->apiSerializeID()));
1117: }
1118: if ($withClean || $this->n_planId) {
1119: Util::setByPath($ret, "Plan.ID", $this->m_planId);
1120: }
1121: else {
1122: if ($this->isNew) {
1123: $missing->append("planId");
1124: }
1125: }
1126: if ($withClean || $this->n_ifaces) {
1127: Util::setByPath($ret, "Interfaces", new \ArrayObject([]));
1128: foreach ($this->m_ifaces as $r2) {
1129: $v = null;
1130: $v = $withClean ? ($r2 == null ? null : $r2->apiSerialize($withClean)) : ($r2 == null ? (object)['ID' => "0"] : $r2->apiSerializeID());
1131: $ret->{"Interfaces"}->append($v);
1132: }
1133: }
1134: if ($withClean || $this->n_rawAnnotation) {
1135: Util::setByPath($ret, "Remark", $this->m_rawAnnotation);
1136: }
1137: else {
1138: if ($this->isNew) {
1139: $missing->append("rawAnnotation");
1140: }
1141: }
1142: if ($withClean || $this->n_rawSettings) {
1143: Util::setByPath($ret, "Settings", $this->m_rawSettings);
1144: }
1145: if ($withClean || $this->n_rawSettingsHash) {
1146: Util::setByPath($ret, "SettingsHash", $this->m_rawSettingsHash);
1147: }
1148: if ($withClean || $this->n_status) {
1149: Util::setByPath($ret, "Instance.Status", $this->m_status);
1150: }
1151: if ($withClean || $this->n_serviceClass) {
1152: Util::setByPath($ret, "ServiceClass", $this->m_serviceClass);
1153: }
1154: if ($withClean || $this->n_availability) {
1155: Util::setByPath($ret, "Availability", $this->m_availability);
1156: }
1157: if ($withClean || $this->n_swytchId) {
1158: Util::setByPath($ret, "Switch.ID", $this->m_swytchId);
1159: }
1160: if ($missing->count() > 0) {
1161: throw new SaklientException("required_field", "Required fields must be set before the Appliance creation: " . implode(", ", (array)($missing)));
1162: }
1163: return $ret;
1164: }
1165:
1166: 1167: 1168:
1169: public function __get($key) {
1170: switch ($key) {
1171: case "id": return $this->get_id();
1172: case "clazz": return $this->get_clazz();
1173: case "name": return $this->get_name();
1174: case "description": return $this->get_description();
1175: case "tags": return $this->get_tags();
1176: case "icon": return $this->get_icon();
1177: case "planId": return $this->get_planId();
1178: case "ifaces": return $this->get_ifaces();
1179: case "rawAnnotation": return $this->get_rawAnnotation();
1180: case "rawSettings": return $this->get_rawSettings();
1181: case "rawSettingsHash": return $this->get_rawSettingsHash();
1182: case "status": return $this->get_status();
1183: case "serviceClass": return $this->get_serviceClass();
1184: case "availability": return $this->get_availability();
1185: case "swytchId": return $this->get_swytchId();
1186: default: return parent::__get($key);
1187: }
1188: }
1189:
1190: 1191: 1192:
1193: public function __set($key, $v) {
1194: switch ($key) {
1195: case "clazz": return $this->set_clazz($v);
1196: case "name": return $this->set_name($v);
1197: case "description": return $this->set_description($v);
1198: case "tags": return $this->set_tags($v);
1199: case "icon": return $this->set_icon($v);
1200: case "planId": return $this->set_planId($v);
1201: case "rawAnnotation": return $this->set_rawAnnotation($v);
1202: case "rawSettings": return $this->set_rawSettings($v);
1203: default: return parent::__set($key, $v);
1204: }
1205: }
1206:
1207: }
1208:
1209: