AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Grant.h
1
6#pragma once
7#include <aws/sso-admin/SSOAdmin_EXPORTS.h>
8#include <aws/sso-admin/model/AuthorizationCodeGrant.h>
9#include <aws/sso-admin/model/JwtBearerGrant.h>
10#include <aws/sso-admin/model/RefreshTokenGrant.h>
11#include <aws/sso-admin/model/TokenExchangeGrant.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace SSOAdmin
25{
26namespace Model
27{
28
36 class Grant
37 {
38 public:
39 AWS_SSOADMIN_API Grant() = default;
40 AWS_SSOADMIN_API Grant(Aws::Utils::Json::JsonView jsonValue);
41 AWS_SSOADMIN_API Grant& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_SSOADMIN_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
49 inline const AuthorizationCodeGrant& GetAuthorizationCode() const { return m_authorizationCode; }
50 inline bool AuthorizationCodeHasBeenSet() const { return m_authorizationCodeHasBeenSet; }
51 template<typename AuthorizationCodeT = AuthorizationCodeGrant>
52 void SetAuthorizationCode(AuthorizationCodeT&& value) { m_authorizationCodeHasBeenSet = true; m_authorizationCode = std::forward<AuthorizationCodeT>(value); }
53 template<typename AuthorizationCodeT = AuthorizationCodeGrant>
54 Grant& WithAuthorizationCode(AuthorizationCodeT&& value) { SetAuthorizationCode(std::forward<AuthorizationCodeT>(value)); return *this;}
56
58
62 inline const JwtBearerGrant& GetJwtBearer() const { return m_jwtBearer; }
63 inline bool JwtBearerHasBeenSet() const { return m_jwtBearerHasBeenSet; }
64 template<typename JwtBearerT = JwtBearerGrant>
65 void SetJwtBearer(JwtBearerT&& value) { m_jwtBearerHasBeenSet = true; m_jwtBearer = std::forward<JwtBearerT>(value); }
66 template<typename JwtBearerT = JwtBearerGrant>
67 Grant& WithJwtBearer(JwtBearerT&& value) { SetJwtBearer(std::forward<JwtBearerT>(value)); return *this;}
69
71
74 inline const RefreshTokenGrant& GetRefreshToken() const { return m_refreshToken; }
75 inline bool RefreshTokenHasBeenSet() const { return m_refreshTokenHasBeenSet; }
76 template<typename RefreshTokenT = RefreshTokenGrant>
77 void SetRefreshToken(RefreshTokenT&& value) { m_refreshTokenHasBeenSet = true; m_refreshToken = std::forward<RefreshTokenT>(value); }
78 template<typename RefreshTokenT = RefreshTokenGrant>
79 Grant& WithRefreshToken(RefreshTokenT&& value) { SetRefreshToken(std::forward<RefreshTokenT>(value)); return *this;}
81
83
87 inline const TokenExchangeGrant& GetTokenExchange() const { return m_tokenExchange; }
88 inline bool TokenExchangeHasBeenSet() const { return m_tokenExchangeHasBeenSet; }
89 template<typename TokenExchangeT = TokenExchangeGrant>
90 void SetTokenExchange(TokenExchangeT&& value) { m_tokenExchangeHasBeenSet = true; m_tokenExchange = std::forward<TokenExchangeT>(value); }
91 template<typename TokenExchangeT = TokenExchangeGrant>
92 Grant& WithTokenExchange(TokenExchangeT&& value) { SetTokenExchange(std::forward<TokenExchangeT>(value)); return *this;}
94 private:
95
96 AuthorizationCodeGrant m_authorizationCode;
97 bool m_authorizationCodeHasBeenSet = false;
98
99 JwtBearerGrant m_jwtBearer;
100 bool m_jwtBearerHasBeenSet = false;
101
102 RefreshTokenGrant m_refreshToken;
103 bool m_refreshTokenHasBeenSet = false;
104
105 TokenExchangeGrant m_tokenExchange;
106 bool m_tokenExchangeHasBeenSet = false;
107 };
108
109} // namespace Model
110} // namespace SSOAdmin
111} // namespace Aws
Grant & WithTokenExchange(TokenExchangeT &&value)
Definition Grant.h:92
AWS_SSOADMIN_API Grant(Aws::Utils::Json::JsonView jsonValue)
void SetRefreshToken(RefreshTokenT &&value)
Definition Grant.h:77
Grant & WithJwtBearer(JwtBearerT &&value)
Definition Grant.h:67
void SetAuthorizationCode(AuthorizationCodeT &&value)
Definition Grant.h:52
bool AuthorizationCodeHasBeenSet() const
Definition Grant.h:50
const RefreshTokenGrant & GetRefreshToken() const
Definition Grant.h:74
bool TokenExchangeHasBeenSet() const
Definition Grant.h:88
bool JwtBearerHasBeenSet() const
Definition Grant.h:63
AWS_SSOADMIN_API Grant & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_SSOADMIN_API Grant()=default
void SetTokenExchange(TokenExchangeT &&value)
Definition Grant.h:90
const AuthorizationCodeGrant & GetAuthorizationCode() const
Definition Grant.h:49
void SetJwtBearer(JwtBearerT &&value)
Definition Grant.h:65
const TokenExchangeGrant & GetTokenExchange() const
Definition Grant.h:87
const JwtBearerGrant & GetJwtBearer() const
Definition Grant.h:62
Grant & WithRefreshToken(RefreshTokenT &&value)
Definition Grant.h:79
bool RefreshTokenHasBeenSet() const
Definition Grant.h:75
AWS_SSOADMIN_API Aws::Utils::Json::JsonValue Jsonize() const
Grant & WithAuthorizationCode(AuthorizationCodeT &&value)
Definition Grant.h:54
Aws::Utils::Json::JsonValue JsonValue