lib/Model/ConsoleAdminListControllersOfGameResultModelDataList.php (171 lines of code) (raw):

<?php /** * ConsoleAdminListControllersOfGameResultModelDataList * * PHP version 5 * * @category Class * @package Yjopenapi\Client */ /** Package client * * * YuanJing OpenAPI SDK for PHP * * * */ namespace Yjopenapi\Client\Model; use \ArrayAccess; use \Yjopenapi\Client\Api\ObjectSerializer; /** * ConsoleAdminListControllersOfGameResultModelDataList Class Doc Comment * * @category Class * @package Yjopenapi\Client */ class ConsoleAdminListControllersOfGameResultModelDataList implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. * * @var string */ protected static $serialModelName = 'ConsoleAdminListControllersOfGameResultModelDataList'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $serialTypes = [ 'id' => 'string', 'name' => 'string', 'bg_pic' => 'string', 'config' => 'string', 'type' => 'int', 'ctltype' => 'string', 'priority' => 'int' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $serialFormats = [ 'id' => null, 'name' => null, 'bg_pic' => null, 'config' => null, 'type' => null, 'ctltype' => null, 'priority' => null ]; /** * Array of property to type mappings. Used for (de)serialization * * @return array */ public static function serialTypes() { return self::$serialTypes; } /** * Array of property to format mappings. Used for (de)serialization * * @return array */ public static function serialFormats() { return self::$serialFormats; } /** * Array of attributes where the key is the local name, * and the value is the original name * * @var string[] */ protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', 'bg_pic' => 'bgPic', 'config' => 'config', 'type' => 'type', 'ctltype' => 'ctltype', 'priority' => 'priority' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'id' => 'setId', 'name' => 'setName', 'bg_pic' => 'setBgPic', 'config' => 'setConfig', 'type' => 'setType', 'ctltype' => 'setCtltype', 'priority' => 'setPriority' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'id' => 'getId', 'name' => 'getName', 'bg_pic' => 'getBgPic', 'config' => 'getConfig', 'type' => 'getType', 'ctltype' => 'getCtltype', 'priority' => 'getPriority' ]; /** * Array of attributes where the key is the local name, * and the value is the original name * * @return array */ public static function attributeMap() { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) * * @return array */ public static function setters() { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) * * @return array */ public static function getters() { return self::$getters; } /** * The original name of the model. * * @return string */ public function getModelName() { return self::$serialModelName; } /** * Associative array for storing property values * * @var mixed[] */ protected $container = []; /** * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ public function __construct(array $data = null) { $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['bg_pic'] = isset($data['bg_pic']) ? $data['bg_pic'] : null; $this->container['config'] = isset($data['config']) ? $data['config'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['ctltype'] = isset($data['ctltype']) ? $data['ctltype'] : null; $this->container['priority'] = isset($data['priority']) ? $data['priority'] : null; } /** * Gets id * * @return string */ public function getId() { return $this->container['id']; } /** * Sets id * * @param string $id 控制器ID * * @return $this */ public function setId($id) { $this->container['id'] = $id; return $this; } /** * Gets name * * @return string */ public function getName() { return $this->container['name']; } /** * Sets name * * @param string $name 名称 * * @return $this */ public function setName($name) { $this->container['name'] = $name; return $this; } /** * Gets bg_pic * * @return string */ public function getBgPic() { return $this->container['bg_pic']; } /** * Sets bg_pic * * @param string $bg_pic 背景图 * * @return $this */ public function setBgPic($bg_pic) { $this->container['bg_pic'] = $bg_pic; return $this; } /** * Gets config * * @return string */ public function getConfig() { return $this->container['config']; } /** * Sets config * * @param string $config 配置 * * @return $this */ public function setConfig($config) { $this->container['config'] = $config; return $this; } /** * Gets type * * @return int */ public function getType() { return $this->container['type']; } /** * Sets type * * @param int $type 方案类型 * * @return $this */ public function setType($type) { $this->container['type'] = $type; return $this; } /** * Gets ctltype * * @return string */ public function getCtltype() { return $this->container['ctltype']; } /** * Sets ctltype * * @param string $ctltype 控制器类型 * * @return $this */ public function setCtltype($ctltype) { $this->container['ctltype'] = $ctltype; return $this; } /** * Gets priority * * @return int */ public function getPriority() { return $this->container['priority']; } /** * Sets priority * * @param int $priority 优先级 * * @return $this */ public function setPriority($priority) { $this->container['priority'] = $priority; return $this; } /** * Returns true if offset exists. False otherwise. * * @param integer $offset Offset * * @return boolean */ public function offsetExists($offset) { return isset($this->container[$offset]); } /** * Gets offset. * * @param integer $offset Offset * * @return mixed */ public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** * Sets value based on offset. * * @param integer $offset Offset * @param mixed $value Value to be set * * @return void */ public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } /** * Unsets offset. * * @param integer $offset Offset * * @return void */ public function offsetUnset($offset) { unset($this->container[$offset]); } /** * Gets the string presentation of the object * * @return string */ public function __toString() { //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print // return json_encode( // ObjectSerializer::sanitizeForSerialization($this), // JSON_PRETTY_PRINT // ); //} return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } }