libkazv
room_send.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3  */
4 
5 #pragma once
6 
7 #include "basejob.hpp"
8 
9 
10 namespace Kazv::Api {
11 
22 class SendMessageJob : public BaseJob {
23 public:
24 
25 
26 
27 class JobResponse : public Response
28 {
29 
30 public:
32  bool success() const;
33 
34  // Result properties
35 
36 
37 
38 
40 std::string eventId() const;
41 
42 };
43  static constexpr auto needsAuth() {
44  return true
45  ;
46  }
47 
48 
49 // Construction/destruction
50 
73  explicit SendMessageJob(std::string serverUrl
74  , std::string _accessToken
75  ,
76  std::string roomId , std::string eventType , std::string txnId , JsonWrap body = {}
77  );
78 
79 
81  );
82 
83  static BaseJob::Body buildBody(std::string roomId, std::string eventType, std::string txnId, JsonWrap body);
84 
85 
86 
87 
88 
90  SendMessageJob withData(JsonWrap j) const &;
91  };
93  }
94  namespace nlohmann
95  {
96  using namespace Kazv;
97  using namespace Kazv::Api;
98 
99  }
100 
101  namespace Kazv::Api
102  {
103 
104 } // namespace Kazv::Api
Definition: room_send.hpp:28
std::string eventId() const
A unique identifier for the event.
Definition: room_send.cpp:82
bool success() const
Definition: room_send.cpp:71
JobResponse(Response r)
Definition: room_send.cpp:68
Send a message event to the given room.
Definition: room_send.hpp:22
SendMessageJob withData(JsonWrap j) &&
Definition: room_send.cpp:54
SendMessageJob(std::string serverUrl, std::string _accessToken, std::string roomId, std::string eventType, std::string txnId, JsonWrap body={})
Send a message event to the given room.
Definition: room_send.cpp:34
static constexpr auto needsAuth()
Definition: room_send.hpp:43
static BaseJob::Query buildQuery()
Definition: room_send.cpp:13
static BaseJob::Body buildBody(std::string roomId, std::string eventType, std::string txnId, JsonWrap body)
Definition: room_send.cpp:21
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
Definition: jsonwrap.hpp:23
Definition: location.hpp:10
Definition: location.hpp:10
Definition: location.hpp:27
Definition: basejob.hpp:50