Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * ClientGene
- *
- * PHP version 5
- *
- * @category Class
- * @package Swagger\Client
- * @author Swagger Codegen team
- * @link https://github.com/swagger-api/swagger-codegen
- */
- /**
- * Lumminary API
- *
- * A universal API for accesing genomic data
- *
- * OpenAPI spec version: 1.0
- *
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- * Swagger Codegen version: 2.3.1
- */
- /**
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen
- * Do not edit the class manually.
- */
- namespace Swagger\Client\Model;
- use \ArrayAccess;
- use \Swagger\Client\ObjectSerializer;
- /**
- * ClientGene Class Doc Comment
- *
- * @category Class
- * @package Swagger\Client
- * @author Swagger Codegen team
- * @link https://github.com/swagger-api/swagger-codegen
- */
- class ClientGene implements ModelInterface, ArrayAccess
- {
- const DISCRIMINATOR = null;
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $swaggerModelName = 'ClientGene';
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $swaggerTypes = [
- 'snps' => 'object[]',
- 'symbol' => 'string',
- 'molecular_location' => '\Swagger\Client\Model\MolecularLocation',
- 'sequences' => '\Swagger\Client\Model\Sequences'
- ];
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $swaggerFormats = [
- 'snps' => null,
- 'symbol' => null,
- 'molecular_location' => null,
- 'sequences' => null
- ];
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function swaggerTypes()
- {
- return self::$swaggerTypes;
- }
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @return array
- */
- public static function swaggerFormats()
- {
- return self::$swaggerFormats;
- }
- /**
- * Array of attributes where the key is the local name,
- * and the value is the original name
- *
- * @var string[]
- */
- protected static $attributeMap = [
- 'snps' => 'snps',
- 'symbol' => 'symbol',
- 'molecular_location' => 'molecular_location',
- 'sequences' => 'sequences'
- ];
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'snps' => 'setSnps',
- 'symbol' => 'setSymbol',
- 'molecular_location' => 'setMolecularLocation',
- 'sequences' => 'setSequences'
- ];
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'snps' => 'getSnps',
- 'symbol' => 'getSymbol',
- 'molecular_location' => 'getMolecularLocation',
- 'sequences' => 'getSequences'
- ];
- /**
- * 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::$swaggerModelName;
- }
- /**
- * 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['snps'] = isset($data['snps']) ? $data['snps'] : null;
- $this->container['symbol'] = isset($data['symbol']) ? $data['symbol'] : null;
- $this->container['molecular_location'] = isset($data['molecular_location']) ? $data['molecular_location'] : null;
- $this->container['sequences'] = isset($data['sequences']) ? $data['sequences'] : null;
- }
- /**
- * Show all the invalid properties with reasons.
- *
- * @return array invalid properties with reasons
- */
- public function listInvalidProperties()
- {
- $invalidProperties = [];
- if ($this->container['snps'] === null) {
- $invalidProperties[] = "'snps' can't be null";
- }
- if ($this->container['symbol'] === null) {
- $invalidProperties[] = "'symbol' can't be null";
- }
- if ((strlen($this->container['symbol']) < 1)) {
- $invalidProperties[] = "invalid value for 'symbol', the character length must be bigger than or equal to 1.";
- }
- if ($this->container['molecular_location'] === null) {
- $invalidProperties[] = "'molecular_location' can't be null";
- }
- if ($this->container['sequences'] === null) {
- $invalidProperties[] = "'sequences' can't be null";
- }
- return $invalidProperties;
- }
- /**
- * Validate all the properties in the model
- * return true if all passed
- *
- * @return bool True if all properties are valid
- */
- public function valid()
- {
- if ($this->container['snps'] === null) {
- return false;
- }
- if ($this->container['symbol'] === null) {
- return false;
- }
- if (strlen($this->container['symbol']) < 1) {
- return false;
- }
- if ($this->container['molecular_location'] === null) {
- return false;
- }
- if ($this->container['sequences'] === null) {
- return false;
- }
- return true;
- }
- /**
- * Gets snps
- *
- * @return object[]
- */
- public function getSnps()
- {
- return $this->container['snps'];
- }
- /**
- * Sets snps
- *
- * @param object[] $snps The SNPs contained in the gene that are also present in the dataset
- *
- * @return $this
- */
- public function setSnps($snps)
- {
- $this->container['snps'] = $snps;
- return $this;
- }
- /**
- * Gets symbol
- *
- * @return string
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
- /**
- * Sets symbol
- *
- * @param string $symbol The gene accession string
- *
- * @return $this
- */
- public function setSymbol($symbol)
- {
- if ((strlen($symbol) < 1)) {
- throw new \InvalidArgumentException('invalid length for $symbol when calling ClientGene., must be bigger than or equal to 1.');
- }
- $this->container['symbol'] = $symbol;
- return $this;
- }
- /**
- * Gets molecular_location
- *
- * @return \Swagger\Client\Model\MolecularLocation
- */
- public function getMolecularLocation()
- {
- return $this->container['molecular_location'];
- }
- /**
- * Sets molecular_location
- *
- * @param \Swagger\Client\Model\MolecularLocation $molecular_location Full location information for where the gene is placed
- *
- * @return $this
- */
- public function setMolecularLocation($molecular_location)
- {
- $this->container['molecular_location'] = $molecular_location;
- return $this;
- }
- /**
- * Gets sequences
- *
- * @return \Swagger\Client\Model\Sequences
- */
- public function getSequences()
- {
- return $this->container['sequences'];
- }
- /**
- * Sets sequences
- *
- * @param \Swagger\Client\Model\Sequences $sequences Alternating reference sequences and snps representing a synthetic view of the gene
- *
- * @return $this
- */
- public function setSequences($sequences)
- {
- $this->container['sequences'] = $sequences;
- 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));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement