libkazv
redaction.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 
26 class RedactEventJob : public BaseJob {
27 public:
28 
29 
30 
31 class JobResponse : public Response
32 {
33 
34 public:
36  bool success() const;
37 
38  // Result properties
39 
40 
41 
42 
44 std::optional<std::string> eventId() const;
45 
46 };
47  static constexpr auto needsAuth() {
48  return true
49  ;
50  }
51 
52 
53 // Construction/destruction
54 
70  explicit RedactEventJob(std::string serverUrl
71  , std::string _accessToken
72  ,
73  std::string roomId , std::string eventId , std::string txnId , std::optional<std::string> reason = std::nullopt
74  );
75 
76 
78  );
79 
80  static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::string txnId, std::optional<std::string> reason);
81 
82 
83 
84 
85 
87  RedactEventJob withData(JsonWrap j) const &;
88  };
90  }
91  namespace nlohmann
92  {
93  using namespace Kazv;
94  using namespace Kazv::Api;
95 
96  }
97 
98  namespace Kazv::Api
99  {
100 
101 } // namespace Kazv::Api
Definition: redaction.hpp:32
std::optional< std::string > eventId() const
A unique identifier for the event.
Definition: redaction.cpp:86
bool success() const
Definition: redaction.cpp:76
JobResponse(Response r)
Definition: redaction.cpp:73
Strips all non-integrity-critical information out of an event.
Definition: redaction.hpp:26
RedactEventJob(std::string serverUrl, std::string _accessToken, std::string roomId, std::string eventId, std::string txnId, std::optional< std::string > reason=std::nullopt)
Strips all non-integrity-critical information out of an event.
Definition: redaction.cpp:39
static BaseJob::Query buildQuery()
Definition: redaction.cpp:13
RedactEventJob withData(JsonWrap j) &&
Definition: redaction.cpp:59
static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::string txnId, std::optional< std::string > reason)
Definition: redaction.cpp:21
static constexpr auto needsAuth()
Definition: redaction.hpp:47
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