/scormcloud/vendor/rustici-software/scormcloud-api-v2-client-php/src/Model/XapiActivityDefinition.php

https://github.com/RusticiSoftware/SCORMCloud_WordPressPlugin · PHP · 632 lines · 266 code · 70 blank · 296 comment · 3 complexity · b8aaa62ac31f1a4b91232fd9d5c6b277 MD5 · raw file

  1. <?php
  2. /**
  3. * XapiActivityDefinition
  4. *
  5. * PHP version 7
  6. *
  7. * @category Class
  8. * @package RusticiSoftware\Cloud\V2
  9. * @author Swagger Codegen team
  10. * @link https://github.com/swagger-api/swagger-codegen
  11. */
  12. /**
  13. * SCORM Cloud Rest API
  14. *
  15. * REST API used for SCORM Cloud integrations.
  16. *
  17. * OpenAPI spec version: 2.0
  18. *
  19. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  20. * Swagger Codegen version: 2.4.12
  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 RusticiSoftware\Cloud\V2\Model;
  28. use \ArrayAccess;
  29. use \RusticiSoftware\Cloud\V2\ObjectSerializer;
  30. /**
  31. * XapiActivityDefinition Class Doc Comment
  32. *
  33. * @category Class
  34. * @description https://github.com/adlnet/xAPI-Spec/blob/1.0.2/xAPI.md#activity-definition
  35. * @package RusticiSoftware\Cloud\V2
  36. * @author Swagger Codegen team
  37. * @link https://github.com/swagger-api/swagger-codegen
  38. */
  39. class XapiActivityDefinition 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 = 'XapiActivityDefinition';
  48. /**
  49. * Array of property to type mappings. Used for (de)serialization
  50. *
  51. * @var string[]
  52. */
  53. protected static $swaggerTypes = [
  54. 'name' => 'map[string,string]',
  55. 'description' => 'map[string,string]',
  56. 'type' => 'string',
  57. 'more_info' => 'string',
  58. 'interaction_type' => 'string',
  59. 'correct_responses_pattern' => 'string[]',
  60. 'choices' => '\RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]',
  61. 'scale' => '\RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]',
  62. 'source' => '\RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]',
  63. 'target' => '\RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]',
  64. 'steps' => '\RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]',
  65. 'extensions' => 'map[string,object]'
  66. ];
  67. /**
  68. * Array of property to format mappings. Used for (de)serialization
  69. *
  70. * @var string[]
  71. */
  72. protected static $swaggerFormats = [
  73. 'name' => null,
  74. 'description' => null,
  75. 'type' => null,
  76. 'more_info' => null,
  77. 'interaction_type' => null,
  78. 'correct_responses_pattern' => null,
  79. 'choices' => null,
  80. 'scale' => null,
  81. 'source' => null,
  82. 'target' => null,
  83. 'steps' => null,
  84. 'extensions' => null
  85. ];
  86. /**
  87. * Array of property to type mappings. Used for (de)serialization
  88. *
  89. * @return array
  90. */
  91. public static function swaggerTypes()
  92. {
  93. return self::$swaggerTypes;
  94. }
  95. /**
  96. * Array of property to format mappings. Used for (de)serialization
  97. *
  98. * @return array
  99. */
  100. public static function swaggerFormats()
  101. {
  102. return self::$swaggerFormats;
  103. }
  104. /**
  105. * Array of attributes where the key is the local name,
  106. * and the value is the original name
  107. *
  108. * @var string[]
  109. */
  110. protected static $attributeMap = [
  111. 'name' => 'name',
  112. 'description' => 'description',
  113. 'type' => 'type',
  114. 'more_info' => 'moreInfo',
  115. 'interaction_type' => 'interactionType',
  116. 'correct_responses_pattern' => 'correctResponsesPattern',
  117. 'choices' => 'choices',
  118. 'scale' => 'scale',
  119. 'source' => 'source',
  120. 'target' => 'target',
  121. 'steps' => 'steps',
  122. 'extensions' => 'extensions'
  123. ];
  124. /**
  125. * Array of attributes to setter functions (for deserialization of responses)
  126. *
  127. * @var string[]
  128. */
  129. protected static $setters = [
  130. 'name' => 'setName',
  131. 'description' => 'setDescription',
  132. 'type' => 'setType',
  133. 'more_info' => 'setMoreInfo',
  134. 'interaction_type' => 'setInteractionType',
  135. 'correct_responses_pattern' => 'setCorrectResponsesPattern',
  136. 'choices' => 'setChoices',
  137. 'scale' => 'setScale',
  138. 'source' => 'setSource',
  139. 'target' => 'setTarget',
  140. 'steps' => 'setSteps',
  141. 'extensions' => 'setExtensions'
  142. ];
  143. /**
  144. * Array of attributes to getter functions (for serialization of requests)
  145. *
  146. * @var string[]
  147. */
  148. protected static $getters = [
  149. 'name' => 'getName',
  150. 'description' => 'getDescription',
  151. 'type' => 'getType',
  152. 'more_info' => 'getMoreInfo',
  153. 'interaction_type' => 'getInteractionType',
  154. 'correct_responses_pattern' => 'getCorrectResponsesPattern',
  155. 'choices' => 'getChoices',
  156. 'scale' => 'getScale',
  157. 'source' => 'getSource',
  158. 'target' => 'getTarget',
  159. 'steps' => 'getSteps',
  160. 'extensions' => 'getExtensions'
  161. ];
  162. /**
  163. * Array of attributes where the key is the local name,
  164. * and the value is the original name
  165. *
  166. * @return array
  167. */
  168. public static function attributeMap()
  169. {
  170. return self::$attributeMap;
  171. }
  172. /**
  173. * Array of attributes to setter functions (for deserialization of responses)
  174. *
  175. * @return array
  176. */
  177. public static function setters()
  178. {
  179. return self::$setters;
  180. }
  181. /**
  182. * Array of attributes to getter functions (for serialization of requests)
  183. *
  184. * @return array
  185. */
  186. public static function getters()
  187. {
  188. return self::$getters;
  189. }
  190. /**
  191. * The original name of the model.
  192. *
  193. * @return string
  194. */
  195. public function getModelName()
  196. {
  197. return self::$swaggerModelName;
  198. }
  199. /**
  200. * Associative array for storing property values
  201. *
  202. * @var mixed[]
  203. */
  204. protected $container = [];
  205. /**
  206. * Constructor
  207. *
  208. * @param mixed[] $data Associated array of property values
  209. * initializing the model
  210. */
  211. public function __construct(array $data = null)
  212. {
  213. $this->container['name'] = isset($data['name']) ? $data['name'] : null;
  214. $this->container['description'] = isset($data['description']) ? $data['description'] : null;
  215. $this->container['type'] = isset($data['type']) ? $data['type'] : null;
  216. $this->container['more_info'] = isset($data['more_info']) ? $data['more_info'] : null;
  217. $this->container['interaction_type'] = isset($data['interaction_type']) ? $data['interaction_type'] : null;
  218. $this->container['correct_responses_pattern'] = isset($data['correct_responses_pattern']) ? $data['correct_responses_pattern'] : null;
  219. $this->container['choices'] = isset($data['choices']) ? $data['choices'] : null;
  220. $this->container['scale'] = isset($data['scale']) ? $data['scale'] : null;
  221. $this->container['source'] = isset($data['source']) ? $data['source'] : null;
  222. $this->container['target'] = isset($data['target']) ? $data['target'] : null;
  223. $this->container['steps'] = isset($data['steps']) ? $data['steps'] : null;
  224. $this->container['extensions'] = isset($data['extensions']) ? $data['extensions'] : null;
  225. }
  226. /**
  227. * Show all the invalid properties with reasons.
  228. *
  229. * @return array invalid properties with reasons
  230. */
  231. public function listInvalidProperties()
  232. {
  233. $invalidProperties = [];
  234. return $invalidProperties;
  235. }
  236. /**
  237. * Validate all the properties in the model
  238. * return true if all passed
  239. *
  240. * @return bool True if all properties are valid
  241. */
  242. public function valid()
  243. {
  244. return count($this->listInvalidProperties()) === 0;
  245. }
  246. /**
  247. * Gets name
  248. *
  249. * @return map[string,string]
  250. */
  251. public function getName()
  252. {
  253. return $this->container['name'];
  254. }
  255. /**
  256. * Sets name
  257. *
  258. * @param map[string,string] $name name
  259. *
  260. * @return $this
  261. */
  262. public function setName($name)
  263. {
  264. $this->container['name'] = $name;
  265. return $this;
  266. }
  267. /**
  268. * Gets description
  269. *
  270. * @return map[string,string]
  271. */
  272. public function getDescription()
  273. {
  274. return $this->container['description'];
  275. }
  276. /**
  277. * Sets description
  278. *
  279. * @param map[string,string] $description description
  280. *
  281. * @return $this
  282. */
  283. public function setDescription($description)
  284. {
  285. $this->container['description'] = $description;
  286. return $this;
  287. }
  288. /**
  289. * Gets type
  290. *
  291. * @return string
  292. */
  293. public function getType()
  294. {
  295. return $this->container['type'];
  296. }
  297. /**
  298. * Sets type
  299. *
  300. * @param string $type type
  301. *
  302. * @return $this
  303. */
  304. public function setType($type)
  305. {
  306. $this->container['type'] = $type;
  307. return $this;
  308. }
  309. /**
  310. * Gets more_info
  311. *
  312. * @return string
  313. */
  314. public function getMoreInfo()
  315. {
  316. return $this->container['more_info'];
  317. }
  318. /**
  319. * Sets more_info
  320. *
  321. * @param string $more_info more_info
  322. *
  323. * @return $this
  324. */
  325. public function setMoreInfo($more_info)
  326. {
  327. $this->container['more_info'] = $more_info;
  328. return $this;
  329. }
  330. /**
  331. * Gets interaction_type
  332. *
  333. * @return string
  334. */
  335. public function getInteractionType()
  336. {
  337. return $this->container['interaction_type'];
  338. }
  339. /**
  340. * Sets interaction_type
  341. *
  342. * @param string $interaction_type interaction_type
  343. *
  344. * @return $this
  345. */
  346. public function setInteractionType($interaction_type)
  347. {
  348. $this->container['interaction_type'] = $interaction_type;
  349. return $this;
  350. }
  351. /**
  352. * Gets correct_responses_pattern
  353. *
  354. * @return string[]
  355. */
  356. public function getCorrectResponsesPattern()
  357. {
  358. return $this->container['correct_responses_pattern'];
  359. }
  360. /**
  361. * Sets correct_responses_pattern
  362. *
  363. * @param string[] $correct_responses_pattern correct_responses_pattern
  364. *
  365. * @return $this
  366. */
  367. public function setCorrectResponsesPattern($correct_responses_pattern)
  368. {
  369. $this->container['correct_responses_pattern'] = $correct_responses_pattern;
  370. return $this;
  371. }
  372. /**
  373. * Gets choices
  374. *
  375. * @return \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]
  376. */
  377. public function getChoices()
  378. {
  379. return $this->container['choices'];
  380. }
  381. /**
  382. * Sets choices
  383. *
  384. * @param \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[] $choices choices
  385. *
  386. * @return $this
  387. */
  388. public function setChoices($choices)
  389. {
  390. $this->container['choices'] = $choices;
  391. return $this;
  392. }
  393. /**
  394. * Gets scale
  395. *
  396. * @return \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]
  397. */
  398. public function getScale()
  399. {
  400. return $this->container['scale'];
  401. }
  402. /**
  403. * Sets scale
  404. *
  405. * @param \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[] $scale scale
  406. *
  407. * @return $this
  408. */
  409. public function setScale($scale)
  410. {
  411. $this->container['scale'] = $scale;
  412. return $this;
  413. }
  414. /**
  415. * Gets source
  416. *
  417. * @return \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]
  418. */
  419. public function getSource()
  420. {
  421. return $this->container['source'];
  422. }
  423. /**
  424. * Sets source
  425. *
  426. * @param \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[] $source source
  427. *
  428. * @return $this
  429. */
  430. public function setSource($source)
  431. {
  432. $this->container['source'] = $source;
  433. return $this;
  434. }
  435. /**
  436. * Gets target
  437. *
  438. * @return \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]
  439. */
  440. public function getTarget()
  441. {
  442. return $this->container['target'];
  443. }
  444. /**
  445. * Sets target
  446. *
  447. * @param \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[] $target target
  448. *
  449. * @return $this
  450. */
  451. public function setTarget($target)
  452. {
  453. $this->container['target'] = $target;
  454. return $this;
  455. }
  456. /**
  457. * Gets steps
  458. *
  459. * @return \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[]
  460. */
  461. public function getSteps()
  462. {
  463. return $this->container['steps'];
  464. }
  465. /**
  466. * Sets steps
  467. *
  468. * @param \RusticiSoftware\Cloud\V2\Model\XapiInteractionComponent[] $steps steps
  469. *
  470. * @return $this
  471. */
  472. public function setSteps($steps)
  473. {
  474. $this->container['steps'] = $steps;
  475. return $this;
  476. }
  477. /**
  478. * Gets extensions
  479. *
  480. * @return map[string,object]
  481. */
  482. public function getExtensions()
  483. {
  484. return $this->container['extensions'];
  485. }
  486. /**
  487. * Sets extensions
  488. *
  489. * @param map[string,object] $extensions extensions
  490. *
  491. * @return $this
  492. */
  493. public function setExtensions($extensions)
  494. {
  495. $this->container['extensions'] = $extensions;
  496. return $this;
  497. }
  498. /**
  499. * Returns true if offset exists. False otherwise.
  500. *
  501. * @param integer $offset Offset
  502. *
  503. * @return boolean
  504. */
  505. public function offsetExists($offset)
  506. {
  507. return isset($this->container[$offset]);
  508. }
  509. /**
  510. * Gets offset.
  511. *
  512. * @param integer $offset Offset
  513. *
  514. * @return mixed
  515. */
  516. public function offsetGet($offset)
  517. {
  518. return isset($this->container[$offset]) ? $this->container[$offset] : null;
  519. }
  520. /**
  521. * Sets value based on offset.
  522. *
  523. * @param integer $offset Offset
  524. * @param mixed $value Value to be set
  525. *
  526. * @return void
  527. */
  528. public function offsetSet($offset, $value)
  529. {
  530. if (is_null($offset)) {
  531. $this->container[] = $value;
  532. } else {
  533. $this->container[$offset] = $value;
  534. }
  535. }
  536. /**
  537. * Unsets offset.
  538. *
  539. * @param integer $offset Offset
  540. *
  541. * @return void
  542. */
  543. public function offsetUnset($offset)
  544. {
  545. unset($this->container[$offset]);
  546. }
  547. /**
  548. * Gets the string presentation of the object
  549. *
  550. * @return string
  551. */
  552. public function __toString()
  553. {
  554. if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  555. return json_encode(
  556. ObjectSerializer::sanitizeForSerialization($this),
  557. JSON_PRETTY_PRINT
  558. );
  559. }
  560. return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  561. }
  562. }