AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Credential.h
1
6#pragma once
7#include <aws/appfabric/AppFabric_EXPORTS.h>
8#include <aws/appfabric/model/ApiKeyCredential.h>
9#include <aws/appfabric/model/Oauth2Credential.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace AppFabric {
21namespace Model {
22
30 public:
31 AWS_APPFABRIC_API Credential() = default;
32 AWS_APPFABRIC_API Credential(Aws::Utils::Json::JsonView jsonValue);
33 AWS_APPFABRIC_API Credential& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPFABRIC_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Oauth2Credential& GetOauth2Credential() const { return m_oauth2Credential; }
41 inline bool Oauth2CredentialHasBeenSet() const { return m_oauth2CredentialHasBeenSet; }
42 template <typename Oauth2CredentialT = Oauth2Credential>
43 void SetOauth2Credential(Oauth2CredentialT&& value) {
44 m_oauth2CredentialHasBeenSet = true;
45 m_oauth2Credential = std::forward<Oauth2CredentialT>(value);
46 }
47 template <typename Oauth2CredentialT = Oauth2Credential>
48 Credential& WithOauth2Credential(Oauth2CredentialT&& value) {
49 SetOauth2Credential(std::forward<Oauth2CredentialT>(value));
50 return *this;
51 }
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) {
62 m_apiKeyCredentialHasBeenSet = true;
63 m_apiKeyCredential = std::forward<ApiKeyCredentialT>(value);
64 }
65 template <typename ApiKeyCredentialT = ApiKeyCredential>
66 Credential& WithApiKeyCredential(ApiKeyCredentialT&& value) {
67 SetApiKeyCredential(std::forward<ApiKeyCredentialT>(value));
68 return *this;
69 }
71 private:
72 Oauth2Credential m_oauth2Credential;
73
74 ApiKeyCredential m_apiKeyCredential;
75 bool m_oauth2CredentialHasBeenSet = false;
76 bool m_apiKeyCredentialHasBeenSet = false;
77};
78
79} // namespace Model
80} // namespace AppFabric
81} // namespace Aws
const Oauth2Credential & GetOauth2Credential() const
Definition Credential.h:40
Credential & WithApiKeyCredential(ApiKeyCredentialT &&value)
Definition Credential.h:66
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:48
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:43
AWS_APPFABRIC_API Credential(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue JsonValue