1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/workmail/WorkMail_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/workmail/model/MemberType.h> 10 #include <aws/workmail/model/EntityState.h> 11 #include <aws/core/utils/DateTime.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace WorkMail 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>The representation of a user or group.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/Member">AWS API 32 * Reference</a></p> 33 */ 34 class AWS_WORKMAIL_API Member 35 { 36 public: 37 Member(); 38 Member(Aws::Utils::Json::JsonView jsonValue); 39 Member& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The identifier of the member.</p> 45 */ GetId()46 inline const Aws::String& GetId() const{ return m_id; } 47 48 /** 49 * <p>The identifier of the member.</p> 50 */ IdHasBeenSet()51 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 52 53 /** 54 * <p>The identifier of the member.</p> 55 */ SetId(const Aws::String & value)56 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 57 58 /** 59 * <p>The identifier of the member.</p> 60 */ SetId(Aws::String && value)61 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 62 63 /** 64 * <p>The identifier of the member.</p> 65 */ SetId(const char * value)66 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 67 68 /** 69 * <p>The identifier of the member.</p> 70 */ WithId(const Aws::String & value)71 inline Member& WithId(const Aws::String& value) { SetId(value); return *this;} 72 73 /** 74 * <p>The identifier of the member.</p> 75 */ WithId(Aws::String && value)76 inline Member& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 77 78 /** 79 * <p>The identifier of the member.</p> 80 */ WithId(const char * value)81 inline Member& WithId(const char* value) { SetId(value); return *this;} 82 83 84 /** 85 * <p>The name of the member.</p> 86 */ GetName()87 inline const Aws::String& GetName() const{ return m_name; } 88 89 /** 90 * <p>The name of the member.</p> 91 */ NameHasBeenSet()92 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } 93 94 /** 95 * <p>The name of the member.</p> 96 */ SetName(const Aws::String & value)97 inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } 98 99 /** 100 * <p>The name of the member.</p> 101 */ SetName(Aws::String && value)102 inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } 103 104 /** 105 * <p>The name of the member.</p> 106 */ SetName(const char * value)107 inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } 108 109 /** 110 * <p>The name of the member.</p> 111 */ WithName(const Aws::String & value)112 inline Member& WithName(const Aws::String& value) { SetName(value); return *this;} 113 114 /** 115 * <p>The name of the member.</p> 116 */ WithName(Aws::String && value)117 inline Member& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} 118 119 /** 120 * <p>The name of the member.</p> 121 */ WithName(const char * value)122 inline Member& WithName(const char* value) { SetName(value); return *this;} 123 124 125 /** 126 * <p>A member can be a user or group.</p> 127 */ GetType()128 inline const MemberType& GetType() const{ return m_type; } 129 130 /** 131 * <p>A member can be a user or group.</p> 132 */ TypeHasBeenSet()133 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } 134 135 /** 136 * <p>A member can be a user or group.</p> 137 */ SetType(const MemberType & value)138 inline void SetType(const MemberType& value) { m_typeHasBeenSet = true; m_type = value; } 139 140 /** 141 * <p>A member can be a user or group.</p> 142 */ SetType(MemberType && value)143 inline void SetType(MemberType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } 144 145 /** 146 * <p>A member can be a user or group.</p> 147 */ WithType(const MemberType & value)148 inline Member& WithType(const MemberType& value) { SetType(value); return *this;} 149 150 /** 151 * <p>A member can be a user or group.</p> 152 */ WithType(MemberType && value)153 inline Member& WithType(MemberType&& value) { SetType(std::move(value)); return *this;} 154 155 156 /** 157 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 158 */ GetState()159 inline const EntityState& GetState() const{ return m_state; } 160 161 /** 162 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 163 */ StateHasBeenSet()164 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } 165 166 /** 167 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 168 */ SetState(const EntityState & value)169 inline void SetState(const EntityState& value) { m_stateHasBeenSet = true; m_state = value; } 170 171 /** 172 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 173 */ SetState(EntityState && value)174 inline void SetState(EntityState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } 175 176 /** 177 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 178 */ WithState(const EntityState & value)179 inline Member& WithState(const EntityState& value) { SetState(value); return *this;} 180 181 /** 182 * <p>The state of the member, which can be ENABLED, DISABLED, or DELETED.</p> 183 */ WithState(EntityState && value)184 inline Member& WithState(EntityState&& value) { SetState(std::move(value)); return *this;} 185 186 187 /** 188 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 189 */ GetEnabledDate()190 inline const Aws::Utils::DateTime& GetEnabledDate() const{ return m_enabledDate; } 191 192 /** 193 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 194 */ EnabledDateHasBeenSet()195 inline bool EnabledDateHasBeenSet() const { return m_enabledDateHasBeenSet; } 196 197 /** 198 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 199 */ SetEnabledDate(const Aws::Utils::DateTime & value)200 inline void SetEnabledDate(const Aws::Utils::DateTime& value) { m_enabledDateHasBeenSet = true; m_enabledDate = value; } 201 202 /** 203 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 204 */ SetEnabledDate(Aws::Utils::DateTime && value)205 inline void SetEnabledDate(Aws::Utils::DateTime&& value) { m_enabledDateHasBeenSet = true; m_enabledDate = std::move(value); } 206 207 /** 208 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 209 */ WithEnabledDate(const Aws::Utils::DateTime & value)210 inline Member& WithEnabledDate(const Aws::Utils::DateTime& value) { SetEnabledDate(value); return *this;} 211 212 /** 213 * <p>The date indicating when the member was enabled for Amazon WorkMail use.</p> 214 */ WithEnabledDate(Aws::Utils::DateTime && value)215 inline Member& WithEnabledDate(Aws::Utils::DateTime&& value) { SetEnabledDate(std::move(value)); return *this;} 216 217 218 /** 219 * <p>The date indicating when the member was disabled from Amazon WorkMail 220 * use.</p> 221 */ GetDisabledDate()222 inline const Aws::Utils::DateTime& GetDisabledDate() const{ return m_disabledDate; } 223 224 /** 225 * <p>The date indicating when the member was disabled from Amazon WorkMail 226 * use.</p> 227 */ DisabledDateHasBeenSet()228 inline bool DisabledDateHasBeenSet() const { return m_disabledDateHasBeenSet; } 229 230 /** 231 * <p>The date indicating when the member was disabled from Amazon WorkMail 232 * use.</p> 233 */ SetDisabledDate(const Aws::Utils::DateTime & value)234 inline void SetDisabledDate(const Aws::Utils::DateTime& value) { m_disabledDateHasBeenSet = true; m_disabledDate = value; } 235 236 /** 237 * <p>The date indicating when the member was disabled from Amazon WorkMail 238 * use.</p> 239 */ SetDisabledDate(Aws::Utils::DateTime && value)240 inline void SetDisabledDate(Aws::Utils::DateTime&& value) { m_disabledDateHasBeenSet = true; m_disabledDate = std::move(value); } 241 242 /** 243 * <p>The date indicating when the member was disabled from Amazon WorkMail 244 * use.</p> 245 */ WithDisabledDate(const Aws::Utils::DateTime & value)246 inline Member& WithDisabledDate(const Aws::Utils::DateTime& value) { SetDisabledDate(value); return *this;} 247 248 /** 249 * <p>The date indicating when the member was disabled from Amazon WorkMail 250 * use.</p> 251 */ WithDisabledDate(Aws::Utils::DateTime && value)252 inline Member& WithDisabledDate(Aws::Utils::DateTime&& value) { SetDisabledDate(std::move(value)); return *this;} 253 254 private: 255 256 Aws::String m_id; 257 bool m_idHasBeenSet; 258 259 Aws::String m_name; 260 bool m_nameHasBeenSet; 261 262 MemberType m_type; 263 bool m_typeHasBeenSet; 264 265 EntityState m_state; 266 bool m_stateHasBeenSet; 267 268 Aws::Utils::DateTime m_enabledDate; 269 bool m_enabledDateHasBeenSet; 270 271 Aws::Utils::DateTime m_disabledDate; 272 bool m_disabledDateHasBeenSet; 273 }; 274 275 } // namespace Model 276 } // namespace WorkMail 277 } // namespace Aws 278