yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
Chat.cc
Go to the documentation of this file.
1 #include <string>
2 #include <optional>
3 #include "types/Chat.h"
4 
5 
6 using namespace yatbcpp;
7 using namespace std;
8 
10 // Constructor Section //
12 
13 Chat::Chat(int64_t id, chat_type type):
14  id(id), type (type)
15 {
16 
17 }
18 
19 Chat::Chat(const Chat& chat):
20  id(chat.getId()), type (chat.getType())
21 {
22  title = chat.title;
23  username = chat.username;
24  first_name = chat.first_name;
25  last_name = chat.last_name;
27  description = chat.description;
28  invite_link = chat.invite_link;
29 }
30 
31 
33 // Setter Section //
35 
36 void Chat::setTitle(const optional<string> &title) {
38 }
39 
40 void Chat::setUsername(const optional<string> &username) {
42 }
43 
44 void Chat::setFirst_name(const optional<string> &first_name) {
46 }
47 
48 void Chat::setLast_name(const optional<string> &last_name) {
50 }
51 
54 }
55 
56 void Chat::setDescription(const optional<string> &description) {
58 }
59 
60 void Chat::setInvite_link(const optional<string> &invite_link) {
62 }
63 
65 // Getter Section //
67 
68 int64_t Chat::getId() const {
69  return id;
70 }
71 
73  return type;
74 }
75 
76 const optional<string> &Chat::getTitle() const {
77  return title;
78 }
79 
80 const optional<string> &Chat::getUsername() const {
81  return username;
82 }
83 
84 const optional<string> &Chat::getFirst_name() const {
85  return first_name;
86 }
87 
88 const optional<string> &Chat::getLast_name() const {
89  return last_name;
90 }
91 
92 const optional<bool> &Chat::getAll_members_are_administrators() const {
94 }
95 
96 const optional<string> &Chat::getDescription() const {
97  return description;
98 }
99 
100 const optional<string> &Chat::getInvite_link() const {
101  return invite_link;
102 }
const std::optional< std::string > & getTitle() const
Definition: Chat.cc:76
std::optional< std::string > title
Definition: Chat.h:52
std::int64_t getId() const
Definition: Chat.cc:68
std::optional< bool > all_members_are_administrators
Definition: Chat.h:56
void setDescription(const std::optional< std::string > &description)
Definition: Chat.cc:56
std::optional< std::string > last_name
Definition: Chat.h:55
void setUsername(const std::optional< std::string > &username)
Definition: Chat.cc:40
const std::optional< std::string > & getDescription() const
Definition: Chat.cc:96
chat_type
Definition: chat_type.h:6
chat_type getType() const
Definition: Chat.cc:72
std::int64_t id
Definition: Chat.h:50
void setFirst_name(const std::optional< std::string > &first_name)
Definition: Chat.cc:44
void setAll_members_are_administrators(const std::optional< bool > &all_members_are_administrators)
Definition: Chat.cc:52
const std::optional< std::string > & getFirst_name() const
Definition: Chat.cc:84
Definition: Bot.h:27
void setInvite_link(const std::optional< std::string > &invite_link)
Definition: Chat.cc:60
Chat(std::int64_t id, chat_type type)
std::optional< std::string > description
Definition: Chat.h:60
const std::optional< std::string > & getUsername() const
Definition: Chat.cc:80
std::optional< std::string > username
Definition: Chat.h:53
std::optional< std::string > first_name
Definition: Chat.h:54
const std::optional< bool > & getAll_members_are_administrators() const
Definition: Chat.cc:92
void setLast_name(const std::optional< std::string > &last_name)
Definition: Chat.cc:48
chat_type type
Definition: Chat.h:51
void setTitle(const std::optional< std::string > &title)
Definition: Chat.cc:36
const std::optional< std::string > & getLast_name() const
Definition: Chat.cc:88
std::optional< std::string > invite_link
Definition: Chat.h:61
const std::optional< std::string > & getInvite_link() const
Definition: Chat.cc:100