libkazv
banning.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 
20 class BanJob : public BaseJob {
21 public:
22 
23 
24 
25 class JobResponse : public Response
26 {
27 
28 public:
30  bool success() const;
31 
32 };
33  static constexpr auto needsAuth() {
34  return true
35  ;
36  }
37 
38 
39 // Construction/destruction
40 
52  explicit BanJob(std::string serverUrl
53  , std::string _accessToken
54  ,
55  std::string roomId , std::string userId , std::optional<std::string> reason = std::nullopt
56  );
57 
58 
60  );
61 
62  static BaseJob::Body buildBody(std::string roomId, std::string userId, std::optional<std::string> reason);
63 
64 
65 
66 
67 
68  BanJob withData(JsonWrap j) &&;
69  BanJob withData(JsonWrap j) const &;
70  };
72  }
73  namespace nlohmann
74  {
75  using namespace Kazv;
76  using namespace Kazv::Api;
77 
78  }
79 
80  namespace Kazv::Api
81  {
82 
90 class UnbanJob : public BaseJob {
91 public:
92 
93 
94 
95 class JobResponse : public Response
96 {
97 
98 public:
100  bool success() const;
101 
102 };
103  static constexpr auto needsAuth() {
104  return true
105  ;
106  }
107 
108 
109 // Construction/destruction
110 
123  explicit UnbanJob(std::string serverUrl
124  , std::string _accessToken
125  ,
126  std::string roomId , std::string userId , std::optional<std::string> reason = std::nullopt
127  );
128 
129 
130  static BaseJob::Query buildQuery(
131  );
132 
133  static BaseJob::Body buildBody(std::string roomId, std::string userId, std::optional<std::string> reason);
134 
135 
136 
137 
138 
139  UnbanJob withData(JsonWrap j) &&;
140  UnbanJob withData(JsonWrap j) const &;
141  };
143  }
144  namespace nlohmann
145  {
146  using namespace Kazv;
147  using namespace Kazv::Api;
148 
149  }
150 
151  namespace Kazv::Api
152  {
153 
154 } // namespace Kazv::Api
Definition: banning.hpp:26
bool success() const
Definition: banning.cpp:78
JobResponse(Response r)
Definition: banning.cpp:75
Ban a user in the room.
Definition: banning.hpp:20
BanJob withData(JsonWrap j) &&
Definition: banning.cpp:61
static constexpr auto needsAuth()
Definition: banning.hpp:33
static BaseJob::Query buildQuery()
Definition: banning.cpp:13
BanJob(std::string serverUrl, std::string _accessToken, std::string roomId, std::string userId, std::optional< std::string > reason=std::nullopt)
Ban a user in the room.
Definition: banning.cpp:41
static BaseJob::Body buildBody(std::string roomId, std::string userId, std::optional< std::string > reason)
Definition: banning.cpp:21
Definition: banning.hpp:96
Unban a user from the room.
Definition: banning.hpp:90
static constexpr auto needsAuth()
Definition: banning.hpp:103
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