lib/Model/BatchStopGameForms.php (156 lines of code) (raw):

<?php /** * BatchStopGameForms * * 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; /** * BatchStopGameForms Class Doc Comment * * @category Class * @package Yjopenapi\Client */ class BatchStopGameForms implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. * * @var string */ protected static $serialModelName = 'BatchStopGameForms'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $serialTypes = [ 'game_id' => 'string', 'app_key' => 'string', 'token' => 'string', 'reason' => 'string', 'track_info' => 'string', 'tags' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $serialFormats = [ 'game_id' => null, 'app_key' => null, 'token' => null, 'reason' => null, 'track_info' => null, 'tags' => 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 = [ 'game_id' => 'gameId', 'app_key' => 'appKey', 'token' => 'token', 'reason' => 'reason', 'track_info' => 'trackInfo', 'tags' => 'tags' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'game_id' => 'setGameId', 'app_key' => 'setAppKey', 'token' => 'setToken', 'reason' => 'setReason', 'track_info' => 'setTrackInfo', 'tags' => 'setTags' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'game_id' => 'getGameId', 'app_key' => 'getAppKey', 'token' => 'getToken', 'reason' => 'getReason', 'track_info' => 'getTrackInfo', 'tags' => 'getTags' ]; /** * 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['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; $this->container['app_key'] = isset($data['app_key']) ? $data['app_key'] : null; $this->container['token'] = isset($data['token']) ? $data['token'] : null; $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['track_info'] = isset($data['track_info']) ? $data['track_info'] : null; $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; } /** * Gets game_id * * @return string */ public function getGameId() { return $this->container['game_id']; } /** * Sets game_id * * @param string $game_id Paas平台部署的游戏Id * * @return $this */ public function setGameId($game_id) { $this->container['game_id'] = $game_id; return $this; } /** * Gets app_key * * @return string */ public function getAppKey() { return $this->container['app_key']; } /** * Sets app_key * * @param string $app_key Paas平台AK(应用的AK,非服务端AK) * * @return $this */ public function setAppKey($app_key) { $this->container['app_key'] = $app_key; return $this; } /** * Gets token * * @return string */ public function getToken() { return $this->container['token']; } /** * Sets token * * @param string $token 通过接口获取的token * * @return $this */ public function setToken($token) { $this->container['token'] = $token; return $this; } /** * Gets reason * * @return string */ public function getReason() { return $this->container['reason']; } /** * Sets reason * * @param string $reason 踢人的原因,会透传到sdk侧 * * @return $this */ public function setReason($reason) { $this->container['reason'] = $reason; return $this; } /** * Gets track_info * * @return string */ public function getTrackInfo() { return $this->container['track_info']; } /** * Sets track_info * * @param string $track_info TrackInfo,回传消息 * * @return $this */ public function setTrackInfo($track_info) { $this->container['track_info'] = $track_info; return $this; } /** * Gets tags * * @return string */ public function getTags() { return $this->container['tags']; } /** * Sets tags * * @param string $tags 支持多标签传输 * * @return $this */ public function setTags($tags) { $this->container['tags'] = $tags; 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)); } }