yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
answerInlineQuery.h
Go to the documentation of this file.
1 #ifndef YATBCPP_ANSWERINLINEQUERY_H
2 #define YATBCPP_ANSWERINLINEQUERY_H
3 
4 #include <string>
5 #include <optional>
6 #include <memory>
8 #include "../types/InlineQueryResult.h"
9 
10 
11 namespace yatbcpp{
13  public:
14  answerInlineQuery(std::string inline_query_id,std::vector<std::shared_ptr<InlineQueryResult>> results);
15  answerInlineQuery(std::string inline_query_id);
16  Json::Value toJson();
17 
18  void addInlineQueryResult(std::shared_ptr<InlineQueryResult> IQR);
19 
20  void setCache_time(const std::optional<std::int32_t> &cache_time);
21 
22  void setIs_personal(const std::optional<bool> &is_personal);
23 
24  void setNext_offset(const std::optional<std::string> &next_offset);
25 
26  void setSwitch_pm_text(const std::optional<std::string> &switch_pm_text);
27 
28  void setSwitch_pm_parameter(const std::optional<std::string> &switch_pm_parameter);
29 
30  const std::string &getInline_query_id() const;
31 
32  const std::optional<int> &getCache_time() const;
33 
34  const std::optional<bool> &getIs_personal() const;
35 
36  const std::optional<std::string> &getNext_offset() const;
37 
38  const std::optional<std::string> &getSwitch_pm_text() const;
39 
40  const std::optional<std::string> &getSwitch_pm_parameter() const;
41 
42  private:
43  std::string inline_query_id;
44  std::vector<std::shared_ptr<InlineQueryResult>> results;
45  std::optional<std::int32_t> cache_time;
46  std::optional<bool> is_personal;
47  std::optional<std::string> next_offset;
48  std::optional<std::string> switch_pm_text;
49  std::optional<std::string> switch_pm_parameter;
50  };
51 }
52 
53 
54 
55 #endif //YATBCPP_ANSWERINLINEQUERY_H
std::optional< bool > is_personal
const std::optional< std::string > & getNext_offset() const
void setIs_personal(const std::optional< bool > &is_personal)
const std::optional< int > & getCache_time() const
std::optional< std::string > switch_pm_text
Definition: Bot.h:27
answerInlineQuery(std::string inline_query_id, std::vector< std::shared_ptr< InlineQueryResult >> results)
const std::string & getInline_query_id() const
const std::optional< std::string > & getSwitch_pm_text() const
std::optional< std::int32_t > cache_time
std::optional< std::string > next_offset
void setNext_offset(const std::optional< std::string > &next_offset)
const std::optional< std::string > & getSwitch_pm_parameter() const
std::vector< std::shared_ptr< InlineQueryResult > > results
void setSwitch_pm_text(const std::optional< std::string > &switch_pm_text)
const std::optional< bool > & getIs_personal() const
void addInlineQueryResult(std::shared_ptr< InlineQueryResult > IQR)
std::optional< std::string > switch_pm_parameter
void setSwitch_pm_parameter(const std::optional< std::string > &switch_pm_parameter)
void setCache_time(const std::optional< std::int32_t > &cache_time)