Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • version089
  • develop
  • homebrew
  • tests
  • cmake_windows
  • v0.8.8
  • v0.8.7
  • v0.8.6
  • v0.8.5
  • V0.8.4
  • v0.8.3
  • v0.8.2
  • v0.8.1
  • v0.8
  • v0.7
16 results

CMakeLists.txt

Blame
  • Event.php 13.40 KiB
    <?php
    /**
     * Event
     *
     * PHP version 5
     *
     * @category Class
     * @package  jards\eventsapiclient\Swagger\Client
     * @author   Swaagger Codegen team
     * @link     https://github.com/swagger-api/swagger-codegen
     */
    
    /**
     * Event receiver service. Send any events, which should be handled by this service.
     *
     * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
     *
     * OpenAPI spec version: 0.1
     * 
     * Generated by: https://github.com/swagger-api/swagger-codegen.git
     *
     */
    
    /**
     * 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 jards\eventsapiclient\Swagger\Client\Model;
    
    use \ArrayAccess;
    
    /**
     * Event Class Doc Comment
     *
     * @category    Class
     * @package     jards\eventsapiclient\Swagger\Client
     * @author      Swagger Codegen team
     * @link        https://github.com/swagger-api/swagger-codegen
     */
    class Event implements ArrayAccess
    {
        const DISCRIMINATOR = null;
    
        /**
          * The original name of the model.
          * @var string
          */
        protected static $swaggerModelName = 'Event';
    
        /**
          * Array of property to type mappings. Used for (de)serialization
          * @var string[]
          */
        protected static $swaggerTypes = [
            'date' => '\DateTime',
            'name' => 'string',
            'description' => 'string',
            'id' => 'int',
            'source' => 'string',
            'new_state' => 'string',
            'trigger_type' => 'string',
            'institutions' => 'string[]',
            'groupid' => 'int',
            'groupname' => 'string',
            'project' => '\jards\eventsapiclient\Swagger\Client\Model\Project',
            'application' => '\jards\eventsapiclient\Swagger\Client\Model\Application'
        ];
    
        /**
          * Array of property to format mappings. Used for (de)serialization
          * @var string[]
          */
        protected static $swaggerFormats = [
            'date' => 'date-time',
            'name' => null,
            'description' => null,
            'id' => null,
            'source' => null,
            'new_state' => null,
            'trigger_type' => null,
            'institutions' => null,
            'groupid' => null,
            'groupname' => null,
            'project' => null,
            'application' => null
        ];
    
        public static function swaggerTypes()
        {
            return self::$swaggerTypes;
        }
    
        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 = [
            'date' => 'date',
            'name' => 'name',
            'description' => 'description',
            'id' => 'id',
            'source' => 'source',
            'new_state' => 'newState',
            'trigger_type' => 'triggerType',
            'institutions' => 'institutions',
            'groupid' => 'groupid',
            'groupname' => 'groupname',
            'project' => 'project',
            'application' => 'application'
        ];
    
    
        /**
         * Array of attributes to setter functions (for deserialization of responses)
         * @var string[]
         */
        protected static $setters = [
            'date' => 'setDate',
            'name' => 'setName',
            'description' => 'setDescription',
            'id' => 'setId',
            'source' => 'setSource',
            'new_state' => 'setNewState',
            'trigger_type' => 'setTriggerType',
            'institutions' => 'setInstitutions',
            'groupid' => 'setGroupid',
            'groupname' => 'setGroupname',
            'project' => 'setProject',
            'application' => 'setApplication'
        ];
    
    
        /**
         * Array of attributes to getter functions (for serialization of requests)
         * @var string[]
         */
        protected static $getters = [
            'date' => 'getDate',
            'name' => 'getName',
            'description' => 'getDescription',
            'id' => 'getId',
            'source' => 'getSource',
            'new_state' => 'getNewState',
            'trigger_type' => 'getTriggerType',
            'institutions' => 'getInstitutions',
            'groupid' => 'getGroupid',
            'groupname' => 'getGroupname',
            'project' => 'getProject',
            'application' => 'getApplication'
        ];
    
        public static function attributeMap()
        {
            return self::$attributeMap;
        }
    
        public static function setters()
        {
            return self::$setters;
        }
    
        public static function getters()
        {
            return self::$getters;
        }
    
        
    
        
    
        /**
         * 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['date'] = isset($data['date']) ? $data['date'] : null;
            $this->container['name'] = isset($data['name']) ? $data['name'] : null;
            $this->container['description'] = isset($data['description']) ? $data['description'] : null;
            $this->container['id'] = isset($data['id']) ? $data['id'] : null;
            $this->container['source'] = isset($data['source']) ? $data['source'] : null;
            $this->container['new_state'] = isset($data['new_state']) ? $data['new_state'] : null;
            $this->container['trigger_type'] = isset($data['trigger_type']) ? $data['trigger_type'] : null;
            $this->container['institutions'] = isset($data['institutions']) ? $data['institutions'] : null;
            $this->container['groupid'] = isset($data['groupid']) ? $data['groupid'] : null;
            $this->container['groupname'] = isset($data['groupname']) ? $data['groupname'] : null;
            $this->container['project'] = isset($data['project']) ? $data['project'] : null;
            $this->container['application'] = isset($data['application']) ? $data['application'] : null;
        }
    
        /**
         * show all the invalid properties with reasons.
         *
         * @return array invalid properties with reasons
         */
        public function listInvalidProperties()
        {
            $invalid_properties = [];
    
            if ($this->container['date'] === null) {
                $invalid_properties[] = "'date' can't be null";
            }
            if ($this->container['name'] === null) {
                $invalid_properties[] = "'name' can't be null";
            }
            if ($this->container['description'] === null) {
                $invalid_properties[] = "'description' can't be null";
            }
            return $invalid_properties;
        }
    
        /**
         * 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['date'] === null) {
                return false;
            }
            if ($this->container['name'] === null) {
                return false;
            }
            if ($this->container['description'] === null) {
                return false;
            }
            return true;
        }
    
    
        /**
         * Gets date
         * @return \DateTime
         */
        public function getDate()
        {
            return $this->container['date'];
        }
    
        /**
         * Sets date
         * @param \DateTime $date Date when the event happened.
         * @return $this
         */
        public function setDate($date)
        {
            $this->container['date'] = $date;
    
            return $this;
        }
    
        /**
         * Gets name
         * @return string
         */
        public function getName()
        {
            return $this->container['name'];
        }
    
        /**
         * Sets name
         * @param string $name Name of the event
         * @return $this
         */
        public function setName($name)
        {
            $this->container['name'] = $name;
    
            return $this;
        }
    
        /**
         * Gets description
         * @return string
         */
        public function getDescription()
        {
            return $this->container['description'];
        }
    
        /**
         * Sets description
         * @param string $description Detailled description on what happened during this event
         * @return $this
         */
        public function setDescription($description)
        {
            $this->container['description'] = $description;
    
            return $this;
        }
    
        /**
         * Gets id
         * @return int
         */
        public function getId()
        {
            return $this->container['id'];
        }
    
        /**
         * Sets id
         * @param int $id Internal event ID, differs for every EventsAPI instance
         * @return $this
         */
        public function setId($id)
        {
            $this->container['id'] = $id;
    
            return $this;
        }
    
        /**
         * Gets source
         * @return string
         */
        public function getSource()
        {
            return $this->container['source'];
        }
    
        /**
         * Sets source
         * @param string $source Who has triggered the event?
         * @return $this
         */
        public function setSource($source)
        {
            $this->container['source'] = $source;
    
            return $this;
        }
    
        /**
         * Gets new_state
         * @return string
         */
        public function getNewState()
        {
            return $this->container['new_state'];
        }
    
        /**
         * Sets new_state
         * @param string $new_state The new state for the project or application caused by the event
         * @return $this
         */
        public function setNewState($new_state)
        {
            $this->container['new_state'] = $new_state;
    
            return $this;
        }
    
        /**
         * Gets trigger_type
         * @return string
         */
        public function getTriggerType()
        {
            return $this->container['trigger_type'];
        }
    
        /**
         * Sets trigger_type
         * @param string $trigger_type Name of the trigger which is activated by this event
         * @return $this
         */
        public function setTriggerType($trigger_type)
        {
            $this->container['trigger_type'] = $trigger_type;
    
            return $this;
        }
    
        /**
         * Gets institutions
         * @return string[]
         */
        public function getInstitutions()
        {
            return $this->container['institutions'];
        }
    
        /**
         * Sets institutions
         * @param string[] $institutions Institutions, for which this event is relevant. Active institution for this event. E.g. HLRS, JSC, LRZ
         * @return $this
         */
        public function setInstitutions($institutions)
        {
            $this->container['institutions'] = $institutions;
    
            return $this;
        }
    
        /**
         * Gets groupid
         * @return int
         */
        public function getGroupid()
        {
            return $this->container['groupid'];
        }
    
        /**
         * Sets groupid
         * @param int $groupid This is only available for review events. ID of review group where the event took place.
         * @return $this
         */
        public function setGroupid($groupid)
        {
        	$this->container['groupid'] = $groupid;
    
            return $this;
        }
    
        /**
         * Gets groupname
         * @return string
         */
        public function getGroupname()
        {
            return $this->container['groupname'];
        }
    
        /**
         * Sets groupname
         * @param string $groupname This is only available for review events. Name of review group where the event took place.
         * @return $this
         */
        public function setGroupname($groupname)
        {
        	$this->container['groupname'] = $groupname;
    
            return $this;
        }
    
        /**
         * Gets project
         * @return \jards\eventsapiclient\Swagger\Client\Model\Project
         */
        public function getProject()
        {
            return $this->container['project'];
        }
    
        /**
         * Sets project
         * @param \jards\eventsapiclient\Swagger\Client\Model\Project $project
         * @return $this
         */
        public function setProject($project)
        {
            $this->container['project'] = $project;
    
            return $this;
        }
    
        /**
         * Gets application
         * @return \jards\eventsapiclient\Swagger\Client\Model\Application
         */
        public function getApplication()
        {
            return $this->container['application'];
        }
    
        /**
         * Sets application
         * @param \jards\eventsapiclient\Swagger\Client\Model\Application $application
         * @return $this
         */
        public function setApplication($application)
        {
            $this->container['application'] = $application;
    
            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(\jards\eventsapiclient\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
            }
    
            return json_encode(\jards\eventsapiclient\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
        }
    }