mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-10-31 16:53:54 +00:00 
			
		
		
		
	* feat: simple/experimental generator for flight-php server framework * fix: update php-flight samples and add php-flight to integration tests * feat: adding path to method doc
		
			
				
	
	
		
			95 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * ApiResponse
 | |
|  *
 | |
|  * PHP version 8.1.1
 | |
|  *
 | |
|  * @category Class
 | |
|  * @package  OpenAPIServer\Model
 | |
|  * @author   OpenAPI Generator team
 | |
|  * @link     https://github.com/openapitools/openapi-generator
 | |
|  */
 | |
| 
 | |
| /**
 | |
|  * OpenAPI Petstore
 | |
|  *
 | |
|  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
 | |
|  *
 | |
|  * The version of the OpenAPI document: 1.0.0
 | |
|  * 
 | |
|  * Generated by: https://github.com/openapitools/openapi-generator.git
 | |
|  *
 | |
|  */
 | |
| 
 | |
| 
 | |
| namespace OpenAPIServer\Model;
 | |
| 
 | |
| /**
 | |
|  * Class representing the ApiResponse model.
 | |
|  *
 | |
|  * Describes the result of uploading an image resource
 | |
|  *
 | |
|  * @package OpenAPIServer\Model
 | |
|  * @author  OpenAPI Generator team
 | |
|  */
 | |
| 
 | |
| class ApiResponse  implements \JsonSerializable
 | |
| {
 | |
|         /**
 | |
|      * @var int|null
 | |
|      * @SerializedName("code")
 | |
|      * @Assert\Type("int")
 | |
|      * @Type("int")
 | |
|      */
 | |
|     public ?int $code;
 | |
| 
 | |
|     /**
 | |
|      * @var string|null
 | |
|      * @SerializedName("type")
 | |
|      * @Assert\Type("string")
 | |
|      * @Type("string")
 | |
|      */
 | |
|     public ?string $type;
 | |
| 
 | |
|     /**
 | |
|      * @var string|null
 | |
|      * @SerializedName("message")
 | |
|      * @Assert\Type("string")
 | |
|      * @Type("string")
 | |
|      */
 | |
|     public ?string $message;
 | |
| 
 | |
|     /**
 | |
|      * Constructor
 | |
|      *
 | |
|      * @param int|null $code
 | |
|      * @param string|null $type
 | |
|      * @param string|null $message
 | |
|      */
 | |
|     public function __construct(?int $code, ?string $type, ?string $message)
 | |
|     {
 | |
|         $this->code = $code;
 | |
|         $this->type = $type;
 | |
|         $this->message = $message;
 | |
|     }
 | |
| 
 | |
|     public static function fromArray(array $data): self
 | |
|     {
 | |
|         return new self(
 | |
|             $data['code'] ?? null, 
 | |
|             $data['type'] ?? null, 
 | |
|             $data['message'] ?? null, 
 | |
|         );
 | |
|     }
 | |
| 
 | |
|     public function jsonSerialize(): mixed {
 | |
|         return [
 | |
|             'code' => $this->code, 
 | |
|             'type' => $this->type, 
 | |
|             'message' => $this->message, 
 | |
|         ];
 | |
|     }
 | |
| }
 | |
| 
 | |
| 
 |