Completed
Push — master ( ebe08d...a01a5e )
by Gusev
15:45
created

InlineQuery::getId()   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;
4
5
use TelegramBot\Api\BaseType;
6
7
/**
8
 * Class InlineQuery
9
 * This object represents an incoming inline query.
10
 * When the user sends an empty query, your bot could return some default or trending results.
11
 *
12
 * @package TelegramBot\Api\Types
13
 */
14
class InlineQuery extends BaseType
15
{
16
    /**
17
     * {@inheritdoc}
18
     *
19
     * @var array
20
     */
21
    static protected $requiredParams = ['id', 'from', 'query', 'offset'];
22
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    static protected $map = [
29
        'id' => true,
30
        'from' => User::class,
31
        'query' => true,
32
        'offset' => true,
33
    ];
34
35
    /**
36
     * Unique identifier for this query
37
     *
38
     * @var string
39
     */
40
    protected $id;
41
42
    /**
43
     * Sender
44
     *
45
     * @var User
46
     */
47
    protected $from;
48
49
    /**
50
     * Text of the query
51
     *
52
     * @var string
53
     */
54
    protected $query;
55
56
    /**
57
     * Offset of the results to be returned, can be controlled by the bot
58
     *
59
     * @var string
60
     */
61
    protected $offset;
62
63
    /**
64
     * @return string
65
     */
66
    public function getId()
67
    {
68
        return $this->id;
69
    }
70
71
    /**
72
     * @param string $id
73
     */
74
    public function setId($id)
75
    {
76
        $this->id = $id;
77
    }
78
79
    /**
80
     * @return User
81
     */
82
    public function getFrom()
83
    {
84
        return $this->from;
85
    }
86
87
    /**
88
     * @param User $from
89
     */
90
    public function setFrom($from)
91
    {
92
        $this->from = $from;
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function getQuery()
99
    {
100
        return $this->query;
101
    }
102
103
    /**
104
     * @param string $query
105
     */
106
    public function setQuery($query)
107
    {
108
        $this->query = $query;
109
    }
110
111
    /**
112
     * @return string
113
     */
114
    public function getOffset()
115
    {
116
        return $this->offset;
117
    }
118
119
    /**
120
     * @param string $offset
121
     */
122
    public function setOffset($offset)
123
    {
124
        $this->offset = $offset;
125
    }
126
}
127