AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
ImpersonatedUser.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/guardduty/GuardDuty_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace GuardDuty {
21namespace Model {
22
30 public:
31 AWS_GUARDDUTY_API ImpersonatedUser() = default;
32 AWS_GUARDDUTY_API ImpersonatedUser(Aws::Utils::Json::JsonView jsonValue);
34 AWS_GUARDDUTY_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetUsername() const { return m_username; }
41 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
42 template <typename UsernameT = Aws::String>
43 void SetUsername(UsernameT&& value) {
44 m_usernameHasBeenSet = true;
45 m_username = std::forward<UsernameT>(value);
46 }
47 template <typename UsernameT = Aws::String>
48 ImpersonatedUser& WithUsername(UsernameT&& value) {
49 SetUsername(std::forward<UsernameT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::Vector<Aws::String>& GetGroups() const { return m_groups; }
59 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
60 template <typename GroupsT = Aws::Vector<Aws::String>>
61 void SetGroups(GroupsT&& value) {
62 m_groupsHasBeenSet = true;
63 m_groups = std::forward<GroupsT>(value);
64 }
65 template <typename GroupsT = Aws::Vector<Aws::String>>
66 ImpersonatedUser& WithGroups(GroupsT&& value) {
67 SetGroups(std::forward<GroupsT>(value));
68 return *this;
69 }
70 template <typename GroupsT = Aws::String>
71 ImpersonatedUser& AddGroups(GroupsT&& value) {
72 m_groupsHasBeenSet = true;
73 m_groups.emplace_back(std::forward<GroupsT>(value));
74 return *this;
75 }
77 private:
78 Aws::String m_username;
79
81 bool m_usernameHasBeenSet = false;
82 bool m_groupsHasBeenSet = false;
83};
84
85} // namespace Model
86} // namespace GuardDuty
87} // namespace Aws
AWS_GUARDDUTY_API Aws::Utils::Json::JsonValue Jsonize() const
ImpersonatedUser & WithGroups(GroupsT &&value)
AWS_GUARDDUTY_API ImpersonatedUser & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetUsername() const
ImpersonatedUser & WithUsername(UsernameT &&value)
AWS_GUARDDUTY_API ImpersonatedUser()=default
AWS_GUARDDUTY_API ImpersonatedUser(Aws::Utils::Json::JsonView jsonValue)
ImpersonatedUser & AddGroups(GroupsT &&value)
const Aws::Vector< Aws::String > & GetGroups() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue