AWS SDK for C++  0.12.9
AWS SDK for C++
Credentials.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace CognitoIdentity
30 {
31 namespace Model
32 {
33 
38  {
39  public:
40  Credentials();
41  Credentials(const Aws::Utils::Json::JsonValue& jsonValue);
42  Credentials& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
43  Aws::Utils::Json::JsonValue Jsonize() const;
44 
48  inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; }
49 
53  inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
54 
58  inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; }
59 
63  inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); }
64 
68  inline Credentials& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;}
69 
73  inline Credentials& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(value); return *this;}
74 
78  inline Credentials& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;}
79 
83  inline const Aws::String& GetSecretKey() const{ return m_secretKey; }
84 
88  inline void SetSecretKey(const Aws::String& value) { m_secretKeyHasBeenSet = true; m_secretKey = value; }
89 
93  inline void SetSecretKey(Aws::String&& value) { m_secretKeyHasBeenSet = true; m_secretKey = value; }
94 
98  inline void SetSecretKey(const char* value) { m_secretKeyHasBeenSet = true; m_secretKey.assign(value); }
99 
103  inline Credentials& WithSecretKey(const Aws::String& value) { SetSecretKey(value); return *this;}
104 
108  inline Credentials& WithSecretKey(Aws::String&& value) { SetSecretKey(value); return *this;}
109 
113  inline Credentials& WithSecretKey(const char* value) { SetSecretKey(value); return *this;}
114 
118  inline const Aws::String& GetSessionToken() const{ return m_sessionToken; }
119 
123  inline void SetSessionToken(const Aws::String& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
124 
128  inline void SetSessionToken(Aws::String&& value) { m_sessionTokenHasBeenSet = true; m_sessionToken = value; }
129 
133  inline void SetSessionToken(const char* value) { m_sessionTokenHasBeenSet = true; m_sessionToken.assign(value); }
134 
138  inline Credentials& WithSessionToken(const Aws::String& value) { SetSessionToken(value); return *this;}
139 
143  inline Credentials& WithSessionToken(Aws::String&& value) { SetSessionToken(value); return *this;}
144 
148  inline Credentials& WithSessionToken(const char* value) { SetSessionToken(value); return *this;}
149 
153  inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
154 
158  inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
159 
163  inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = value; }
164 
168  inline Credentials& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
169 
173  inline Credentials& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(value); return *this;}
174 
175  private:
176  Aws::String m_accessKeyId;
177  bool m_accessKeyIdHasBeenSet;
178  Aws::String m_secretKey;
179  bool m_secretKeyHasBeenSet;
180  Aws::String m_sessionToken;
181  bool m_sessionTokenHasBeenSet;
182  Aws::Utils::DateTime m_expiration;
183  bool m_expirationHasBeenSet;
184  };
185 
186 } // namespace Model
187 } // namespace CognitoIdentity
188 } // namespace Aws
Credentials & WithExpiration(const Aws::Utils::DateTime &value)
Definition: Credentials.h:168
Credentials & WithSessionToken(const char *value)
Definition: Credentials.h:148
Credentials & WithExpiration(Aws::Utils::DateTime &&value)
Definition: Credentials.h:173
Credentials & WithSecretKey(const Aws::String &value)
Definition: Credentials.h:103
void SetSecretKey(const char *value)
Definition: Credentials.h:98
const Aws::Utils::DateTime & GetExpiration() const
Definition: Credentials.h:153
void SetSecretKey(const Aws::String &value)
Definition: Credentials.h:88
Credentials & WithAccessKeyId(const char *value)
Definition: Credentials.h:78
void SetSecretKey(Aws::String &&value)
Definition: Credentials.h:93
Credentials & WithSecretKey(Aws::String &&value)
Definition: Credentials.h:108
void SetAccessKeyId(Aws::String &&value)
Definition: Credentials.h:58
const Aws::String & GetAccessKeyId() const
Definition: Credentials.h:48
Credentials & WithSessionToken(Aws::String &&value)
Definition: Credentials.h:143
const Aws::String & GetSecretKey() const
Definition: Credentials.h:83
Credentials & WithSessionToken(const Aws::String &value)
Definition: Credentials.h:138
void SetSessionToken(Aws::String &&value)
Definition: Credentials.h:128
const Aws::String & GetSessionToken() const
Definition: Credentials.h:118
void SetSessionToken(const Aws::String &value)
Definition: Credentials.h:123
void SetExpiration(Aws::Utils::DateTime &&value)
Definition: Credentials.h:163
void SetAccessKeyId(const Aws::String &value)
Definition: Credentials.h:53
Credentials & WithSecretKey(const char *value)
Definition: Credentials.h:113
void SetSessionToken(const char *value)
Definition: Credentials.h:133
#define AWS_COGNITOIDENTITY_API
void SetExpiration(const Aws::Utils::DateTime &value)
Definition: Credentials.h:158
Credentials & WithAccessKeyId(Aws::String &&value)
Definition: Credentials.h:73
Credentials & WithAccessKeyId(const Aws::String &value)
Definition: Credentials.h:68
void SetAccessKeyId(const char *value)
Definition: Credentials.h:63
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
JSON (JavaScript Object Notation).