lib/Model/StopPreopenContainerForms.php (111 lines of code) (raw):

<?php /** * StopPreopenContainerForms * * 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; /** * StopPreopenContainerForms Class Doc Comment * * @category Class * @package Yjopenapi\Client */ class StopPreopenContainerForms implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. * * @var string */ protected static $serialModelName = 'StopPreopenContainerForms'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $serialTypes = [ 'app_key' => 'string', 'game_id' => 'string', 'number_of_batches' => 'int' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $serialFormats = [ 'app_key' => null, 'game_id' => null, 'number_of_batches' => 'int32' ]; /** * 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 = [ 'app_key' => 'appKey', 'game_id' => 'gameId', 'number_of_batches' => 'numberOfBatches' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'app_key' => 'setAppKey', 'game_id' => 'setGameId', 'number_of_batches' => 'setNumberOfBatches' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'app_key' => 'getAppKey', 'game_id' => 'getGameId', 'number_of_batches' => 'getNumberOfBatches' ]; /** * 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['app_key'] = isset($data['app_key']) ? $data['app_key'] : null; $this->container['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; $this->container['number_of_batches'] = isset($data['number_of_batches']) ? $data['number_of_batches'] : null; } /** * Gets app_key * * @return string */ public function getAppKey() { return $this->container['app_key']; } /** * Sets app_key * * @param string $app_key 项目应用AK * * @return $this */ public function setAppKey($app_key) { $this->container['app_key'] = $app_key; return $this; } /** * Gets game_id * * @return string */ public function getGameId() { return $this->container['game_id']; } /** * Sets game_id * * @param string $game_id 元境平台游戏ID * * @return $this */ public function setGameId($game_id) { $this->container['game_id'] = $game_id; return $this; } /** * Gets number_of_batches * * @return int */ public function getNumberOfBatches() { return $this->container['number_of_batches']; } /** * Sets number_of_batches * * @param int $number_of_batches 分批数 * * @return $this */ public function setNumberOfBatches($number_of_batches) { $this->container['number_of_batches'] = $number_of_batches; 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)); } }