1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures\Doctrine\IdentityFields;
6
7use Doctrine\ORM\Mapping as ORM;
8use JMS\Serializer\Annotation as Serializer;
9
10/** @ORM\Entity */
11class Server
12{
13    /**
14     * @Serializer\Type("string")
15     * @ORM\Id
16     * @ORM\Column(type="string", name="ip_address")
17     *
18     * @var string
19     */
20    protected $ipAddress;
21
22    /**
23     * @Serializer\SerializedName("server_id_extracted")
24     * @Serializer\Type("string")
25     * @ORM\Id
26     * @ORM\Column(type="string", name="server_id")
27     *
28     * @var string
29     */
30    protected $serverId;
31
32    /**
33     * @Serializer\Type("string")
34     * @ORM\Column(type="string")
35     *
36     * @var string
37     */
38    private $name;
39
40    /**
41     * @param string $name
42     * @param string $ipAddress
43     * @param string $serverId
44     */
45    public function __construct($name, $ipAddress, $serverId)
46    {
47        $this->name = $name;
48        $this->ipAddress = $ipAddress;
49        $this->serverId = $serverId;
50    }
51
52    /**
53     * @return string
54     */
55    public function getName()
56    {
57        return $this->name;
58    }
59
60    /**
61     * @return string
62     */
63    public function getIpAddress()
64    {
65        return $this->ipAddress;
66    }
67
68    /**
69     * @return string
70     */
71    public function getServerId()
72    {
73        return $this->serverId;
74    }
75}
76