yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
User.cc
Go to the documentation of this file.
1 #include <optional>
2 #include "types/User.h"
3 using namespace yatbcpp;
4 using namespace std;
5 
7 // Constructor Section //
9 
10 User::User(int32_t id, bool is_bot, string first_name):
11  id(id), is_bot(is_bot), first_name(first_name)
12 {
13 
14 }
15 
16 User::User(const User& user):
17  id(user.id), is_bot(user.is_bot), first_name(user.first_name)
18 {
19  last_name = user.last_name;
20  username = user.username;
22 }
23 
24 
26 // Setter Section //
28 
29 void User::setLast_name(const optional<string> &last_name) {
31 }
32 
33 void User::setUsername(const optional<string> &username) {
35 }
36 
37 void User::setLanguage_code(const optional<string> &language_code) {
39 }
40 
42 // Getter Section //
44 
45 int32_t User::getId() const {
46  return id;
47 }
48 
49 bool User::IsBot() const{
50  return is_bot;
51 }
52 
53 const string &User::getFirst_name() const {
54  return first_name;
55 }
56 
57 const optional<string> &User::getLast_name() const {
58  return last_name;
59 }
60 
61 const optional<string> &User::getUsername() const {
62  return username;
63 }
64 
65 const optional<string> &User::getLanguage_code() const {
66  return language_code;
67 }
68 
69 
70 
std::int32_t getId() const
Definition: User.cc:45
const std::string & getFirst_name() const
Definition: User.cc:53
void setLanguage_code(const std::optional< std::string > &language_code)
Definition: User.cc:37
bool IsBot() const
Definition: User.cc:49
std::optional< std::string > last_name
Definition: User.h:45
std::int32_t id
Definition: User.h:42
Definition: Bot.h:27
std::string first_name
Definition: User.h:44
std::optional< std::string > language_code
Definition: User.h:47
const std::optional< std::string > & getUsername() const
Definition: User.cc:61
User(std::int32_t id, bool is_bot, std::string first_name)
const std::optional< std::string > & getLanguage_code() const
Definition: User.cc:65
std::optional< std::string > username
Definition: User.h:46
void setUsername(const std::optional< std::string > &username)
Definition: User.cc:33
void setLast_name(const std::optional< std::string > &last_name)
Definition: User.cc:29
const std::optional< std::string > & getLast_name() const
Definition: User.cc:57
bool is_bot
Definition: User.h:43