AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
OAuth2Credentials.h
1
6#pragma once
7#include <aws/appflow/Appflow_EXPORTS.h>
8#include <aws/appflow/model/ConnectorOAuthRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Appflow {
21namespace Model {
22
30 public:
31 AWS_APPFLOW_API OAuth2Credentials() = default;
34 AWS_APPFLOW_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetClientId() const { return m_clientId; }
41 inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
42 template <typename ClientIdT = Aws::String>
43 void SetClientId(ClientIdT&& value) {
44 m_clientIdHasBeenSet = true;
45 m_clientId = std::forward<ClientIdT>(value);
46 }
47 template <typename ClientIdT = Aws::String>
48 OAuth2Credentials& WithClientId(ClientIdT&& value) {
49 SetClientId(std::forward<ClientIdT>(value));
50 return *this;
51 }
53
55
59 inline const Aws::String& GetClientSecret() const { return m_clientSecret; }
60 inline bool ClientSecretHasBeenSet() const { return m_clientSecretHasBeenSet; }
61 template <typename ClientSecretT = Aws::String>
62 void SetClientSecret(ClientSecretT&& value) {
63 m_clientSecretHasBeenSet = true;
64 m_clientSecret = std::forward<ClientSecretT>(value);
65 }
66 template <typename ClientSecretT = Aws::String>
67 OAuth2Credentials& WithClientSecret(ClientSecretT&& value) {
68 SetClientSecret(std::forward<ClientSecretT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetAccessToken() const { return m_accessToken; }
78 inline bool AccessTokenHasBeenSet() const { return m_accessTokenHasBeenSet; }
79 template <typename AccessTokenT = Aws::String>
80 void SetAccessToken(AccessTokenT&& value) {
81 m_accessTokenHasBeenSet = true;
82 m_accessToken = std::forward<AccessTokenT>(value);
83 }
84 template <typename AccessTokenT = Aws::String>
85 OAuth2Credentials& WithAccessToken(AccessTokenT&& value) {
86 SetAccessToken(std::forward<AccessTokenT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::String& GetRefreshToken() const { return m_refreshToken; }
96 inline bool RefreshTokenHasBeenSet() const { return m_refreshTokenHasBeenSet; }
97 template <typename RefreshTokenT = Aws::String>
98 void SetRefreshToken(RefreshTokenT&& value) {
99 m_refreshTokenHasBeenSet = true;
100 m_refreshToken = std::forward<RefreshTokenT>(value);
101 }
102 template <typename RefreshTokenT = Aws::String>
103 OAuth2Credentials& WithRefreshToken(RefreshTokenT&& value) {
104 SetRefreshToken(std::forward<RefreshTokenT>(value));
105 return *this;
106 }
108
110
111 inline const ConnectorOAuthRequest& GetOAuthRequest() const { return m_oAuthRequest; }
112 inline bool OAuthRequestHasBeenSet() const { return m_oAuthRequestHasBeenSet; }
113 template <typename OAuthRequestT = ConnectorOAuthRequest>
114 void SetOAuthRequest(OAuthRequestT&& value) {
115 m_oAuthRequestHasBeenSet = true;
116 m_oAuthRequest = std::forward<OAuthRequestT>(value);
117 }
118 template <typename OAuthRequestT = ConnectorOAuthRequest>
119 OAuth2Credentials& WithOAuthRequest(OAuthRequestT&& value) {
120 SetOAuthRequest(std::forward<OAuthRequestT>(value));
121 return *this;
122 }
124 private:
125 Aws::String m_clientId;
126
127 Aws::String m_clientSecret;
128
129 Aws::String m_accessToken;
130
131 Aws::String m_refreshToken;
132
133 ConnectorOAuthRequest m_oAuthRequest;
134 bool m_clientIdHasBeenSet = false;
135 bool m_clientSecretHasBeenSet = false;
136 bool m_accessTokenHasBeenSet = false;
137 bool m_refreshTokenHasBeenSet = false;
138 bool m_oAuthRequestHasBeenSet = false;
139};
140
141} // namespace Model
142} // namespace Appflow
143} // namespace Aws
void SetAccessToken(AccessTokenT &&value)
const Aws::String & GetAccessToken() const
void SetOAuthRequest(OAuthRequestT &&value)
AWS_APPFLOW_API OAuth2Credentials & operator=(Aws::Utils::Json::JsonView jsonValue)
OAuth2Credentials & WithAccessToken(AccessTokenT &&value)
const Aws::String & GetClientSecret() const
AWS_APPFLOW_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetRefreshToken() const
void SetRefreshToken(RefreshTokenT &&value)
OAuth2Credentials & WithClientSecret(ClientSecretT &&value)
const ConnectorOAuthRequest & GetOAuthRequest() const
OAuth2Credentials & WithClientId(ClientIdT &&value)
AWS_APPFLOW_API OAuth2Credentials()=default
const Aws::String & GetClientId() const
AWS_APPFLOW_API OAuth2Credentials(Aws::Utils::Json::JsonView jsonValue)
OAuth2Credentials & WithRefreshToken(RefreshTokenT &&value)
OAuth2Credentials & WithOAuthRequest(OAuthRequestT &&value)
void SetClientSecret(ClientSecretT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue