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
Kazv::Api::GetTokenOwnerJob::GetTokenOwnerJob
GetTokenOwnerJob(std::string serverUrl, std::string _accessToken)
Gets information about the owner of an access token.
Definition: whoami.cpp:35
nlohmann
Definition: location.hpp:26
Kazv::Api::GetTokenOwnerJob::buildQuery
static BaseJob::Query buildQuery()
Definition: whoami.cpp:15
Kazv
Definition: location.hpp:10
Kazv::BaseJob::Query
Definition: basejob.hpp:90
Kazv::Api::GetTokenOwnerJob::JobResponse::userId
std::string userId() const
The user ID that owns the access token.
Definition: whoami.cpp:83
Kazv::Api::GetTokenOwnerJob::withData
GetTokenOwnerJob withData(JsonWrap j) &&
Definition: whoami.cpp:55
Kazv::Api::GetTokenOwnerJob::JobResponse::JobResponse
JobResponse(Response r)
Definition: whoami.cpp:69
Kazv::Api
Definition: location.hpp:10
Kazv::Api::GetTokenOwnerJob::JobResponse::deviceId
std::optional< std::string > deviceId() const
Device ID associated with the access token.
Definition: whoami.cpp:94
Kazv::Api::GetTokenOwnerJob
Gets information about the owner of an access token.
Definition: whoami.hpp:25
basejob.hpp
Kazv::JsonWrap
Definition: jsonwrap.hpp:22
Kazv::Api::GetTokenOwnerJob::JobResponse::isGuest
std::optional< bool > isGuest() const
When true, the user is a Guest User.
Definition: whoami.cpp:105
Kazv::Api::GetTokenOwnerJob::needsAuth
static constexpr auto needsAuth()
Definition: whoami.hpp:61
Kazv::BaseJob::Body
::Kazv::Body Body
Definition: basejob.hpp:100
Kazv::Api::GetTokenOwnerJob::JobResponse::success
bool success() const
Definition: whoami.cpp:72
Kazv::Api::GetTokenOwnerJob::buildBody
static BaseJob::Body buildBody()
Definition: whoami.cpp:23
Kazv::Response
Definition: basejob.hpp:50
Kazv::Api::GetTokenOwnerJob::JobResponse
Definition: whoami.hpp:32