NAP.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. <?php
  2. /**
  3. * NAP
  4. *
  5. * PHP version 5
  6. *
  7. * @category Class
  8. * @package Swagger\Client\FTTH
  9. * @author Swagger Codegen team
  10. * @link https://github.com/swagger-api/swagger-codegen
  11. */
  12. /**
  13. * FTTH Flowdat
  14. *
  15. * API REST para Flowdat FTTH.
  16. *
  17. * OpenAPI spec version: 1.0.0
  18. *
  19. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  20. * Swagger Codegen version: 2.4.0-SNAPSHOT
  21. */
  22. /**
  23. * NOTE: This class is auto generated by the swagger code generator program.
  24. * https://github.com/swagger-api/swagger-codegen
  25. * Do not edit the class manually.
  26. */
  27. namespace Swagger\Client\FTTH\Model;
  28. use ArrayAccess;
  29. use Swagger\Client\Model\ModelInterface;
  30. use Swagger\Client\ObjectSerializer;
  31. /**
  32. * NAP Class Doc Comment
  33. *
  34. * @category Class
  35. * @package Swagger\Client\FTTH
  36. * @author Swagger Codegen team
  37. * @link https://github.com/swagger-api/swagger-codegen
  38. */
  39. class NAP implements ModelInterface, ArrayAccess
  40. {
  41. const DISCRIMINATOR = null;
  42. /**
  43. * The original name of the model.
  44. *
  45. * @var string
  46. */
  47. protected static $swaggerModelName = 'NAP';
  48. /**
  49. * Array of property to type mappings. Used for (de)serialization
  50. *
  51. * @var string[]
  52. */
  53. protected static $swaggerTypes = [
  54. 'id' => 'int',
  55. 'name' => 'string',
  56. 'parent' => '\Swagger\Client\FTTH\Model\NAP',
  57. 'olt' => '\Swagger\Client\FTTH\Model\OLT',
  58. 'slot' => 'int',
  59. 'link' => 'int',
  60. 'extra_data' => 'string',
  61. 'tenancy_id' => 'int'
  62. ];
  63. /**
  64. * Array of property to format mappings. Used for (de)serialization
  65. *
  66. * @var string[]
  67. */
  68. protected static $swaggerFormats = [
  69. 'id' => null,
  70. 'name' => null,
  71. 'parent' => null,
  72. 'olt' => null,
  73. 'slot' => null,
  74. 'link' => null,
  75. 'extra_data' => 'json',
  76. 'tenancy_id' => null
  77. ];
  78. /**
  79. * Array of property to type mappings. Used for (de)serialization
  80. *
  81. * @return array
  82. */
  83. public static function swaggerTypes()
  84. {
  85. return self::$swaggerTypes;
  86. }
  87. /**
  88. * Array of property to format mappings. Used for (de)serialization
  89. *
  90. * @return array
  91. */
  92. public static function swaggerFormats()
  93. {
  94. return self::$swaggerFormats;
  95. }
  96. /**
  97. * Array of attributes where the key is the local name,
  98. * and the value is the original name
  99. *
  100. * @var string[]
  101. */
  102. protected static $attributeMap = [
  103. 'id' => 'id',
  104. 'name' => 'name',
  105. 'parent' => 'parent',
  106. 'olt' => 'olt',
  107. 'slot' => 'slot',
  108. 'link' => 'link',
  109. 'extra_data' => 'extraData',
  110. 'tenancy_id' => 'tenancyId'
  111. ];
  112. /**
  113. * Array of attributes to setter functions (for deserialization of responses)
  114. *
  115. * @var string[]
  116. */
  117. protected static $setters = [
  118. 'id' => 'setId',
  119. 'name' => 'setName',
  120. 'parent' => 'setParent',
  121. 'olt' => 'setOlt',
  122. 'slot' => 'setSlot',
  123. 'link' => 'setLink',
  124. 'extra_data' => 'setExtraData',
  125. 'tenancy_id' => 'setTenancyId'
  126. ];
  127. /**
  128. * Array of attributes to getter functions (for serialization of requests)
  129. *
  130. * @var string[]
  131. */
  132. protected static $getters = [
  133. 'id' => 'getId',
  134. 'name' => 'getName',
  135. 'parent' => 'getParent',
  136. 'olt' => 'getOlt',
  137. 'slot' => 'getSlot',
  138. 'link' => 'getLink',
  139. 'extra_data' => 'getExtraData',
  140. 'tenancy_id' => 'getTenancyId'
  141. ];
  142. /**
  143. * Array of attributes where the key is the local name,
  144. * and the value is the original name
  145. *
  146. * @return array
  147. */
  148. public static function attributeMap()
  149. {
  150. return self::$attributeMap;
  151. }
  152. /**
  153. * Array of attributes to setter functions (for deserialization of responses)
  154. *
  155. * @return array
  156. */
  157. public static function setters()
  158. {
  159. return self::$setters;
  160. }
  161. /**
  162. * Array of attributes to getter functions (for serialization of requests)
  163. *
  164. * @return array
  165. */
  166. public static function getters()
  167. {
  168. return self::$getters;
  169. }
  170. /**
  171. * The original name of the model.
  172. *
  173. * @return string
  174. */
  175. public function getModelName()
  176. {
  177. return self::$swaggerModelName;
  178. }
  179. /**
  180. * Associative array for storing property values
  181. *
  182. * @var mixed[]
  183. */
  184. protected $container = [];
  185. /**
  186. * Constructor
  187. *
  188. * @param mixed[] $data Associated array of property values
  189. * initializing the model
  190. */
  191. public function __construct(array $data = null)
  192. {
  193. $this->container['id'] = isset($data['id']) ? $data['id'] : null;
  194. $this->container['name'] = isset($data['name']) ? $data['name'] : null;
  195. $this->container['parent'] = isset($data['parent']) ? $data['parent'] : null;
  196. $this->container['olt'] = isset($data['olt']) ? $data['olt'] : null;
  197. $this->container['slot'] = isset($data['slot']) ? $data['slot'] : null;
  198. $this->container['link'] = isset($data['link']) ? $data['link'] : null;
  199. $this->container['extra_data'] = isset($data['extra_data']) ? $data['extra_data'] : null;
  200. $this->container['tenancy_id'] = isset($data['tenancy_id']) ? $data['tenancy_id'] : null;
  201. }
  202. /**
  203. * Show all the invalid properties with reasons.
  204. *
  205. * @return array invalid properties with reasons
  206. */
  207. public function listInvalidProperties()
  208. {
  209. $invalidProperties = [];
  210. return $invalidProperties;
  211. }
  212. /**
  213. * Validate all the properties in the model
  214. * return true if all passed
  215. *
  216. * @return bool True if all properties are valid
  217. */
  218. public function valid()
  219. {
  220. return count($this->listInvalidProperties()) === 0;
  221. }
  222. /**
  223. * Gets id
  224. *
  225. * @return int
  226. */
  227. public function getId()
  228. {
  229. return $this->container['id'];
  230. }
  231. /**
  232. * Sets id
  233. *
  234. * @param int $id Id del NAP.
  235. *
  236. * @return $this
  237. */
  238. public function setId($id)
  239. {
  240. $this->container['id'] = $id;
  241. return $this;
  242. }
  243. /**
  244. * Gets name
  245. *
  246. * @return string
  247. */
  248. public function getName()
  249. {
  250. return $this->container['name'];
  251. }
  252. /**
  253. * Sets name
  254. *
  255. * @param string $name Nombre del NAP.
  256. *
  257. * @return $this
  258. */
  259. public function setName($name)
  260. {
  261. $this->container['name'] = $name;
  262. return $this;
  263. }
  264. /**
  265. * Gets parent
  266. *
  267. * @return int
  268. */
  269. public function getParent()
  270. {
  271. return $this->container['parent'];
  272. }
  273. /**
  274. * Sets parent
  275. *
  276. * @param int $parent Id del NAP padre.
  277. *
  278. * @return $this
  279. */
  280. public function setParent($parent)
  281. {
  282. $this->container['parent'] = $parent;
  283. return $this;
  284. }
  285. /**
  286. * Gets olt
  287. *
  288. * @return int
  289. */
  290. public function getOlt()
  291. {
  292. return $this->container['olt'];
  293. }
  294. /**
  295. * Sets olt
  296. *
  297. * @param int $olt Id de la OLT al cual se conecta.
  298. *
  299. * @return $this
  300. */
  301. public function setOlt($olt)
  302. {
  303. $this->container['olt'] = $olt;
  304. return $this;
  305. }
  306. /**
  307. * Gets slot
  308. *
  309. * @return int
  310. */
  311. public function getSlot()
  312. {
  313. return $this->container['slot'];
  314. }
  315. /**
  316. * Sets slot
  317. *
  318. * @param int $slot Slot de conexión.
  319. *
  320. * @return $this
  321. */
  322. public function setSlot($slot)
  323. {
  324. $this->container['slot'] = $slot;
  325. return $this;
  326. }
  327. /**
  328. * Gets link
  329. *
  330. * @return int
  331. */
  332. public function getLink()
  333. {
  334. return $this->container['link'];
  335. }
  336. /**
  337. * Sets link
  338. *
  339. * @param int $link Link de conexión.
  340. *
  341. * @return $this
  342. */
  343. public function setLink($link)
  344. {
  345. $this->container['link'] = $link;
  346. return $this;
  347. }
  348. /**
  349. * Gets extra_data
  350. *
  351. * @return string
  352. */
  353. public function getExtraData()
  354. {
  355. return $this->container['extra_data'];
  356. }
  357. /**
  358. * Sets extra_data
  359. *
  360. * @param string $extra_data Datos extras almacenados.
  361. *
  362. * @return $this
  363. */
  364. public function setExtraData($extra_data)
  365. {
  366. $this->container['extra_data'] = $extra_data;
  367. return $this;
  368. }
  369. /**
  370. * Gets tenancy_id
  371. *
  372. * @return int
  373. */
  374. public function getTenancyId()
  375. {
  376. return $this->container['tenancy_id'];
  377. }
  378. /**
  379. * Sets tenancy_id
  380. *
  381. * @param int $tenancy_id Id de la tenencia a la que pertenece el NAP.
  382. *
  383. * @return $this
  384. */
  385. public function setTenancyId($tenancy_id)
  386. {
  387. $this->container['tenancy_id'] = $tenancy_id;
  388. return $this;
  389. }
  390. /**
  391. * Returns true if offset exists. False otherwise.
  392. *
  393. * @param integer $offset Offset
  394. *
  395. * @return boolean
  396. */
  397. public function offsetExists($offset)
  398. {
  399. return isset($this->container[$offset]);
  400. }
  401. /**
  402. * Gets offset.
  403. *
  404. * @param integer $offset Offset
  405. *
  406. * @return mixed
  407. */
  408. public function offsetGet($offset)
  409. {
  410. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  411. }
  412. /**
  413. * Sets value based on offset.
  414. *
  415. * @param integer $offset Offset
  416. * @param mixed $value Value to be set
  417. *
  418. * @return void
  419. */
  420. public function offsetSet($offset, $value)
  421. {
  422. if (is_null($offset)) {
  423. $this->container[] = $value;
  424. } else {
  425. $this->container[$offset] = $value;
  426. }
  427. }
  428. /**
  429. * Unsets offset.
  430. *
  431. * @param integer $offset Offset
  432. *
  433. * @return void
  434. */
  435. public function offsetUnset($offset)
  436. {
  437. unset($this->container[$offset]);
  438. }
  439. /**
  440. * Gets the string presentation of the object
  441. *
  442. * @return string
  443. */
  444. public function __toString()
  445. {
  446. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  447. return json_encode(
  448. ObjectSerializer::sanitizeForSerialization($this),
  449. JSON_PRETTY_PRINT
  450. );
  451. }
  452. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  453. }
  454. }