Completed
Push — master ( 262368...c98826 )
by Gusev
08:20
created

ChosenInlineResult::getFrom()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace TelegramBot\Api\Types\Inline;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\Types\User;
7
8
/**
9
 * Class ChosenInlineResult
10
 * This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
11
 *
12
 * @package TelegramBot\Api\Types
13
 */
14
class ChosenInlineResult extends BaseType
15
{
16
    /**
17
     * {@inheritdoc}
18
     *
19
     * @var array
20
     */
21
    static protected $requiredParams = ['result_id', 'from', 'query'];
22
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    static protected $map = [
29
        'result_id' => true,
30
        'from' => User::class,
31
        'query' => true,
32
    ];
33
34
    /**
35
     * The unique identifier for the result that was chosen.
36
     *
37
     * @var string
38
     */
39
    protected $resultId;
40
41
    /**
42
     * The user that chose the result.
43
     *
44
     * @var User
45
     */
46
    protected $from;
47
48
    /**
49
     * The query that was used to obtain the result.
50
     *
51
     * @var string
52
     */
53
    protected $query;
54
55
    /**
56
     * @return string
57
     */
58
    public function getResultId()
59
    {
60
        return $this->resultId;
61
    }
62
63
    /**
64
     * @param string $resultId
65
     */
66
    public function setResultId($resultId)
67
    {
68
        $this->resultId = $resultId;
69
    }
70
71
    /**
72
     * @return User
73
     */
74
    public function getFrom()
75
    {
76
        return $this->from;
77
    }
78
79
    /**
80
     * @param User $from
81
     */
82
    public function setFrom(User $from)
83
    {
84
        $this->from = $from;
85
    }
86
87
    /**
88
     * @return string
89
     */
90
    public function getQuery()
91
    {
92
        return $this->query;
93
    }
94
95
    /**
96
     * @param string $query
97
     */
98
    public function setQuery($query)
99
    {
100
        $this->query = $query;
101
    }
102
}
103