forked from loafle/openapi-generator-original
350 lines
6.4 KiB
PHP
350 lines
6.4 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\Accessor;
|
|
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")
|
|
* @Type("int")
|
|
*/
|
|
#[Assert\Type("int")]
|
|
protected ?int $id = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("username")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $username = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("firstName")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $firstName = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("lastName")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $lastName = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("email")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $email = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("password")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $password = null;
|
|
|
|
/**
|
|
* @var string|null
|
|
* @SerializedName("phone")
|
|
* @Type("string")
|
|
*/
|
|
#[Assert\Type("string")]
|
|
protected ?string $phone = null;
|
|
|
|
/**
|
|
* User Status
|
|
*
|
|
* @var int|null
|
|
* @SerializedName("userStatus")
|
|
* @Type("int")
|
|
*/
|
|
#[Assert\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)
|
|
{
|
|
if (is_array($data)) {
|
|
$this->id = array_key_exists('id', $data) ? $data['id'] : $this->id;
|
|
$this->username = array_key_exists('username', $data) ? $data['username'] : $this->username;
|
|
$this->firstName = array_key_exists('firstName', $data) ? $data['firstName'] : $this->firstName;
|
|
$this->lastName = array_key_exists('lastName', $data) ? $data['lastName'] : $this->lastName;
|
|
$this->email = array_key_exists('email', $data) ? $data['email'] : $this->email;
|
|
$this->password = array_key_exists('password', $data) ? $data['password'] : $this->password;
|
|
$this->phone = array_key_exists('phone', $data) ? $data['phone'] : $this->phone;
|
|
$this->userStatus = array_key_exists('userStatus', $data) ? $data['userStatus'] : $this->userStatus;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|