libkazv
whoami.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 
23 class GetTokenOwnerJob : public BaseJob {
24 public:
25 
26 
27 
28 class JobResponse : public Response
29 {
30 
31 public:
33  bool success() const;
34 
35  // Result properties
36 
37 
38 
39 
41 std::string userId() const;
42 
43 
48 std::optional<std::string> deviceId() const;
49 
50 
54 std::optional<bool> isGuest() const;
55 
56 };
57  static constexpr auto needsAuth() {
58  return true
59  ;
60  }
61 
62 
63 // Construction/destruction
64 
66  explicit GetTokenOwnerJob(std::string serverUrl
67  , std::string _accessToken
68 
69 
70  );
71 
72 
74  );
75 
76  static BaseJob::Body buildBody();
77 
78 
79 
80 
81 
84  };
86  }
87  namespace nlohmann
88  {
89  using namespace Kazv;
90  using namespace Kazv::Api;
91 
92  }
93 
94  namespace Kazv::Api
95  {
96 
97 } // namespace Kazv::Api
std::string userId() const
The user ID that owns the access token.
Definition: whoami.cpp:81
std::optional< std::string > deviceId() const
Device ID associated with the access token.
Definition: whoami.cpp:92
bool success() const
Definition: whoami.cpp:70
JobResponse(Response r)
Definition: whoami.cpp:67
std::optional< bool > isGuest() const
When true, the user is a Guest User.
Definition: whoami.cpp:103
Gets information about the owner of an access token.
Definition: whoami.hpp:23
static BaseJob::Query buildQuery()
Definition: whoami.cpp:13
GetTokenOwnerJob(std::string serverUrl, std::string _accessToken)
Gets information about the owner of an access token.
Definition: whoami.cpp:33
static BaseJob::Body buildBody()
Definition: whoami.cpp:21
static constexpr auto needsAuth()
Definition: whoami.hpp:57
GetTokenOwnerJob withData(JsonWrap j) &&
Definition: whoami.cpp:53
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