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/amplifybackend/AmplifyBackend_EXPORTS.h> 8 #include <aws/amplifybackend/model/CreateBackendAuthForgotPasswordConfig.h> 9 #include <aws/amplifybackend/model/CreateBackendAuthMFAConfig.h> 10 #include <aws/amplifybackend/model/CreateBackendAuthOAuthConfig.h> 11 #include <aws/amplifybackend/model/CreateBackendAuthPasswordPolicyConfig.h> 12 #include <aws/core/utils/memory/stl/AWSVector.h> 13 #include <aws/amplifybackend/model/SignInMethod.h> 14 #include <aws/core/utils/memory/stl/AWSString.h> 15 #include <aws/amplifybackend/model/RequiredSignUpAttributesElement.h> 16 #include <utility> 17 18 namespace Aws 19 { 20 namespace Utils 21 { 22 namespace Json 23 { 24 class JsonValue; 25 class JsonView; 26 } // namespace Json 27 } // namespace Utils 28 namespace AmplifyBackend 29 { 30 namespace Model 31 { 32 33 /** 34 * <p>Describes the Amazon Cognito user pool configuration for the auth resource to 35 * be configured for your Amplify project.</p><p><h3>See Also:</h3> <a 36 * href="http://docs.aws.amazon.com/goto/WebAPI/amplifybackend-2020-08-11/CreateBackendAuthUserPoolConfig">AWS 37 * API Reference</a></p> 38 */ 39 class AWS_AMPLIFYBACKEND_API CreateBackendAuthUserPoolConfig 40 { 41 public: 42 CreateBackendAuthUserPoolConfig(); 43 CreateBackendAuthUserPoolConfig(Aws::Utils::Json::JsonView jsonValue); 44 CreateBackendAuthUserPoolConfig& operator=(Aws::Utils::Json::JsonView jsonValue); 45 Aws::Utils::Json::JsonValue Jsonize() const; 46 47 48 /** 49 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 50 * configured as a part of your Amplify project.</p> 51 */ GetForgotPassword()52 inline const CreateBackendAuthForgotPasswordConfig& GetForgotPassword() const{ return m_forgotPassword; } 53 54 /** 55 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 56 * configured as a part of your Amplify project.</p> 57 */ ForgotPasswordHasBeenSet()58 inline bool ForgotPasswordHasBeenSet() const { return m_forgotPasswordHasBeenSet; } 59 60 /** 61 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 62 * configured as a part of your Amplify project.</p> 63 */ SetForgotPassword(const CreateBackendAuthForgotPasswordConfig & value)64 inline void SetForgotPassword(const CreateBackendAuthForgotPasswordConfig& value) { m_forgotPasswordHasBeenSet = true; m_forgotPassword = value; } 65 66 /** 67 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 68 * configured as a part of your Amplify project.</p> 69 */ SetForgotPassword(CreateBackendAuthForgotPasswordConfig && value)70 inline void SetForgotPassword(CreateBackendAuthForgotPasswordConfig&& value) { m_forgotPasswordHasBeenSet = true; m_forgotPassword = std::move(value); } 71 72 /** 73 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 74 * configured as a part of your Amplify project.</p> 75 */ WithForgotPassword(const CreateBackendAuthForgotPasswordConfig & value)76 inline CreateBackendAuthUserPoolConfig& WithForgotPassword(const CreateBackendAuthForgotPasswordConfig& value) { SetForgotPassword(value); return *this;} 77 78 /** 79 * <p>Describes the forgotten password policy for your Amazon Cognito user pool, 80 * configured as a part of your Amplify project.</p> 81 */ WithForgotPassword(CreateBackendAuthForgotPasswordConfig && value)82 inline CreateBackendAuthUserPoolConfig& WithForgotPassword(CreateBackendAuthForgotPasswordConfig&& value) { SetForgotPassword(std::move(value)); return *this;} 83 84 85 /** 86 * <p>Describes whether to apply multi-factor authentication policies for your 87 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 88 */ GetMfa()89 inline const CreateBackendAuthMFAConfig& GetMfa() const{ return m_mfa; } 90 91 /** 92 * <p>Describes whether to apply multi-factor authentication policies for your 93 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 94 */ MfaHasBeenSet()95 inline bool MfaHasBeenSet() const { return m_mfaHasBeenSet; } 96 97 /** 98 * <p>Describes whether to apply multi-factor authentication policies for your 99 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 100 */ SetMfa(const CreateBackendAuthMFAConfig & value)101 inline void SetMfa(const CreateBackendAuthMFAConfig& value) { m_mfaHasBeenSet = true; m_mfa = value; } 102 103 /** 104 * <p>Describes whether to apply multi-factor authentication policies for your 105 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 106 */ SetMfa(CreateBackendAuthMFAConfig && value)107 inline void SetMfa(CreateBackendAuthMFAConfig&& value) { m_mfaHasBeenSet = true; m_mfa = std::move(value); } 108 109 /** 110 * <p>Describes whether to apply multi-factor authentication policies for your 111 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 112 */ WithMfa(const CreateBackendAuthMFAConfig & value)113 inline CreateBackendAuthUserPoolConfig& WithMfa(const CreateBackendAuthMFAConfig& value) { SetMfa(value); return *this;} 114 115 /** 116 * <p>Describes whether to apply multi-factor authentication policies for your 117 * Amazon Cognito user pool configured as a part of your Amplify project.</p> 118 */ WithMfa(CreateBackendAuthMFAConfig && value)119 inline CreateBackendAuthUserPoolConfig& WithMfa(CreateBackendAuthMFAConfig&& value) { SetMfa(std::move(value)); return *this;} 120 121 122 /** 123 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 124 * configured as a part of your Amplify project.</p> 125 */ GetOAuth()126 inline const CreateBackendAuthOAuthConfig& GetOAuth() const{ return m_oAuth; } 127 128 /** 129 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 130 * configured as a part of your Amplify project.</p> 131 */ OAuthHasBeenSet()132 inline bool OAuthHasBeenSet() const { return m_oAuthHasBeenSet; } 133 134 /** 135 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 136 * configured as a part of your Amplify project.</p> 137 */ SetOAuth(const CreateBackendAuthOAuthConfig & value)138 inline void SetOAuth(const CreateBackendAuthOAuthConfig& value) { m_oAuthHasBeenSet = true; m_oAuth = value; } 139 140 /** 141 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 142 * configured as a part of your Amplify project.</p> 143 */ SetOAuth(CreateBackendAuthOAuthConfig && value)144 inline void SetOAuth(CreateBackendAuthOAuthConfig&& value) { m_oAuthHasBeenSet = true; m_oAuth = std::move(value); } 145 146 /** 147 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 148 * configured as a part of your Amplify project.</p> 149 */ WithOAuth(const CreateBackendAuthOAuthConfig & value)150 inline CreateBackendAuthUserPoolConfig& WithOAuth(const CreateBackendAuthOAuthConfig& value) { SetOAuth(value); return *this;} 151 152 /** 153 * <p>Describes the OAuth policy and rules for your Amazon Cognito user pool, 154 * configured as a part of your Amplify project.</p> 155 */ WithOAuth(CreateBackendAuthOAuthConfig && value)156 inline CreateBackendAuthUserPoolConfig& WithOAuth(CreateBackendAuthOAuthConfig&& value) { SetOAuth(std::move(value)); return *this;} 157 158 159 /** 160 * <p>Describes the password policy for your Amazon Cognito user pool, configured 161 * as a part of your Amplify project.</p> 162 */ GetPasswordPolicy()163 inline const CreateBackendAuthPasswordPolicyConfig& GetPasswordPolicy() const{ return m_passwordPolicy; } 164 165 /** 166 * <p>Describes the password policy for your Amazon Cognito user pool, configured 167 * as a part of your Amplify project.</p> 168 */ PasswordPolicyHasBeenSet()169 inline bool PasswordPolicyHasBeenSet() const { return m_passwordPolicyHasBeenSet; } 170 171 /** 172 * <p>Describes the password policy for your Amazon Cognito user pool, configured 173 * as a part of your Amplify project.</p> 174 */ SetPasswordPolicy(const CreateBackendAuthPasswordPolicyConfig & value)175 inline void SetPasswordPolicy(const CreateBackendAuthPasswordPolicyConfig& value) { m_passwordPolicyHasBeenSet = true; m_passwordPolicy = value; } 176 177 /** 178 * <p>Describes the password policy for your Amazon Cognito user pool, configured 179 * as a part of your Amplify project.</p> 180 */ SetPasswordPolicy(CreateBackendAuthPasswordPolicyConfig && value)181 inline void SetPasswordPolicy(CreateBackendAuthPasswordPolicyConfig&& value) { m_passwordPolicyHasBeenSet = true; m_passwordPolicy = std::move(value); } 182 183 /** 184 * <p>Describes the password policy for your Amazon Cognito user pool, configured 185 * as a part of your Amplify project.</p> 186 */ WithPasswordPolicy(const CreateBackendAuthPasswordPolicyConfig & value)187 inline CreateBackendAuthUserPoolConfig& WithPasswordPolicy(const CreateBackendAuthPasswordPolicyConfig& value) { SetPasswordPolicy(value); return *this;} 188 189 /** 190 * <p>Describes the password policy for your Amazon Cognito user pool, configured 191 * as a part of your Amplify project.</p> 192 */ WithPasswordPolicy(CreateBackendAuthPasswordPolicyConfig && value)193 inline CreateBackendAuthUserPoolConfig& WithPasswordPolicy(CreateBackendAuthPasswordPolicyConfig&& value) { SetPasswordPolicy(std::move(value)); return *this;} 194 195 196 /** 197 * <p>The required attributes to sign up new users in the user pool.</p> 198 */ GetRequiredSignUpAttributes()199 inline const Aws::Vector<RequiredSignUpAttributesElement>& GetRequiredSignUpAttributes() const{ return m_requiredSignUpAttributes; } 200 201 /** 202 * <p>The required attributes to sign up new users in the user pool.</p> 203 */ RequiredSignUpAttributesHasBeenSet()204 inline bool RequiredSignUpAttributesHasBeenSet() const { return m_requiredSignUpAttributesHasBeenSet; } 205 206 /** 207 * <p>The required attributes to sign up new users in the user pool.</p> 208 */ SetRequiredSignUpAttributes(const Aws::Vector<RequiredSignUpAttributesElement> & value)209 inline void SetRequiredSignUpAttributes(const Aws::Vector<RequiredSignUpAttributesElement>& value) { m_requiredSignUpAttributesHasBeenSet = true; m_requiredSignUpAttributes = value; } 210 211 /** 212 * <p>The required attributes to sign up new users in the user pool.</p> 213 */ SetRequiredSignUpAttributes(Aws::Vector<RequiredSignUpAttributesElement> && value)214 inline void SetRequiredSignUpAttributes(Aws::Vector<RequiredSignUpAttributesElement>&& value) { m_requiredSignUpAttributesHasBeenSet = true; m_requiredSignUpAttributes = std::move(value); } 215 216 /** 217 * <p>The required attributes to sign up new users in the user pool.</p> 218 */ WithRequiredSignUpAttributes(const Aws::Vector<RequiredSignUpAttributesElement> & value)219 inline CreateBackendAuthUserPoolConfig& WithRequiredSignUpAttributes(const Aws::Vector<RequiredSignUpAttributesElement>& value) { SetRequiredSignUpAttributes(value); return *this;} 220 221 /** 222 * <p>The required attributes to sign up new users in the user pool.</p> 223 */ WithRequiredSignUpAttributes(Aws::Vector<RequiredSignUpAttributesElement> && value)224 inline CreateBackendAuthUserPoolConfig& WithRequiredSignUpAttributes(Aws::Vector<RequiredSignUpAttributesElement>&& value) { SetRequiredSignUpAttributes(std::move(value)); return *this;} 225 226 /** 227 * <p>The required attributes to sign up new users in the user pool.</p> 228 */ AddRequiredSignUpAttributes(const RequiredSignUpAttributesElement & value)229 inline CreateBackendAuthUserPoolConfig& AddRequiredSignUpAttributes(const RequiredSignUpAttributesElement& value) { m_requiredSignUpAttributesHasBeenSet = true; m_requiredSignUpAttributes.push_back(value); return *this; } 230 231 /** 232 * <p>The required attributes to sign up new users in the user pool.</p> 233 */ AddRequiredSignUpAttributes(RequiredSignUpAttributesElement && value)234 inline CreateBackendAuthUserPoolConfig& AddRequiredSignUpAttributes(RequiredSignUpAttributesElement&& value) { m_requiredSignUpAttributesHasBeenSet = true; m_requiredSignUpAttributes.push_back(std::move(value)); return *this; } 235 236 237 /** 238 * <p>Describes the sign-in methods that your Amplify app users use to log in using 239 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 240 */ GetSignInMethod()241 inline const SignInMethod& GetSignInMethod() const{ return m_signInMethod; } 242 243 /** 244 * <p>Describes the sign-in methods that your Amplify app users use to log in using 245 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 246 */ SignInMethodHasBeenSet()247 inline bool SignInMethodHasBeenSet() const { return m_signInMethodHasBeenSet; } 248 249 /** 250 * <p>Describes the sign-in methods that your Amplify app users use to log in using 251 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 252 */ SetSignInMethod(const SignInMethod & value)253 inline void SetSignInMethod(const SignInMethod& value) { m_signInMethodHasBeenSet = true; m_signInMethod = value; } 254 255 /** 256 * <p>Describes the sign-in methods that your Amplify app users use to log in using 257 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 258 */ SetSignInMethod(SignInMethod && value)259 inline void SetSignInMethod(SignInMethod&& value) { m_signInMethodHasBeenSet = true; m_signInMethod = std::move(value); } 260 261 /** 262 * <p>Describes the sign-in methods that your Amplify app users use to log in using 263 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 264 */ WithSignInMethod(const SignInMethod & value)265 inline CreateBackendAuthUserPoolConfig& WithSignInMethod(const SignInMethod& value) { SetSignInMethod(value); return *this;} 266 267 /** 268 * <p>Describes the sign-in methods that your Amplify app users use to log in using 269 * the Amazon Cognito user pool, configured as a part of your Amplify project.</p> 270 */ WithSignInMethod(SignInMethod && value)271 inline CreateBackendAuthUserPoolConfig& WithSignInMethod(SignInMethod&& value) { SetSignInMethod(std::move(value)); return *this;} 272 273 274 /** 275 * <p>The Amazon Cognito user pool name.</p> 276 */ GetUserPoolName()277 inline const Aws::String& GetUserPoolName() const{ return m_userPoolName; } 278 279 /** 280 * <p>The Amazon Cognito user pool name.</p> 281 */ UserPoolNameHasBeenSet()282 inline bool UserPoolNameHasBeenSet() const { return m_userPoolNameHasBeenSet; } 283 284 /** 285 * <p>The Amazon Cognito user pool name.</p> 286 */ SetUserPoolName(const Aws::String & value)287 inline void SetUserPoolName(const Aws::String& value) { m_userPoolNameHasBeenSet = true; m_userPoolName = value; } 288 289 /** 290 * <p>The Amazon Cognito user pool name.</p> 291 */ SetUserPoolName(Aws::String && value)292 inline void SetUserPoolName(Aws::String&& value) { m_userPoolNameHasBeenSet = true; m_userPoolName = std::move(value); } 293 294 /** 295 * <p>The Amazon Cognito user pool name.</p> 296 */ SetUserPoolName(const char * value)297 inline void SetUserPoolName(const char* value) { m_userPoolNameHasBeenSet = true; m_userPoolName.assign(value); } 298 299 /** 300 * <p>The Amazon Cognito user pool name.</p> 301 */ WithUserPoolName(const Aws::String & value)302 inline CreateBackendAuthUserPoolConfig& WithUserPoolName(const Aws::String& value) { SetUserPoolName(value); return *this;} 303 304 /** 305 * <p>The Amazon Cognito user pool name.</p> 306 */ WithUserPoolName(Aws::String && value)307 inline CreateBackendAuthUserPoolConfig& WithUserPoolName(Aws::String&& value) { SetUserPoolName(std::move(value)); return *this;} 308 309 /** 310 * <p>The Amazon Cognito user pool name.</p> 311 */ WithUserPoolName(const char * value)312 inline CreateBackendAuthUserPoolConfig& WithUserPoolName(const char* value) { SetUserPoolName(value); return *this;} 313 314 private: 315 316 CreateBackendAuthForgotPasswordConfig m_forgotPassword; 317 bool m_forgotPasswordHasBeenSet; 318 319 CreateBackendAuthMFAConfig m_mfa; 320 bool m_mfaHasBeenSet; 321 322 CreateBackendAuthOAuthConfig m_oAuth; 323 bool m_oAuthHasBeenSet; 324 325 CreateBackendAuthPasswordPolicyConfig m_passwordPolicy; 326 bool m_passwordPolicyHasBeenSet; 327 328 Aws::Vector<RequiredSignUpAttributesElement> m_requiredSignUpAttributes; 329 bool m_requiredSignUpAttributesHasBeenSet; 330 331 SignInMethod m_signInMethod; 332 bool m_signInMethodHasBeenSet; 333 334 Aws::String m_userPoolName; 335 bool m_userPoolNameHasBeenSet; 336 }; 337 338 } // namespace Model 339 } // namespace AmplifyBackend 340 } // namespace Aws 341