AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
Credential.h
1
6#pragma once
7#include <aws/appfabric/AppFabric_EXPORTS.h>
8#include <aws/appfabric/model/Oauth2Credential.h>
9#include <aws/appfabric/model/ApiKeyCredential.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace AppFabric
23{
24namespace Model
25{
26
34 {
35 public:
36 AWS_APPFABRIC_API Credential() = default;
37 AWS_APPFABRIC_API Credential(Aws::Utils::Json::JsonView jsonValue);
38 AWS_APPFABRIC_API Credential& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_APPFABRIC_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline const Oauth2Credential& GetOauth2Credential() const { return m_oauth2Credential; }
47 inline bool Oauth2CredentialHasBeenSet() const { return m_oauth2CredentialHasBeenSet; }
48 template<typename Oauth2CredentialT = Oauth2Credential>
49 void SetOauth2Credential(Oauth2CredentialT&& value) { m_oauth2CredentialHasBeenSet = true; m_oauth2Credential = std::forward<Oauth2CredentialT>(value); }
50 template<typename Oauth2CredentialT = Oauth2Credential>
51 Credential& WithOauth2Credential(Oauth2CredentialT&& value) { SetOauth2Credential(std::forward<Oauth2CredentialT>(value)); return *this;}
53
55
58 inline const ApiKeyCredential& GetApiKeyCredential() const { return m_apiKeyCredential; }
59 inline bool ApiKeyCredentialHasBeenSet() const { return m_apiKeyCredentialHasBeenSet; }
60 template<typename ApiKeyCredentialT = ApiKeyCredential>
61 void SetApiKeyCredential(ApiKeyCredentialT&& value) { m_apiKeyCredentialHasBeenSet = true; m_apiKeyCredential = std::forward<ApiKeyCredentialT>(value); }
62 template<typename ApiKeyCredentialT = ApiKeyCredential>
63 Credential& WithApiKeyCredential(ApiKeyCredentialT&& value) { SetApiKeyCredential(std::forward<ApiKeyCredentialT>(value)); return *this;}
65 private:
66
67 Oauth2Credential m_oauth2Credential;
68 bool m_oauth2CredentialHasBeenSet = false;
69
70 ApiKeyCredential m_apiKeyCredential;
71 bool m_apiKeyCredentialHasBeenSet = false;
72 };
73
74} // namespace Model
75} // namespace AppFabric
76} // namespace Aws
const Oauth2Credential & GetOauth2Credential() const
Definition Credential.h:46
Credential & WithApiKeyCredential(ApiKeyCredentialT &&value)
Definition Credential.h:63
const ApiKeyCredential & GetApiKeyCredential() const
Definition Credential.h:58
AWS_APPFABRIC_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_APPFABRIC_API Credential()=default
Credential & WithOauth2Credential(Oauth2CredentialT &&value)
Definition Credential.h:51
AWS_APPFABRIC_API Credential & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetApiKeyCredential(ApiKeyCredentialT &&value)
Definition Credential.h:61
void SetOauth2Credential(Oauth2CredentialT &&value)
Definition Credential.h:49
AWS_APPFABRIC_API Credential(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue JsonValue