forked from loafle/openapi-generator-original
* Enhance Symfony generator - Add missing typehints - Add missing use statements - Simplify model ctor - Change fallthrough Exception to Throwable - prevent storing result of void methods - fix validate method - add default null values to model properties - simplify API interface return values - fix/rework default value implementation - fix optional params deprecation warnings - .. For more details check out the PR: https://github.com/OpenAPITools/openapi-generator/pull/12532 * Enhance Symfony generator Tests - Skip risky tests - Fix type hint error - Fix class exists tests - Fix broken doc block - Enhance annotations - Update phpunit.xml.dist - Fix test config resource location
322 lines
6.0 KiB
PHP
322 lines
6.0 KiB
PHP
<?php
|
|
/**
|
|
* User
|
|
*
|
|
* PHP version 8.1.1
|
|
*
|
|
* @category Class
|
|
* @package OpenAPI\Server\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
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* NOTE: This class is auto generated by the openapi generator program.
|
|
* https://github.com/openapitools/openapi-generator
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
namespace OpenAPI\Server\Model;
|
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
use JMS\Serializer\Annotation\Type;
|
|
use JMS\Serializer\Annotation\SerializedName;
|
|
|
|
/**
|
|
* Class representing the User model.
|
|
*
|
|
* A User who is purchasing from the pet store
|
|
*
|
|
* @package OpenAPI\Server\Model
|
|
* @author OpenAPI Generator team
|
|
*/
|
|
class User
|
|
{
|
|
/**
|
|
* @var int|null
|
|
* @SerializedName("id")
|
|
* @Assert\Type("int")
|
|
* @Type("int")
|
|
*/
|
|
protected ?int $id = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("username")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $username = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("firstName")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $firstName = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("lastName")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $lastName = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("email")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $email = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("password")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $password = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("phone")
|
|
* @Assert\Type("string")
|
|
* @Type("string")
|
|
*/
|
|
protected ?string $phone = null;
|
|
|
|
/**
|
|
* User Status
|
|
*
|
|
* @var int|null
|
|
* @SerializedName("userStatus")
|
|
* @Assert\Type("int")
|
|
* @Type("int")
|
|
*/
|
|
protected ?int $userStatus = null;
|
|
|
|
/**
|
|
* Constructor
|
|
* @param array|null $data Associated array of property values initializing the model
|
|
*/
|
|
public function __construct(array $data = null)
|
|
{
|
|
$this->id = $data['id'] ?? null;
|
|
$this->username = $data['username'] ?? null;
|
|
$this->firstName = $data['firstName'] ?? null;
|
|
$this->lastName = $data['lastName'] ?? null;
|
|
$this->email = $data['email'] ?? null;
|
|
$this->password = $data['password'] ?? null;
|
|
$this->phone = $data['phone'] ?? null;
|
|
$this->userStatus = $data['userStatus'] ?? null;
|
|
}
|
|
|
|
/**
|
|
* Gets id.
|
|
*
|
|
* @return int|null
|
|
*/
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Sets id.
|
|
*
|
|
* @param int|null $id
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setId(?int $id = null): self
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets username.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getUsername(): ?string
|
|
{
|
|
return $this->username;
|
|
}
|
|
|
|
/**
|
|
* Sets username.
|
|
*
|
|
* @param string|null $username
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setUsername(?string $username = null): self
|
|
{
|
|
$this->username = $username;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets firstName.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getFirstName(): ?string
|
|
{
|
|
return $this->firstName;
|
|
}
|
|
|
|
/**
|
|
* Sets firstName.
|
|
*
|
|
* @param string|null $firstName
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setFirstName(?string $firstName = null): self
|
|
{
|
|
$this->firstName = $firstName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets lastName.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getLastName(): ?string
|
|
{
|
|
return $this->lastName;
|
|
}
|
|
|
|
/**
|
|
* Sets lastName.
|
|
*
|
|
* @param string|null $lastName
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setLastName(?string $lastName = null): self
|
|
{
|
|
$this->lastName = $lastName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets email.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getEmail(): ?string
|
|
{
|
|
return $this->email;
|
|
}
|
|
|
|
/**
|
|
* Sets email.
|
|
*
|
|
* @param string|null $email
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setEmail(?string $email = null): self
|
|
{
|
|
$this->email = $email;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets password.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getPassword(): ?string
|
|
{
|
|
return $this->password;
|
|
}
|
|
|
|
/**
|
|
* Sets password.
|
|
*
|
|
* @param string|null $password
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setPassword(?string $password = null): self
|
|
{
|
|
$this->password = $password;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets phone.
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getPhone(): ?string
|
|
{
|
|
return $this->phone;
|
|
}
|
|
|
|
/**
|
|
* Sets phone.
|
|
*
|
|
* @param string|null $phone
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setPhone(?string $phone = null): self
|
|
{
|
|
$this->phone = $phone;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets userStatus.
|
|
*
|
|
* @return int|null
|
|
*/
|
|
public function getUserStatus(): ?int
|
|
{
|
|
return $this->userStatus;
|
|
}
|
|
|
|
/**
|
|
* Sets userStatus.
|
|
*
|
|
* @param int|null $userStatus User Status
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setUserStatus(?int $userStatus = null): self
|
|
{
|
|
$this->userStatus = $userStatus;
|
|
|
|
return $this;
|
|
}
|
|
}
|
|
|
|
|