diff --git a/README.md b/README.md index 634cbf14f1690ee97f7cd623873398379e1b2ed2..125e38605f2f5a30b1cf64ccffbac512d352a5ec 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ No description provided (generated by Swagger Codegen https://github.com/swagger This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 0.0.1 +- API version: 0.1 - Build package: io.swagger.codegen.languages.PhpClientCodegen ## Requirements @@ -80,7 +80,9 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [Application](docs/Model/Application.md) - [Event](docs/Model/Event.md) + - [Project](docs/Model/Project.md) ## Documentation For Authorization diff --git a/autoload.php b/autoload.php index ce929f537dfd9890144340180833191cd723bcdf..54b73d6993b5a2b116927e9aca49031f3ab4606c 100644 --- a/autoload.php +++ b/autoload.php @@ -5,7 +5,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/composer.json b/composer.json index 0b71647acb303f22689d5239e3f823643ccbc7a9..a40f67a01c4608fe87d74fc4ec57925265df9153 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "jards/eventsapiclient", + "name": "/", "description": "", "keywords": [ "swagger", diff --git a/docs/Model/Application.md b/docs/Model/Application.md new file mode 100644 index 0000000000000000000000000000000000000000..fd600bd63c87f77969e504d99ee313e743e49840 --- /dev/null +++ b/docs/Model/Application.md @@ -0,0 +1,11 @@ +# Application + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Application / Proposal ID | +**type** | **string** | Proposal type such as extension or new | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/Event.md b/docs/Model/Event.md index 81db203881201c4938d936ec4709e5a86e1388a6..5bdafca84ab1a7739496439e9a96a4d26c0fce16 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -3,10 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date** | [**\DateTime**](\DateTime.md) | | -**name** | **string** | | -**description** | **string** | | -**id** | **int** | | [optional] +**date** | [**\DateTime**](\DateTime.md) | Date when the event happened. | +**name** | **string** | Name of the event | +**description** | **string** | Detailled description on what happened during this event | +**id** | **int** | Internal event ID, differs for every EventsAPI instance | [optional] +**source** | **string** | Who has triggered the event? | [optional] +**new_state** | **string** | The new state for the project or application caused by the event | [optional] +**trigger_type** | **string** | Name of the trigger which is activated by this event | [optional] +**project** | [**\Swagger\Client\Model\Project**](Project.md) | | [optional] +**application** | [**\Swagger\Client\Model\Application**](Application.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Project.md b/docs/Model/Project.md new file mode 100644 index 0000000000000000000000000000000000000000..ce60387e176643ba60d4cd22e4e2aaa21d40feb7 --- /dev/null +++ b/docs/Model/Project.md @@ -0,0 +1,11 @@ +# Project + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Project ID | +**type** | **string** | Project type such as regular, gcs, test, large-scale | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/events_api.json b/events_api.json new file mode 100644 index 0000000000000000000000000000000000000000..ad18ec194329dc4bc500f5bc18f9ede5e321f9c3 --- /dev/null +++ b/events_api.json @@ -0,0 +1,154 @@ +{ + "swagger": "2.0", + "info": { + "version": "0.1", + "title": "Event receiver service. Send any events, which should be handled by this service." + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/events": { + "get": { + "description": "Get a list of all events sent to this service.\n", + "responses": { + "200": { + "description": "Successful response", + "schema": { + "title": "List of events", + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + } + } + }, + "tags": [ + "Events" + ] + }, + "post":{ + "summary": "", + "description": "Send a new event.", + "parameters": [ + { + "name": "event", + "in": "body", + "description": "The event, which happened and should be handled.", + "required": true, + "schema": { + "$ref": "#/definitions/Event" + } + } + ], + "responses": { + "200": { + "description": "Event was successfully handled.", + "schema": { + "title": "Success message", + "type": "string" + } + }, + "400": { + "description": "Error occurred during event handling.", + "schema": { + "title": "error message", + "type": "string" + } + } + }, + "tags": [ + "Events" + ] + } + } + }, + "definitions": { + "Event": { + "type": "object", + "required": [ + "date", + "name", + "description" + ], + "properties": { + "date": { + "description": "Date when the event happened.", + "type": "string", + "format": "date-time" + }, + "name": { + "description": "Name of the event", + "type": "string" + }, + "description": { + "description": "Detailled description on what happened during this event", + "type": "string" + }, + "id":{ + "description": "Internal event ID, differs for every EventsAPI instance", + "type": "integer" + }, + "source": { + "description": "Who has triggered the event?", + "type": "string" + }, + "newState": { + "description": "The new state for the project or application caused by the event", + "type": "string" + }, + "triggerType": { + "description": "Name of the trigger which is activated by this event", + "type": "string" + }, + "project" : { + "$ref": "#/definitions/Project" + }, + "application" : { + "$ref": "#/definitions/Application" + } + } + }, + "Project": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Project ID", + "type": "string" + }, + "type": { + "description": "Project type such as regular, gcs, test, large-scale", + "type": "string" + } + } + }, + "Application": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Application / Proposal ID", + "type": "integer" + }, + "type": { + "description": "Proposal type such as extension or new", + "type": "string" + } + } + } + }, + "tags": [ + { + "name": "Events", + "description": "Post and list events to this receiver." + } + ] +} \ No newline at end of file diff --git a/lib/Api/EventsApi.php b/lib/Api/EventsApi.php index c58fa01f7603e62716fd4a975c5b28577a97a063..c3124946ff01687400e58bd2ee0d0c27cf28b28a 100644 --- a/lib/Api/EventsApi.php +++ b/lib/Api/EventsApi.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/lib/ApiClient.php b/lib/ApiClient.php index 36bc8586f777fa207c3c5f5fd121959f5cb9e52a..946589c9f66059091655d121c8b112584ac1676a 100644 --- a/lib/ApiClient.php +++ b/lib/ApiClient.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -178,12 +178,6 @@ class ApiClient curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); } - - if(! empty($this->config->getCertificate())){ - curl_setopt($curl, CURLOPT_SSLCERT, $this->config->getCertificate()); - curl_setopt($curl, CURLOPT_SSLKEY, $this->config->getCertificateKey()); - curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $this->config->getCertificatePassphrase()); - } if ($this->config->getCurlProxyHost()) { curl_setopt($curl, CURLOPT_PROXY, $this->config->getCurlProxyHost()); diff --git a/lib/ApiException.php b/lib/ApiException.php index 63fd1847f644af822fc4282e535958e92fee8302..51fc480e1c30e01bbcc622537ff71f24c5075291 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/lib/Configuration.php b/lib/Configuration.php index 040b49b96c09000f7ee89e00c3aa6b343d313a1e..bd8a234b51c28c1a0d9028db85c94d9c07c5671a 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -141,24 +141,6 @@ class Configuration */ protected $sslVerification = true; - /** - * Path to client certificate - * @var string path to client certificate - */ - protected $certificate = null; - - /** - * Path to client certificate key file - * @var string path to client certificate key file - */ - protected $certificateKey = null; - - /** - * passphrase for the certificate key file - * @var string passphrase for the certificate key file - */ - protected $certificatePassphrase = null; - /** * Curl proxy host * @@ -708,67 +690,6 @@ class Configuration { return $this->sslVerification; } - - /** - * Sets certificate file for client certificate - * - * @param string $certificate path to client certificate - * @return Configuration - */ - public function setCertificate($certificate) - { - $this->certificate = $certificate; - return $this; - } - - /** - * - * @return string certificate file for client certificate - */ - public function getCertificate() - { - return $this->certificate; - } - - /** - * Set certificate key file - * @param string $certificatekey certificate key file - * @return \Swagger\Client\Configuration - */ - public function setCertificateKey($certificatekey) - { - $this->certificateKey = $certificatekey; - return $this; - } - - /** - * - * @return string certificate key file - */ - public function getCertificateKey() - { - return $this->certificateKey; - } - - /** - * Set passphrase for client certificate key file - * @param string $passphrase passphrase for client certificate key file - * @return \Swagger\Client\Configuration - */ - public function setCertificatePassphrase($passphrase) - { - $this->certificatePassphrase = $passphrase; - return $this; - } - - /** - * - * @return string passphrase for client certificate key file - */ - public function getCertificatePassphrase() - { - return $this->certificatePassphrase; - } /** * Gets the default configuration instance @@ -806,7 +727,7 @@ class Configuration $report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 0.0.1' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 0.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Application.php b/lib/Model/Application.php new file mode 100644 index 0000000000000000000000000000000000000000..451f2357f0217d9a2f770ff66d6010e4309a2367 --- /dev/null +++ b/lib/Model/Application.php @@ -0,0 +1,275 @@ +<?php +/** + * Application + * + * PHP version 5 + * + * @category Class + * @package 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 Swagger\Client\Model; + +use \ArrayAccess; + +/** + * Application Class Doc Comment + * + * @category Class + * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class Application implements ArrayAccess +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * @var string + */ + protected static $swaggerModelName = 'Application'; + + /** + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerTypes = [ + 'id' => 'int', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'type' => 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 = [ + 'id' => 'id', + 'type' => 'type' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType' + ]; + + 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' 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['id'] === null) { + return false; + } + return true; + } + + + /** + * Gets id + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param int $id Application / Proposal ID + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * @param string $type Proposal type such as extension or new + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + 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(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Event.php b/lib/Model/Event.php index 9853b3c4e8f57c824b82fc91955ba2a4c14b000f..aa7fde69dee4c6bdf2f4fc10090a631b962419e1 100644 --- a/lib/Model/Event.php +++ b/lib/Model/Event.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -57,7 +57,12 @@ class Event implements ArrayAccess 'date' => '\DateTime', 'name' => 'string', 'description' => 'string', - 'id' => 'int' + 'id' => 'int', + 'source' => 'string', + 'new_state' => 'string', + 'trigger_type' => 'string', + 'project' => '\Swagger\Client\Model\Project', + 'application' => '\Swagger\Client\Model\Application' ]; /** @@ -68,7 +73,12 @@ class Event implements ArrayAccess 'date' => 'date-time', 'name' => null, 'description' => null, - 'id' => null + 'id' => null, + 'source' => null, + 'new_state' => null, + 'trigger_type' => null, + 'project' => null, + 'application' => null ]; public static function swaggerTypes() @@ -89,7 +99,12 @@ class Event implements ArrayAccess 'date' => 'date', 'name' => 'name', 'description' => 'description', - 'id' => 'id' + 'id' => 'id', + 'source' => 'source', + 'new_state' => 'newState', + 'trigger_type' => 'triggerType', + 'project' => 'project', + 'application' => 'application' ]; @@ -101,7 +116,12 @@ class Event implements ArrayAccess 'date' => 'setDate', 'name' => 'setName', 'description' => 'setDescription', - 'id' => 'setId' + 'id' => 'setId', + 'source' => 'setSource', + 'new_state' => 'setNewState', + 'trigger_type' => 'setTriggerType', + 'project' => 'setProject', + 'application' => 'setApplication' ]; @@ -113,7 +133,12 @@ class Event implements ArrayAccess 'date' => 'getDate', 'name' => 'getName', 'description' => 'getDescription', - 'id' => 'getId' + 'id' => 'getId', + 'source' => 'getSource', + 'new_state' => 'getNewState', + 'trigger_type' => 'getTriggerType', + 'project' => 'getProject', + 'application' => 'getApplication' ]; public static function attributeMap() @@ -151,6 +176,11 @@ class Event implements ArrayAccess $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['project'] = isset($data['project']) ? $data['project'] : null; + $this->container['application'] = isset($data['application']) ? $data['application'] : null; } /** @@ -207,7 +237,7 @@ class Event implements ArrayAccess /** * Sets date - * @param \DateTime $date + * @param \DateTime $date Date when the event happened. * @return $this */ public function setDate($date) @@ -228,7 +258,7 @@ class Event implements ArrayAccess /** * Sets name - * @param string $name + * @param string $name Name of the event * @return $this */ public function setName($name) @@ -249,7 +279,7 @@ class Event implements ArrayAccess /** * Sets description - * @param string $description + * @param string $description Detailled description on what happened during this event * @return $this */ public function setDescription($description) @@ -270,7 +300,7 @@ class Event implements ArrayAccess /** * Sets id - * @param int $id + * @param int $id Internal event ID, differs for every EventsAPI instance * @return $this */ public function setId($id) @@ -279,6 +309,111 @@ class Event implements ArrayAccess 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 project + * @return \Swagger\Client\Model\Project + */ + public function getProject() + { + return $this->container['project']; + } + + /** + * Sets project + * @param \Swagger\Client\Model\Project $project + * @return $this + */ + public function setProject($project) + { + $this->container['project'] = $project; + + return $this; + } + + /** + * Gets application + * @return \Swagger\Client\Model\Application + */ + public function getApplication() + { + return $this->container['application']; + } + + /** + * Sets application + * @param \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 diff --git a/lib/Model/Project.php b/lib/Model/Project.php new file mode 100644 index 0000000000000000000000000000000000000000..e5a7d98bbc0837ea794b38c003285d371c6678db --- /dev/null +++ b/lib/Model/Project.php @@ -0,0 +1,275 @@ +<?php +/** + * Project + * + * PHP version 5 + * + * @category Class + * @package 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 Swagger\Client\Model; + +use \ArrayAccess; + +/** + * Project Class Doc Comment + * + * @category Class + * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class Project implements ArrayAccess +{ + const DISCRIMINATOR = null; + + /** + * The original name of the model. + * @var string + */ + protected static $swaggerModelName = 'Project'; + + /** + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerTypes = [ + 'id' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null, + 'type' => 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 = [ + 'id' => 'id', + 'type' => 'type' + ]; + + + /** + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType' + ]; + + + /** + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType' + ]; + + 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['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + } + + /** + * show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalid_properties = []; + + if ($this->container['id'] === null) { + $invalid_properties[] = "'id' 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['id'] === null) { + return false; + } + return true; + } + + + /** + * Gets id + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * @param string $id Project ID + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * @param string $type Project type such as regular, gcs, test, large-scale + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + 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(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); + } + + return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index b33f256b07e28ca4af411f326ee7fcd3105d3373..eb238668f7179a476db7f70875ce449511410482 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/test/Api/EventsApiTest.php b/test/Api/EventsApiTest.php index 80e3493350023b61dfe4a2295c1d346acadc8e0a..2509e489caa5479c933be4b09cf6bbca3c0e3718 100644 --- a/test/Api/EventsApiTest.php +++ b/test/Api/EventsApiTest.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * diff --git a/test/Model/ApplicationTest.php b/test/Model/ApplicationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..162de67db1cf2133f48001440cb742b69f5b2074 --- /dev/null +++ b/test/Model/ApplicationTest.php @@ -0,0 +1,93 @@ +<?php +/** + * ApplicationTest + * + * PHP version 5 + * + * @category Class + * @package Swagger\Client + * @author Swagger 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 + * Please update the test case below to test the model. + */ + +namespace Swagger\Client; + +/** + * ApplicationTest Class Doc Comment + * + * @category Class */ +// * @description Application +/** + * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class ApplicationTest extends \PHPUnit_Framework_TestCase +{ + + /** + * Setup before running any test case + */ + public static function setUpBeforeClass() + { + } + + /** + * Setup before running each test case + */ + public function setUp() + { + } + + /** + * Clean up after running each test case + */ + public function tearDown() + { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass() + { + } + + /** + * Test "Application" + */ + public function testApplication() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + + /** + * Test attribute "type" + */ + public function testPropertyType() + { + } +} diff --git a/test/Model/EventTest.php b/test/Model/EventTest.php index 51a4c9aadad25b0a072cd41425cb01a78fe11a43..c2bc0803843cd74eb22bcb982b1f2e1c77ea4abf 100644 --- a/test/Model/EventTest.php +++ b/test/Model/EventTest.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 0.0.1 + * OpenAPI spec version: 0.1 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * @@ -104,4 +104,39 @@ class EventTest extends \PHPUnit_Framework_TestCase public function testPropertyId() { } + + /** + * Test attribute "source" + */ + public function testPropertySource() + { + } + + /** + * Test attribute "new_state" + */ + public function testPropertyNewState() + { + } + + /** + * Test attribute "trigger_type" + */ + public function testPropertyTriggerType() + { + } + + /** + * Test attribute "project" + */ + public function testPropertyProject() + { + } + + /** + * Test attribute "application" + */ + public function testPropertyApplication() + { + } } diff --git a/test/Model/ProjectTest.php b/test/Model/ProjectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..70350c2c66d93dbbcfd1298aa32082323c2605fc --- /dev/null +++ b/test/Model/ProjectTest.php @@ -0,0 +1,93 @@ +<?php +/** + * ProjectTest + * + * PHP version 5 + * + * @category Class + * @package Swagger\Client + * @author Swagger 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 + * Please update the test case below to test the model. + */ + +namespace Swagger\Client; + +/** + * ProjectTest Class Doc Comment + * + * @category Class */ +// * @description Project +/** + * @package Swagger\Client + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen + */ +class ProjectTest extends \PHPUnit_Framework_TestCase +{ + + /** + * Setup before running any test case + */ + public static function setUpBeforeClass() + { + } + + /** + * Setup before running each test case + */ + public function setUp() + { + } + + /** + * Clean up after running each test case + */ + public function tearDown() + { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass() + { + } + + /** + * Test "Project" + */ + public function testProject() + { + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + } + + /** + * Test attribute "type" + */ + public function testPropertyType() + { + } +}