libkazv
cross_signing.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"
10 
11 namespace Kazv::Api {
12 
20 public:
21 
22 
23 
24 class JobResponse : public Response
25 {
26 
27 public:
29  bool success() const;
30 
31 };
32  static constexpr auto needsAuth() {
33  return true
34  ;
35  }
36 
37 
38 // Construction/destruction
39 
61  explicit UploadCrossSigningKeysJob(std::string serverUrl
62  , std::string _accessToken
63  ,
64  std::optional<CrossSigningKey> masterKey = std::nullopt, std::optional<CrossSigningKey> selfSigningKey = std::nullopt, std::optional<CrossSigningKey> userSigningKey = std::nullopt, std::optional<AuthenticationData> auth = std::nullopt
65  );
66 
67 
69  );
70 
71  static BaseJob::Body buildBody(std::optional<CrossSigningKey> masterKey, std::optional<CrossSigningKey> selfSigningKey, std::optional<CrossSigningKey> userSigningKey, std::optional<AuthenticationData> auth);
72 
73 
74 
75 
76 
79  };
81  }
82  namespace nlohmann
83  {
84  using namespace Kazv;
85  using namespace Kazv::Api;
86 
87  }
88 
89  namespace Kazv::Api
90  {
91 
98 public:
99 
100 
101 
102 class JobResponse : public Response
103 {
104 
105 public:
107  bool success() const;
108 
109  // Result properties
110 
111 
112 
113 
117 immer::map<std::string, immer::map<std::string, JsonWrap>> failures() const;
118 
119 };
120  static constexpr auto needsAuth() {
121  return true
122  ;
123  }
124 
125 
126 // Construction/destruction
127 
133  explicit UploadCrossSigningSignaturesJob(std::string serverUrl
134  , std::string _accessToken
135  ,
136  immer::map<std::string, immer::map<std::string, JsonWrap>> signatures
137  );
138 
139 
140  static BaseJob::Query buildQuery(
141  );
142 
143  static BaseJob::Body buildBody(immer::map<std::string, immer::map<std::string, JsonWrap>> signatures);
144 
145 
146 
147 
148 
150  UploadCrossSigningSignaturesJob withData(JsonWrap j) const &;
151  };
153  }
154  namespace nlohmann
155  {
156  using namespace Kazv;
157  using namespace Kazv::Api;
158 
159  }
160 
161  namespace Kazv::Api
162  {
163 
164 } // namespace Kazv::Api
bool success() const
Definition: cross_signing.cpp:82
JobResponse(Response r)
Definition: cross_signing.cpp:79
Upload cross-signing keys.
Definition: cross_signing.hpp:19
static BaseJob::Query buildQuery()
Definition: cross_signing.cpp:13
static constexpr auto needsAuth()
Definition: cross_signing.hpp:32
UploadCrossSigningKeysJob withData(JsonWrap j) &&
Definition: cross_signing.cpp:65
static BaseJob::Body buildBody(std::optional< CrossSigningKey > masterKey, std::optional< CrossSigningKey > selfSigningKey, std::optional< CrossSigningKey > userSigningKey, std::optional< AuthenticationData > auth)
Definition: cross_signing.cpp:21
UploadCrossSigningKeysJob(std::string serverUrl, std::string _accessToken, std::optional< CrossSigningKey > masterKey=std::nullopt, std::optional< CrossSigningKey > selfSigningKey=std::nullopt, std::optional< CrossSigningKey > userSigningKey=std::nullopt, std::optional< AuthenticationData > auth=std::nullopt)
Upload cross-signing keys.
Definition: cross_signing.cpp:45
Upload cross-signing signatures.
Definition: cross_signing.hpp:97
static constexpr auto needsAuth()
Definition: cross_signing.hpp:120
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