AWS SDK for C++

AWS SDK for C++ Version 1.11.926

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
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace SSOAdmin {
23namespace Model {
24
32class Grant {
33 public:
34 AWS_SSOADMIN_API Grant() = default;
35 AWS_SSOADMIN_API Grant(Aws::Utils::Json::JsonView jsonValue);
36 AWS_SSOADMIN_API Grant& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SSOADMIN_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const AuthorizationCodeGrant& GetAuthorizationCode() const { return m_authorizationCode; }
44 inline bool AuthorizationCodeHasBeenSet() const { return m_authorizationCodeHasBeenSet; }
45 template <typename AuthorizationCodeT = AuthorizationCodeGrant>
46 void SetAuthorizationCode(AuthorizationCodeT&& value) {
47 m_authorizationCodeHasBeenSet = true;
48 m_authorizationCode = std::forward<AuthorizationCodeT>(value);
49 }
50 template <typename AuthorizationCodeT = AuthorizationCodeGrant>
51 Grant& WithAuthorizationCode(AuthorizationCodeT&& value) {
52 SetAuthorizationCode(std::forward<AuthorizationCodeT>(value));
53 return *this;
54 }
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) {
66 m_jwtBearerHasBeenSet = true;
67 m_jwtBearer = std::forward<JwtBearerT>(value);
68 }
69 template <typename JwtBearerT = JwtBearerGrant>
70 Grant& WithJwtBearer(JwtBearerT&& value) {
71 SetJwtBearer(std::forward<JwtBearerT>(value));
72 return *this;
73 }
75
77
80 inline const RefreshTokenGrant& GetRefreshToken() const { return m_refreshToken; }
81 inline bool RefreshTokenHasBeenSet() const { return m_refreshTokenHasBeenSet; }
82 template <typename RefreshTokenT = RefreshTokenGrant>
83 void SetRefreshToken(RefreshTokenT&& value) {
84 m_refreshTokenHasBeenSet = true;
85 m_refreshToken = std::forward<RefreshTokenT>(value);
86 }
87 template <typename RefreshTokenT = RefreshTokenGrant>
88 Grant& WithRefreshToken(RefreshTokenT&& value) {
89 SetRefreshToken(std::forward<RefreshTokenT>(value));
90 return *this;
91 }
93
95
99 inline const TokenExchangeGrant& GetTokenExchange() const { return m_tokenExchange; }
100 inline bool TokenExchangeHasBeenSet() const { return m_tokenExchangeHasBeenSet; }
101 template <typename TokenExchangeT = TokenExchangeGrant>
102 void SetTokenExchange(TokenExchangeT&& value) {
103 m_tokenExchangeHasBeenSet = true;
104 m_tokenExchange = std::forward<TokenExchangeT>(value);
105 }
106 template <typename TokenExchangeT = TokenExchangeGrant>
107 Grant& WithTokenExchange(TokenExchangeT&& value) {
108 SetTokenExchange(std::forward<TokenExchangeT>(value));
109 return *this;
110 }
112 private:
113 AuthorizationCodeGrant m_authorizationCode;
114
115 JwtBearerGrant m_jwtBearer;
116
117 RefreshTokenGrant m_refreshToken;
118
119 TokenExchangeGrant m_tokenExchange;
120 bool m_authorizationCodeHasBeenSet = false;
121 bool m_jwtBearerHasBeenSet = false;
122 bool m_refreshTokenHasBeenSet = false;
123 bool m_tokenExchangeHasBeenSet = false;
124};
125
126} // namespace Model
127} // namespace SSOAdmin
128} // namespace Aws
Grant & WithTokenExchange(TokenExchangeT &&value)
Definition Grant.h:107
AWS_SSOADMIN_API Grant(Aws::Utils::Json::JsonView jsonValue)
void SetRefreshToken(RefreshTokenT &&value)
Definition Grant.h:83
Grant & WithJwtBearer(JwtBearerT &&value)
Definition Grant.h:70
void SetAuthorizationCode(AuthorizationCodeT &&value)
Definition Grant.h:46
bool AuthorizationCodeHasBeenSet() const
Definition Grant.h:44
const RefreshTokenGrant & GetRefreshToken() const
Definition Grant.h:80
bool TokenExchangeHasBeenSet() const
Definition Grant.h:100
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:102
const AuthorizationCodeGrant & GetAuthorizationCode() const
Definition Grant.h:43
void SetJwtBearer(JwtBearerT &&value)
Definition Grant.h:65
const TokenExchangeGrant & GetTokenExchange() const
Definition Grant.h:99
const JwtBearerGrant & GetJwtBearer() const
Definition Grant.h:62
Grant & WithRefreshToken(RefreshTokenT &&value)
Definition Grant.h:88
bool RefreshTokenHasBeenSet() const
Definition Grant.h:81
AWS_SSOADMIN_API Aws::Utils::Json::JsonValue Jsonize() const
Grant & WithAuthorizationCode(AuthorizationCodeT &&value)
Definition Grant.h:51
Aws::Utils::Json::JsonValue JsonValue