libkazv
knocking.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 
30 class KnockRoomJob : public BaseJob {
31 public:
32 
33 
34 
35 class JobResponse : public Response
36 {
37 
38 public:
40  bool success() const;
41 
42  // Result properties
43 
44 
45 
46 
48 std::string roomId() const;
49 
50 };
51  static constexpr auto needsAuth() {
52  return true
53  ;
54  }
55 
56 
57 // Construction/destruction
58 
72  explicit KnockRoomJob(std::string serverUrl
73  , std::string _accessToken
74  ,
75  std::string roomIdOrAlias , immer::array<std::string> serverName = {}, std::optional<std::string> reason = std::nullopt
76  );
77 
78 
80  immer::array<std::string> serverName);
81 
82  static BaseJob::Body buildBody(std::string roomIdOrAlias, immer::array<std::string> serverName, std::optional<std::string> reason);
83 
84 
85 
86 
87 
89  KnockRoomJob withData(JsonWrap j) const &;
90  };
92  }
93  namespace nlohmann
94  {
95  using namespace Kazv;
96  using namespace Kazv::Api;
97 
98  }
99 
100  namespace Kazv::Api
101  {
102 
103 } // namespace Kazv::Api
Definition: knocking.hpp:36
bool success() const
Definition: knocking.cpp:77
std::string roomId() const
The knocked room ID.
Definition: knocking.cpp:88
JobResponse(Response r)
Definition: knocking.cpp:74
Knock on a room, requesting permission to join.
Definition: knocking.hpp:30
static constexpr auto needsAuth()
Definition: knocking.hpp:51
KnockRoomJob(std::string serverUrl, std::string _accessToken, std::string roomIdOrAlias, immer::array< std::string > serverName={}, std::optional< std::string > reason=std::nullopt)
Knock on a room, requesting permission to join.
Definition: knocking.cpp:40
static BaseJob::Query buildQuery(immer::array< std::string > serverName)
Definition: knocking.cpp:13
static BaseJob::Body buildBody(std::string roomIdOrAlias, immer::array< std::string > serverName, std::optional< std::string > reason)
Definition: knocking.cpp:22
KnockRoomJob withData(JsonWrap j) &&
Definition: knocking.cpp:60
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