yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
Update.h
Go to the documentation of this file.
1 //
2 // Created by norbert on 18.08.17.
3 //
4 
5 #ifndef YATBCPP_UPDATE_H
6 #define YATBCPP_UPDATE_H
7 
8 #include <string>
9 #include <optional>
10 #include "Message.h"
11 #include "InlineQuery.h"
12 
13 namespace yatbcpp{
15  class Update {
16  public:
17  Update(std::int32_t update_id);
18 
19  Update(const Update& Update);
20 
21  void setMessage(const std::optional<Message> &message);
22 
23  void setEdited_message(const std::optional<Message> &edited_message);
24 
25  void setChannel_post(const std::optional<Message> &channel_post);
26 
27  void setEdited_channel_post(const std::optional<Message> &edited_channel_post);
28 
29  std::int32_t getUpdate_id() const;
30 
31  const std::optional<Message> &getMessage() const;
32 
33  const std::optional<Message> &getEdited_message() const;
34 
35  const std::optional<Message> &getChannel_post() const;
36 
37  const std::optional<Message> &getEdited_channel_post() const;
38 
39  const std::optional<InlineQuery> &getInlineQuery() const;
40 
41  void setInlineQuery(const std::optional<InlineQuery> &inlineQuery);
42 
43 
44  private:
45  std::int32_t update_id;
46  std::optional<Message> message;
47  std::optional<Message> edited_message;
48  std::optional<Message> channel_post;
49  std::optional<Message> edited_channel_post;
50  std::optional<InlineQuery> inlineQuery;
51 // std::optional<ChoosenInlineResult> chosen_inline_result;
52 
53 // CallbackQuery callback_query;//optional
54 // ShippingQuery shipping_query;//optional
55 // PreCheckoutQuery pre_checkout_query;//optional
56 
57  };
58 
59 }
60 
61 
62 
63 #endif //YATBCPP_UPDATE_H
std::optional< Message > edited_message
Definition: Update.h:47
std::int32_t getUpdate_id() const
Definition: Update.cc:56
const std::optional< Message > & getEdited_message() const
Definition: Update.cc:64
Update(std::int32_t update_id)
void setMessage(const std::optional< Message > &message)
Definition: Update.cc:32
void setEdited_message(const std::optional< Message > &edited_message)
Definition: Update.cc:36
std::int32_t update_id
Definition: Update.h:45
Definition: Bot.h:27
std::optional< Message > channel_post
Definition: Update.h:48
void setEdited_channel_post(const std::optional< Message > &edited_channel_post)
Definition: Update.cc:44
const std::optional< Message > & getMessage() const
Definition: Update.cc:60
const std::optional< InlineQuery > & getInlineQuery() const
Definition: Update.cc:76
const std::optional< Message > & getChannel_post() const
Definition: Update.cc:68
void setChannel_post(const std::optional< Message > &channel_post)
Definition: Update.cc:40
std::optional< Message > message
Definition: Update.h:46
const std::optional< Message > & getEdited_channel_post() const
Definition: Update.cc:72
std::optional< Message > edited_channel_post
Definition: Update.h:49
void setInlineQuery(const std::optional< InlineQuery > &inlineQuery)
Definition: Update.cc:48
std::optional< InlineQuery > inlineQuery
Definition: Update.h:50