Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.17 KB | None | 0 0
  1. <?php
  2. /**
  3.  * ClientGene
  4.  *
  5.  * PHP version 5
  6.  *
  7.  * @category Class
  8.  * @package  Swagger\Client
  9.  * @author   Swagger Codegen team
  10.  * @link     https://github.com/swagger-api/swagger-codegen
  11.  */
  12.  
  13. /**
  14.  * Lumminary API
  15.  *
  16.  * A universal API for accesing genomic data
  17.  *
  18.  * OpenAPI spec version: 1.0
  19.  *
  20.  * Generated by: https://github.com/swagger-api/swagger-codegen.git
  21.  * Swagger Codegen version: 2.3.1
  22.  */
  23.  
  24. /**
  25.  * NOTE: This class is auto generated by the swagger code generator program.
  26.  * https://github.com/swagger-api/swagger-codegen
  27.  * Do not edit the class manually.
  28.  */
  29.  
  30. namespace Swagger\Client\Model;
  31.  
  32. use \ArrayAccess;
  33. use \Swagger\Client\ObjectSerializer;
  34.  
  35. /**
  36.  * ClientGene Class Doc Comment
  37.  *
  38.  * @category Class
  39.  * @package  Swagger\Client
  40.  * @author   Swagger Codegen team
  41.  * @link     https://github.com/swagger-api/swagger-codegen
  42.  */
  43. class ClientGene implements ModelInterface, ArrayAccess
  44. {
  45.     const DISCRIMINATOR = null;
  46.  
  47.     /**
  48.       * The original name of the model.
  49.       *
  50.       * @var string
  51.       */
  52.     protected static $swaggerModelName = 'ClientGene';
  53.  
  54.     /**
  55.       * Array of property to type mappings. Used for (de)serialization
  56.       *
  57.       * @var string[]
  58.       */
  59.     protected static $swaggerTypes = [
  60.         'snps' => 'object[]',
  61.         'symbol' => 'string',
  62.         'molecular_location' => '\Swagger\Client\Model\MolecularLocation',
  63.         'sequences' => '\Swagger\Client\Model\Sequences'
  64.     ];
  65.  
  66.     /**
  67.       * Array of property to format mappings. Used for (de)serialization
  68.       *
  69.       * @var string[]
  70.       */
  71.     protected static $swaggerFormats = [
  72.         'snps' => null,
  73.         'symbol' => null,
  74.         'molecular_location' => null,
  75.         'sequences' => null
  76.     ];
  77.  
  78.     /**
  79.      * Array of property to type mappings. Used for (de)serialization
  80.      *
  81.      * @return array
  82.      */
  83.     public static function swaggerTypes()
  84.     {
  85.         return self::$swaggerTypes;
  86.     }
  87.  
  88.     /**
  89.      * Array of property to format mappings. Used for (de)serialization
  90.      *
  91.      * @return array
  92.      */
  93.     public static function swaggerFormats()
  94.     {
  95.         return self::$swaggerFormats;
  96.     }
  97.  
  98.     /**
  99.      * Array of attributes where the key is the local name,
  100.      * and the value is the original name
  101.      *
  102.      * @var string[]
  103.      */
  104.     protected static $attributeMap = [
  105.         'snps' => 'snps',
  106.         'symbol' => 'symbol',
  107.         'molecular_location' => 'molecular_location',
  108.         'sequences' => 'sequences'
  109.     ];
  110.  
  111.     /**
  112.      * Array of attributes to setter functions (for deserialization of responses)
  113.      *
  114.      * @var string[]
  115.      */
  116.     protected static $setters = [
  117.         'snps' => 'setSnps',
  118.         'symbol' => 'setSymbol',
  119.         'molecular_location' => 'setMolecularLocation',
  120.         'sequences' => 'setSequences'
  121.     ];
  122.  
  123.     /**
  124.      * Array of attributes to getter functions (for serialization of requests)
  125.      *
  126.      * @var string[]
  127.      */
  128.     protected static $getters = [
  129.         'snps' => 'getSnps',
  130.         'symbol' => 'getSymbol',
  131.         'molecular_location' => 'getMolecularLocation',
  132.         'sequences' => 'getSequences'
  133.     ];
  134.  
  135.     /**
  136.      * Array of attributes where the key is the local name,
  137.      * and the value is the original name
  138.      *
  139.      * @return array
  140.      */
  141.     public static function attributeMap()
  142.     {
  143.         return self::$attributeMap;
  144.     }
  145.  
  146.     /**
  147.      * Array of attributes to setter functions (for deserialization of responses)
  148.      *
  149.      * @return array
  150.      */
  151.     public static function setters()
  152.     {
  153.         return self::$setters;
  154.     }
  155.  
  156.     /**
  157.      * Array of attributes to getter functions (for serialization of requests)
  158.      *
  159.      * @return array
  160.      */
  161.     public static function getters()
  162.     {
  163.         return self::$getters;
  164.     }
  165.  
  166.     /**
  167.      * The original name of the model.
  168.      *
  169.      * @return string
  170.      */
  171.     public function getModelName()
  172.     {
  173.         return self::$swaggerModelName;
  174.     }
  175.  
  176.    
  177.  
  178.    
  179.  
  180.     /**
  181.      * Associative array for storing property values
  182.      *
  183.      * @var mixed[]
  184.      */
  185.     protected $container = [];
  186.  
  187.     /**
  188.      * Constructor
  189.      *
  190.      * @param mixed[] $data Associated array of property values
  191.      *                      initializing the model
  192.      */
  193.     public function __construct(array $data = null)
  194.     {
  195.         $this->container['snps'] = isset($data['snps']) ? $data['snps'] : null;
  196.         $this->container['symbol'] = isset($data['symbol']) ? $data['symbol'] : null;
  197.         $this->container['molecular_location'] = isset($data['molecular_location']) ? $data['molecular_location'] : null;
  198.         $this->container['sequences'] = isset($data['sequences']) ? $data['sequences'] : null;
  199.     }
  200.  
  201.     /**
  202.      * Show all the invalid properties with reasons.
  203.      *
  204.      * @return array invalid properties with reasons
  205.      */
  206.     public function listInvalidProperties()
  207.     {
  208.         $invalidProperties = [];
  209.  
  210.         if ($this->container['snps'] === null) {
  211.             $invalidProperties[] = "'snps' can't be null";
  212.         }
  213.         if ($this->container['symbol'] === null) {
  214.             $invalidProperties[] = "'symbol' can't be null";
  215.         }
  216.         if ((strlen($this->container['symbol']) < 1)) {
  217.             $invalidProperties[] = "invalid value for 'symbol', the character length must be bigger than or equal to 1.";
  218.         }
  219.  
  220.         if ($this->container['molecular_location'] === null) {
  221.             $invalidProperties[] = "'molecular_location' can't be null";
  222.         }
  223.         if ($this->container['sequences'] === null) {
  224.             $invalidProperties[] = "'sequences' can't be null";
  225.         }
  226.         return $invalidProperties;
  227.     }
  228.  
  229.     /**
  230.      * Validate all the properties in the model
  231.      * return true if all passed
  232.      *
  233.      * @return bool True if all properties are valid
  234.      */
  235.     public function valid()
  236.     {
  237.  
  238.         if ($this->container['snps'] === null) {
  239.             return false;
  240.         }
  241.         if ($this->container['symbol'] === null) {
  242.             return false;
  243.         }
  244.         if (strlen($this->container['symbol']) < 1) {
  245.             return false;
  246.         }
  247.         if ($this->container['molecular_location'] === null) {
  248.             return false;
  249.         }
  250.         if ($this->container['sequences'] === null) {
  251.             return false;
  252.         }
  253.         return true;
  254.     }
  255.  
  256.  
  257.     /**
  258.      * Gets snps
  259.      *
  260.      * @return object[]
  261.      */
  262.     public function getSnps()
  263.     {
  264.         return $this->container['snps'];
  265.     }
  266.  
  267.     /**
  268.      * Sets snps
  269.      *
  270.      * @param object[] $snps The SNPs contained in the gene that are also present in the dataset
  271.      *
  272.      * @return $this
  273.      */
  274.     public function setSnps($snps)
  275.     {
  276.         $this->container['snps'] = $snps;
  277.  
  278.         return $this;
  279.     }
  280.  
  281.     /**
  282.      * Gets symbol
  283.      *
  284.      * @return string
  285.      */
  286.     public function getSymbol()
  287.     {
  288.         return $this->container['symbol'];
  289.     }
  290.  
  291.     /**
  292.      * Sets symbol
  293.      *
  294.      * @param string $symbol The gene accession string
  295.      *
  296.      * @return $this
  297.      */
  298.     public function setSymbol($symbol)
  299.     {
  300.  
  301.         if ((strlen($symbol) < 1)) {
  302.             throw new \InvalidArgumentException('invalid length for $symbol when calling ClientGene., must be bigger than or equal to 1.');
  303.         }
  304.  
  305.         $this->container['symbol'] = $symbol;
  306.  
  307.         return $this;
  308.     }
  309.  
  310.     /**
  311.      * Gets molecular_location
  312.      *
  313.      * @return \Swagger\Client\Model\MolecularLocation
  314.      */
  315.     public function getMolecularLocation()
  316.     {
  317.         return $this->container['molecular_location'];
  318.     }
  319.  
  320.     /**
  321.      * Sets molecular_location
  322.      *
  323.      * @param \Swagger\Client\Model\MolecularLocation $molecular_location Full location information for where the gene is placed
  324.      *
  325.      * @return $this
  326.      */
  327.     public function setMolecularLocation($molecular_location)
  328.     {
  329.         $this->container['molecular_location'] = $molecular_location;
  330.  
  331.         return $this;
  332.     }
  333.  
  334.     /**
  335.      * Gets sequences
  336.      *
  337.      * @return \Swagger\Client\Model\Sequences
  338.      */
  339.     public function getSequences()
  340.     {
  341.         return $this->container['sequences'];
  342.     }
  343.  
  344.     /**
  345.      * Sets sequences
  346.      *
  347.      * @param \Swagger\Client\Model\Sequences $sequences Alternating reference sequences and snps representing a synthetic view of the gene
  348.      *
  349.      * @return $this
  350.      */
  351.     public function setSequences($sequences)
  352.     {
  353.         $this->container['sequences'] = $sequences;
  354.  
  355.         return $this;
  356.     }
  357.     /**
  358.      * Returns true if offset exists. False otherwise.
  359.      *
  360.      * @param integer $offset Offset
  361.      *
  362.      * @return boolean
  363.      */
  364.     public function offsetExists($offset)
  365.     {
  366.         return isset($this->container[$offset]);
  367.     }
  368.  
  369.     /**
  370.      * Gets offset.
  371.      *
  372.      * @param integer $offset Offset
  373.      *
  374.      * @return mixed
  375.      */
  376.     public function offsetGet($offset)
  377.     {
  378.         return isset($this->container[$offset]) ? $this->container[$offset] : null;
  379.     }
  380.  
  381.     /**
  382.      * Sets value based on offset.
  383.      *
  384.      * @param integer $offset Offset
  385.      * @param mixed   $value  Value to be set
  386.      *
  387.      * @return void
  388.      */
  389.     public function offsetSet($offset, $value)
  390.     {
  391.         if (is_null($offset)) {
  392.             $this->container[] = $value;
  393.         } else {
  394.             $this->container[$offset] = $value;
  395.         }
  396.     }
  397.  
  398.     /**
  399.      * Unsets offset.
  400.      *
  401.      * @param integer $offset Offset
  402.      *
  403.      * @return void
  404.      */
  405.     public function offsetUnset($offset)
  406.     {
  407.         unset($this->container[$offset]);
  408.     }
  409.  
  410.     /**
  411.      * Gets the string presentation of the object
  412.      *
  413.      * @return string
  414.      */
  415.     public function __toString()
  416.     {
  417.         if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
  418.             return json_encode(
  419.                 ObjectSerializer::sanitizeForSerialization($this),
  420.                 JSON_PRETTY_PRINT
  421.             );
  422.         }
  423.  
  424.         return json_encode(ObjectSerializer::sanitizeForSerialization($this));
  425.     }
  426. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement