Completed
Push — master ( 831cd8...4849d0 )
by
unknown
45:37 queued 20:41
created

Attachment::deserializeFromJson()   B

Complexity

Conditions 6
Paths 32

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 8.9457
c 0
b 0
f 0
cc 6
nc 32
nop 3
1
<?php
2
3
namespace MovingImage\Client\VMPro\Entity;
4
5
use JMS\Serializer\Annotation\Type;
6
use JMS\Serializer\Annotation\HandlerCallback;
7
use JMS\Serializer\JsonDeserializationVisitor;
8
use JMS\Serializer\DeserializationContext;
9
use MovingImage\Meta\Interfaces\AttachmentInterface;
10
11
/**
12
 * Class Attachment.
13
 */
14
class Attachment implements AttachmentInterface
15
{
16
    /**
17
     * @Type("string")
18
     */
19
    private $id;
20
21
    /**
22
     * @Type("string")
23
     */
24
    private $fileName;
25
26
    /**
27
     * @Type("string")
28
     */
29
    private $downloadUrl;
30
31
    /**
32
     * @Type("int")
33
     */
34
    private $fileSize;
35
36
    /**
37
     * @Type("string")
38
     */
39
    private $type;
40
41
    /**
42
     * @return string
43
     */
44
    public function getId()
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @param $id
51
     *
52
     * @return Attachment
53
     */
54
    public function setId($id)
55
    {
56
        $this->id = $id;
57
58
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getFileName()
65
    {
66
        return $this->fileName;
67
    }
68
69
    /**
70
     * @param $fileName
71
     *
72
     * @return Attachment
73
     */
74
    public function setFileName($fileName)
75
    {
76
        $this->fileName = $fileName;
77
78
        return $this;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getDownloadUrl()
85
    {
86
        return $this->downloadUrl;
87
    }
88
89
    /**
90
     * @param $downloadUrl
91
     *
92
     * @return Attachment
93
     */
94
    public function setDownloadUrl($downloadUrl)
95
    {
96
        $this->downloadUrl = $downloadUrl;
97
98
        return $this;
99
    }
100
101
    /**
102
     * @return int
103
     */
104
    public function getFileSize()
105
    {
106
        return $this->fileSize;
107
    }
108
109
    /**
110
     * @param $fileSize
111
     *
112
     * @return Attachment
113
     */
114
    public function setFileSize($fileSize)
115
    {
116
        $this->fileSize = $fileSize;
117
118
        return $this;
119
    }
120
121
    /**
122
     * @return string
123
     */
124
    public function getType()
125
    {
126
        return $this->type;
127
    }
128
129
    /**
130
     * @param $type
131
     *
132
     * @return Attachment
133
     */
134
    public function setType($type)
135
    {
136
        $this->type = $type;
137
138
        return $this;
139
    }
140
}
141