All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cognitoidp.model.UpdateUserPoolRequest Maven / Gradle / Ivy

/*
 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.cognitoidp.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Represents the request to update the user pool. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateUserPoolRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The user pool ID for the user pool you want to update. *

*/ private String userPoolId; /** *

* A container with the policies you wish to update in a user pool. *

*/ private UserPoolPolicyType policies; /** *

* The AWS Lambda configuration information from the request to update the user pool. *

*/ private LambdaConfigType lambdaConfig; /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

*/ private java.util.List autoVerifiedAttributes; /** *

* A container with information about the SMS verification message. *

*/ private String smsVerificationMessage; /** *

* The contents of the email verification message. *

*/ private String emailVerificationMessage; /** *

* The subject of the email verification message. *

*/ private String emailVerificationSubject; /** *

* The template for verification messages. *

*/ private VerificationMessageTemplateType verificationMessageTemplate; /** *

* The contents of the SMS authentication message. *

*/ private String smsAuthenticationMessage; /** *

* Can be one of the following values: *

*
    *
  • *

    * OFF - MFA tokens are not required and cannot be specified during user registration. *

    *
  • *
  • *

    * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

    *
  • *
  • *

    * OPTIONAL - Users have the option when registering to create an MFA token. *

    *
  • *
*/ private String mfaConfiguration; /** *

* Device configuration. *

*/ private DeviceConfigurationType deviceConfiguration; /** *

* Email configuration. *

*/ private EmailConfigurationType emailConfiguration; /** *

* SMS configuration. *

*/ private SmsConfigurationType smsConfiguration; /** *

* The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage * user pools in different ways, such as by purpose, owner, environment, or other criteria. *

*/ private java.util.Map userPoolTags; /** *

* The configuration for AdminCreateUser requests. *

*/ private AdminCreateUserConfigType adminCreateUserConfig; /** *

* Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value * "AUDIT". *

*/ private UserPoolAddOnsType userPoolAddOns; /** *

* Use this setting to define which verified available method a user can use to recover their password when they * call ForgotPassword. It allows you to define a preferred method when a user has more than one method * available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has * SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery * method where SMS is preferred over email. *

*/ private AccountRecoverySettingType accountRecoverySetting; /** *

* The user pool ID for the user pool you want to update. *

* * @param userPoolId * The user pool ID for the user pool you want to update. */ public void setUserPoolId(String userPoolId) { this.userPoolId = userPoolId; } /** *

* The user pool ID for the user pool you want to update. *

* * @return The user pool ID for the user pool you want to update. */ public String getUserPoolId() { return this.userPoolId; } /** *

* The user pool ID for the user pool you want to update. *

* * @param userPoolId * The user pool ID for the user pool you want to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withUserPoolId(String userPoolId) { setUserPoolId(userPoolId); return this; } /** *

* A container with the policies you wish to update in a user pool. *

* * @param policies * A container with the policies you wish to update in a user pool. */ public void setPolicies(UserPoolPolicyType policies) { this.policies = policies; } /** *

* A container with the policies you wish to update in a user pool. *

* * @return A container with the policies you wish to update in a user pool. */ public UserPoolPolicyType getPolicies() { return this.policies; } /** *

* A container with the policies you wish to update in a user pool. *

* * @param policies * A container with the policies you wish to update in a user pool. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withPolicies(UserPoolPolicyType policies) { setPolicies(policies); return this; } /** *

* The AWS Lambda configuration information from the request to update the user pool. *

* * @param lambdaConfig * The AWS Lambda configuration information from the request to update the user pool. */ public void setLambdaConfig(LambdaConfigType lambdaConfig) { this.lambdaConfig = lambdaConfig; } /** *

* The AWS Lambda configuration information from the request to update the user pool. *

* * @return The AWS Lambda configuration information from the request to update the user pool. */ public LambdaConfigType getLambdaConfig() { return this.lambdaConfig; } /** *

* The AWS Lambda configuration information from the request to update the user pool. *

* * @param lambdaConfig * The AWS Lambda configuration information from the request to update the user pool. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withLambdaConfig(LambdaConfigType lambdaConfig) { setLambdaConfig(lambdaConfig); return this; } /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

* * @return The attributes that are automatically verified when the Amazon Cognito service makes a request to update * user pools. * @see VerifiedAttributeType */ public java.util.List getAutoVerifiedAttributes() { return autoVerifiedAttributes; } /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

* * @param autoVerifiedAttributes * The attributes that are automatically verified when the Amazon Cognito service makes a request to update * user pools. * @see VerifiedAttributeType */ public void setAutoVerifiedAttributes(java.util.Collection autoVerifiedAttributes) { if (autoVerifiedAttributes == null) { this.autoVerifiedAttributes = null; return; } this.autoVerifiedAttributes = new java.util.ArrayList(autoVerifiedAttributes); } /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAutoVerifiedAttributes(java.util.Collection)} or * {@link #withAutoVerifiedAttributes(java.util.Collection)} if you want to override the existing values. *

* * @param autoVerifiedAttributes * The attributes that are automatically verified when the Amazon Cognito service makes a request to update * user pools. * @return Returns a reference to this object so that method calls can be chained together. * @see VerifiedAttributeType */ public UpdateUserPoolRequest withAutoVerifiedAttributes(String... autoVerifiedAttributes) { if (this.autoVerifiedAttributes == null) { setAutoVerifiedAttributes(new java.util.ArrayList(autoVerifiedAttributes.length)); } for (String ele : autoVerifiedAttributes) { this.autoVerifiedAttributes.add(ele); } return this; } /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

* * @param autoVerifiedAttributes * The attributes that are automatically verified when the Amazon Cognito service makes a request to update * user pools. * @return Returns a reference to this object so that method calls can be chained together. * @see VerifiedAttributeType */ public UpdateUserPoolRequest withAutoVerifiedAttributes(java.util.Collection autoVerifiedAttributes) { setAutoVerifiedAttributes(autoVerifiedAttributes); return this; } /** *

* The attributes that are automatically verified when the Amazon Cognito service makes a request to update user * pools. *

* * @param autoVerifiedAttributes * The attributes that are automatically verified when the Amazon Cognito service makes a request to update * user pools. * @return Returns a reference to this object so that method calls can be chained together. * @see VerifiedAttributeType */ public UpdateUserPoolRequest withAutoVerifiedAttributes(VerifiedAttributeType... autoVerifiedAttributes) { java.util.ArrayList autoVerifiedAttributesCopy = new java.util.ArrayList(autoVerifiedAttributes.length); for (VerifiedAttributeType value : autoVerifiedAttributes) { autoVerifiedAttributesCopy.add(value.toString()); } if (getAutoVerifiedAttributes() == null) { setAutoVerifiedAttributes(autoVerifiedAttributesCopy); } else { getAutoVerifiedAttributes().addAll(autoVerifiedAttributesCopy); } return this; } /** *

* A container with information about the SMS verification message. *

* * @param smsVerificationMessage * A container with information about the SMS verification message. */ public void setSmsVerificationMessage(String smsVerificationMessage) { this.smsVerificationMessage = smsVerificationMessage; } /** *

* A container with information about the SMS verification message. *

* * @return A container with information about the SMS verification message. */ public String getSmsVerificationMessage() { return this.smsVerificationMessage; } /** *

* A container with information about the SMS verification message. *

* * @param smsVerificationMessage * A container with information about the SMS verification message. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withSmsVerificationMessage(String smsVerificationMessage) { setSmsVerificationMessage(smsVerificationMessage); return this; } /** *

* The contents of the email verification message. *

* * @param emailVerificationMessage * The contents of the email verification message. */ public void setEmailVerificationMessage(String emailVerificationMessage) { this.emailVerificationMessage = emailVerificationMessage; } /** *

* The contents of the email verification message. *

* * @return The contents of the email verification message. */ public String getEmailVerificationMessage() { return this.emailVerificationMessage; } /** *

* The contents of the email verification message. *

* * @param emailVerificationMessage * The contents of the email verification message. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withEmailVerificationMessage(String emailVerificationMessage) { setEmailVerificationMessage(emailVerificationMessage); return this; } /** *

* The subject of the email verification message. *

* * @param emailVerificationSubject * The subject of the email verification message. */ public void setEmailVerificationSubject(String emailVerificationSubject) { this.emailVerificationSubject = emailVerificationSubject; } /** *

* The subject of the email verification message. *

* * @return The subject of the email verification message. */ public String getEmailVerificationSubject() { return this.emailVerificationSubject; } /** *

* The subject of the email verification message. *

* * @param emailVerificationSubject * The subject of the email verification message. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withEmailVerificationSubject(String emailVerificationSubject) { setEmailVerificationSubject(emailVerificationSubject); return this; } /** *

* The template for verification messages. *

* * @param verificationMessageTemplate * The template for verification messages. */ public void setVerificationMessageTemplate(VerificationMessageTemplateType verificationMessageTemplate) { this.verificationMessageTemplate = verificationMessageTemplate; } /** *

* The template for verification messages. *

* * @return The template for verification messages. */ public VerificationMessageTemplateType getVerificationMessageTemplate() { return this.verificationMessageTemplate; } /** *

* The template for verification messages. *

* * @param verificationMessageTemplate * The template for verification messages. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withVerificationMessageTemplate(VerificationMessageTemplateType verificationMessageTemplate) { setVerificationMessageTemplate(verificationMessageTemplate); return this; } /** *

* The contents of the SMS authentication message. *

* * @param smsAuthenticationMessage * The contents of the SMS authentication message. */ public void setSmsAuthenticationMessage(String smsAuthenticationMessage) { this.smsAuthenticationMessage = smsAuthenticationMessage; } /** *

* The contents of the SMS authentication message. *

* * @return The contents of the SMS authentication message. */ public String getSmsAuthenticationMessage() { return this.smsAuthenticationMessage; } /** *

* The contents of the SMS authentication message. *

* * @param smsAuthenticationMessage * The contents of the SMS authentication message. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withSmsAuthenticationMessage(String smsAuthenticationMessage) { setSmsAuthenticationMessage(smsAuthenticationMessage); return this; } /** *

* Can be one of the following values: *

*
    *
  • *

    * OFF - MFA tokens are not required and cannot be specified during user registration. *

    *
  • *
  • *

    * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

    *
  • *
  • *

    * OPTIONAL - Users have the option when registering to create an MFA token. *

    *
  • *
* * @param mfaConfiguration * Can be one of the following values:

*
    *
  • *

    * OFF - MFA tokens are not required and cannot be specified during user registration. *

    *
  • *
  • *

    * ON - MFA tokens are required for all user registrations. You can only specify required when * you are initially creating a user pool. *

    *
  • *
  • *

    * OPTIONAL - Users have the option when registering to create an MFA token. *

    *
  • * @see UserPoolMfaType */ public void setMfaConfiguration(String mfaConfiguration) { this.mfaConfiguration = mfaConfiguration; } /** *

    * Can be one of the following values: *

    *
      *
    • *

      * OFF - MFA tokens are not required and cannot be specified during user registration. *

      *
    • *
    • *

      * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

      *
    • *
    • *

      * OPTIONAL - Users have the option when registering to create an MFA token. *

      *
    • *
    * * @return Can be one of the following values:

    *
      *
    • *

      * OFF - MFA tokens are not required and cannot be specified during user registration. *

      *
    • *
    • *

      * ON - MFA tokens are required for all user registrations. You can only specify required when * you are initially creating a user pool. *

      *
    • *
    • *

      * OPTIONAL - Users have the option when registering to create an MFA token. *

      *
    • * @see UserPoolMfaType */ public String getMfaConfiguration() { return this.mfaConfiguration; } /** *

      * Can be one of the following values: *

      *
        *
      • *

        * OFF - MFA tokens are not required and cannot be specified during user registration. *

        *
      • *
      • *

        * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

        *
      • *
      • *

        * OPTIONAL - Users have the option when registering to create an MFA token. *

        *
      • *
      * * @param mfaConfiguration * Can be one of the following values:

      *
        *
      • *

        * OFF - MFA tokens are not required and cannot be specified during user registration. *

        *
      • *
      • *

        * ON - MFA tokens are required for all user registrations. You can only specify required when * you are initially creating a user pool. *

        *
      • *
      • *

        * OPTIONAL - Users have the option when registering to create an MFA token. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see UserPoolMfaType */ public UpdateUserPoolRequest withMfaConfiguration(String mfaConfiguration) { setMfaConfiguration(mfaConfiguration); return this; } /** *

        * Can be one of the following values: *

        *
          *
        • *

          * OFF - MFA tokens are not required and cannot be specified during user registration. *

          *
        • *
        • *

          * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

          *
        • *
        • *

          * OPTIONAL - Users have the option when registering to create an MFA token. *

          *
        • *
        * * @param mfaConfiguration * Can be one of the following values:

        *
          *
        • *

          * OFF - MFA tokens are not required and cannot be specified during user registration. *

          *
        • *
        • *

          * ON - MFA tokens are required for all user registrations. You can only specify required when * you are initially creating a user pool. *

          *
        • *
        • *

          * OPTIONAL - Users have the option when registering to create an MFA token. *

          *
        • * @see UserPoolMfaType */ public void setMfaConfiguration(UserPoolMfaType mfaConfiguration) { withMfaConfiguration(mfaConfiguration); } /** *

          * Can be one of the following values: *

          *
            *
          • *

            * OFF - MFA tokens are not required and cannot be specified during user registration. *

            *
          • *
          • *

            * ON - MFA tokens are required for all user registrations. You can only specify required when you are * initially creating a user pool. *

            *
          • *
          • *

            * OPTIONAL - Users have the option when registering to create an MFA token. *

            *
          • *
          * * @param mfaConfiguration * Can be one of the following values:

          *
            *
          • *

            * OFF - MFA tokens are not required and cannot be specified during user registration. *

            *
          • *
          • *

            * ON - MFA tokens are required for all user registrations. You can only specify required when * you are initially creating a user pool. *

            *
          • *
          • *

            * OPTIONAL - Users have the option when registering to create an MFA token. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see UserPoolMfaType */ public UpdateUserPoolRequest withMfaConfiguration(UserPoolMfaType mfaConfiguration) { this.mfaConfiguration = mfaConfiguration.toString(); return this; } /** *

            * Device configuration. *

            * * @param deviceConfiguration * Device configuration. */ public void setDeviceConfiguration(DeviceConfigurationType deviceConfiguration) { this.deviceConfiguration = deviceConfiguration; } /** *

            * Device configuration. *

            * * @return Device configuration. */ public DeviceConfigurationType getDeviceConfiguration() { return this.deviceConfiguration; } /** *

            * Device configuration. *

            * * @param deviceConfiguration * Device configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withDeviceConfiguration(DeviceConfigurationType deviceConfiguration) { setDeviceConfiguration(deviceConfiguration); return this; } /** *

            * Email configuration. *

            * * @param emailConfiguration * Email configuration. */ public void setEmailConfiguration(EmailConfigurationType emailConfiguration) { this.emailConfiguration = emailConfiguration; } /** *

            * Email configuration. *

            * * @return Email configuration. */ public EmailConfigurationType getEmailConfiguration() { return this.emailConfiguration; } /** *

            * Email configuration. *

            * * @param emailConfiguration * Email configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withEmailConfiguration(EmailConfigurationType emailConfiguration) { setEmailConfiguration(emailConfiguration); return this; } /** *

            * SMS configuration. *

            * * @param smsConfiguration * SMS configuration. */ public void setSmsConfiguration(SmsConfigurationType smsConfiguration) { this.smsConfiguration = smsConfiguration; } /** *

            * SMS configuration. *

            * * @return SMS configuration. */ public SmsConfigurationType getSmsConfiguration() { return this.smsConfiguration; } /** *

            * SMS configuration. *

            * * @param smsConfiguration * SMS configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withSmsConfiguration(SmsConfigurationType smsConfiguration) { setSmsConfiguration(smsConfiguration); return this; } /** *

            * The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage * user pools in different ways, such as by purpose, owner, environment, or other criteria. *

            * * @return The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and * manage user pools in different ways, such as by purpose, owner, environment, or other criteria. */ public java.util.Map getUserPoolTags() { return userPoolTags; } /** *

            * The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage * user pools in different ways, such as by purpose, owner, environment, or other criteria. *

            * * @param userPoolTags * The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and * manage user pools in different ways, such as by purpose, owner, environment, or other criteria. */ public void setUserPoolTags(java.util.Map userPoolTags) { this.userPoolTags = userPoolTags; } /** *

            * The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage * user pools in different ways, such as by purpose, owner, environment, or other criteria. *

            * * @param userPoolTags * The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and * manage user pools in different ways, such as by purpose, owner, environment, or other criteria. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withUserPoolTags(java.util.Map userPoolTags) { setUserPoolTags(userPoolTags); return this; } /** * Add a single UserPoolTags entry * * @see UpdateUserPoolRequest#withUserPoolTags * @returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest addUserPoolTagsEntry(String key, String value) { if (null == this.userPoolTags) { this.userPoolTags = new java.util.HashMap(); } if (this.userPoolTags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.userPoolTags.put(key, value); return this; } /** * Removes all the entries added into UserPoolTags. * * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest clearUserPoolTagsEntries() { this.userPoolTags = null; return this; } /** *

            * The configuration for AdminCreateUser requests. *

            * * @param adminCreateUserConfig * The configuration for AdminCreateUser requests. */ public void setAdminCreateUserConfig(AdminCreateUserConfigType adminCreateUserConfig) { this.adminCreateUserConfig = adminCreateUserConfig; } /** *

            * The configuration for AdminCreateUser requests. *

            * * @return The configuration for AdminCreateUser requests. */ public AdminCreateUserConfigType getAdminCreateUserConfig() { return this.adminCreateUserConfig; } /** *

            * The configuration for AdminCreateUser requests. *

            * * @param adminCreateUserConfig * The configuration for AdminCreateUser requests. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withAdminCreateUserConfig(AdminCreateUserConfigType adminCreateUserConfig) { setAdminCreateUserConfig(adminCreateUserConfig); return this; } /** *

            * Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value * "AUDIT". *

            * * @param userPoolAddOns * Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the * value "AUDIT". */ public void setUserPoolAddOns(UserPoolAddOnsType userPoolAddOns) { this.userPoolAddOns = userPoolAddOns; } /** *

            * Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value * "AUDIT". *

            * * @return Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the * value "AUDIT". */ public UserPoolAddOnsType getUserPoolAddOns() { return this.userPoolAddOns; } /** *

            * Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value * "AUDIT". *

            * * @param userPoolAddOns * Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the * value "AUDIT". * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withUserPoolAddOns(UserPoolAddOnsType userPoolAddOns) { setUserPoolAddOns(userPoolAddOns); return this; } /** *

            * Use this setting to define which verified available method a user can use to recover their password when they * call ForgotPassword. It allows you to define a preferred method when a user has more than one method * available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has * SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery * method where SMS is preferred over email. *

            * * @param accountRecoverySetting * Use this setting to define which verified available method a user can use to recover their password when * they call ForgotPassword. It allows you to define a preferred method when a user has more * than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism * if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to * determine the recovery method where SMS is preferred over email. */ public void setAccountRecoverySetting(AccountRecoverySettingType accountRecoverySetting) { this.accountRecoverySetting = accountRecoverySetting; } /** *

            * Use this setting to define which verified available method a user can use to recover their password when they * call ForgotPassword. It allows you to define a preferred method when a user has more than one method * available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has * SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery * method where SMS is preferred over email. *

            * * @return Use this setting to define which verified available method a user can use to recover their password when * they call ForgotPassword. It allows you to define a preferred method when a user has more * than one method available. With this setting, SMS does not qualify for a valid password recovery * mechanism if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy * behavior to determine the recovery method where SMS is preferred over email. */ public AccountRecoverySettingType getAccountRecoverySetting() { return this.accountRecoverySetting; } /** *

            * Use this setting to define which verified available method a user can use to recover their password when they * call ForgotPassword. It allows you to define a preferred method when a user has more than one method * available. With this setting, SMS does not qualify for a valid password recovery mechanism if the user also has * SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to determine the recovery * method where SMS is preferred over email. *

            * * @param accountRecoverySetting * Use this setting to define which verified available method a user can use to recover their password when * they call ForgotPassword. It allows you to define a preferred method when a user has more * than one method available. With this setting, SMS does not qualify for a valid password recovery mechanism * if the user also has SMS MFA enabled. In the absence of this setting, Cognito uses the legacy behavior to * determine the recovery method where SMS is preferred over email. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateUserPoolRequest withAccountRecoverySetting(AccountRecoverySettingType accountRecoverySetting) { setAccountRecoverySetting(accountRecoverySetting); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getUserPoolId() != null) sb.append("UserPoolId: ").append(getUserPoolId()).append(","); if (getPolicies() != null) sb.append("Policies: ").append(getPolicies()).append(","); if (getLambdaConfig() != null) sb.append("LambdaConfig: ").append(getLambdaConfig()).append(","); if (getAutoVerifiedAttributes() != null) sb.append("AutoVerifiedAttributes: ").append(getAutoVerifiedAttributes()).append(","); if (getSmsVerificationMessage() != null) sb.append("SmsVerificationMessage: ").append(getSmsVerificationMessage()).append(","); if (getEmailVerificationMessage() != null) sb.append("EmailVerificationMessage: ").append(getEmailVerificationMessage()).append(","); if (getEmailVerificationSubject() != null) sb.append("EmailVerificationSubject: ").append(getEmailVerificationSubject()).append(","); if (getVerificationMessageTemplate() != null) sb.append("VerificationMessageTemplate: ").append(getVerificationMessageTemplate()).append(","); if (getSmsAuthenticationMessage() != null) sb.append("SmsAuthenticationMessage: ").append(getSmsAuthenticationMessage()).append(","); if (getMfaConfiguration() != null) sb.append("MfaConfiguration: ").append(getMfaConfiguration()).append(","); if (getDeviceConfiguration() != null) sb.append("DeviceConfiguration: ").append(getDeviceConfiguration()).append(","); if (getEmailConfiguration() != null) sb.append("EmailConfiguration: ").append(getEmailConfiguration()).append(","); if (getSmsConfiguration() != null) sb.append("SmsConfiguration: ").append(getSmsConfiguration()).append(","); if (getUserPoolTags() != null) sb.append("UserPoolTags: ").append(getUserPoolTags()).append(","); if (getAdminCreateUserConfig() != null) sb.append("AdminCreateUserConfig: ").append(getAdminCreateUserConfig()).append(","); if (getUserPoolAddOns() != null) sb.append("UserPoolAddOns: ").append(getUserPoolAddOns()).append(","); if (getAccountRecoverySetting() != null) sb.append("AccountRecoverySetting: ").append(getAccountRecoverySetting()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateUserPoolRequest == false) return false; UpdateUserPoolRequest other = (UpdateUserPoolRequest) obj; if (other.getUserPoolId() == null ^ this.getUserPoolId() == null) return false; if (other.getUserPoolId() != null && other.getUserPoolId().equals(this.getUserPoolId()) == false) return false; if (other.getPolicies() == null ^ this.getPolicies() == null) return false; if (other.getPolicies() != null && other.getPolicies().equals(this.getPolicies()) == false) return false; if (other.getLambdaConfig() == null ^ this.getLambdaConfig() == null) return false; if (other.getLambdaConfig() != null && other.getLambdaConfig().equals(this.getLambdaConfig()) == false) return false; if (other.getAutoVerifiedAttributes() == null ^ this.getAutoVerifiedAttributes() == null) return false; if (other.getAutoVerifiedAttributes() != null && other.getAutoVerifiedAttributes().equals(this.getAutoVerifiedAttributes()) == false) return false; if (other.getSmsVerificationMessage() == null ^ this.getSmsVerificationMessage() == null) return false; if (other.getSmsVerificationMessage() != null && other.getSmsVerificationMessage().equals(this.getSmsVerificationMessage()) == false) return false; if (other.getEmailVerificationMessage() == null ^ this.getEmailVerificationMessage() == null) return false; if (other.getEmailVerificationMessage() != null && other.getEmailVerificationMessage().equals(this.getEmailVerificationMessage()) == false) return false; if (other.getEmailVerificationSubject() == null ^ this.getEmailVerificationSubject() == null) return false; if (other.getEmailVerificationSubject() != null && other.getEmailVerificationSubject().equals(this.getEmailVerificationSubject()) == false) return false; if (other.getVerificationMessageTemplate() == null ^ this.getVerificationMessageTemplate() == null) return false; if (other.getVerificationMessageTemplate() != null && other.getVerificationMessageTemplate().equals(this.getVerificationMessageTemplate()) == false) return false; if (other.getSmsAuthenticationMessage() == null ^ this.getSmsAuthenticationMessage() == null) return false; if (other.getSmsAuthenticationMessage() != null && other.getSmsAuthenticationMessage().equals(this.getSmsAuthenticationMessage()) == false) return false; if (other.getMfaConfiguration() == null ^ this.getMfaConfiguration() == null) return false; if (other.getMfaConfiguration() != null && other.getMfaConfiguration().equals(this.getMfaConfiguration()) == false) return false; if (other.getDeviceConfiguration() == null ^ this.getDeviceConfiguration() == null) return false; if (other.getDeviceConfiguration() != null && other.getDeviceConfiguration().equals(this.getDeviceConfiguration()) == false) return false; if (other.getEmailConfiguration() == null ^ this.getEmailConfiguration() == null) return false; if (other.getEmailConfiguration() != null && other.getEmailConfiguration().equals(this.getEmailConfiguration()) == false) return false; if (other.getSmsConfiguration() == null ^ this.getSmsConfiguration() == null) return false; if (other.getSmsConfiguration() != null && other.getSmsConfiguration().equals(this.getSmsConfiguration()) == false) return false; if (other.getUserPoolTags() == null ^ this.getUserPoolTags() == null) return false; if (other.getUserPoolTags() != null && other.getUserPoolTags().equals(this.getUserPoolTags()) == false) return false; if (other.getAdminCreateUserConfig() == null ^ this.getAdminCreateUserConfig() == null) return false; if (other.getAdminCreateUserConfig() != null && other.getAdminCreateUserConfig().equals(this.getAdminCreateUserConfig()) == false) return false; if (other.getUserPoolAddOns() == null ^ this.getUserPoolAddOns() == null) return false; if (other.getUserPoolAddOns() != null && other.getUserPoolAddOns().equals(this.getUserPoolAddOns()) == false) return false; if (other.getAccountRecoverySetting() == null ^ this.getAccountRecoverySetting() == null) return false; if (other.getAccountRecoverySetting() != null && other.getAccountRecoverySetting().equals(this.getAccountRecoverySetting()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserPoolId() == null) ? 0 : getUserPoolId().hashCode()); hashCode = prime * hashCode + ((getPolicies() == null) ? 0 : getPolicies().hashCode()); hashCode = prime * hashCode + ((getLambdaConfig() == null) ? 0 : getLambdaConfig().hashCode()); hashCode = prime * hashCode + ((getAutoVerifiedAttributes() == null) ? 0 : getAutoVerifiedAttributes().hashCode()); hashCode = prime * hashCode + ((getSmsVerificationMessage() == null) ? 0 : getSmsVerificationMessage().hashCode()); hashCode = prime * hashCode + ((getEmailVerificationMessage() == null) ? 0 : getEmailVerificationMessage().hashCode()); hashCode = prime * hashCode + ((getEmailVerificationSubject() == null) ? 0 : getEmailVerificationSubject().hashCode()); hashCode = prime * hashCode + ((getVerificationMessageTemplate() == null) ? 0 : getVerificationMessageTemplate().hashCode()); hashCode = prime * hashCode + ((getSmsAuthenticationMessage() == null) ? 0 : getSmsAuthenticationMessage().hashCode()); hashCode = prime * hashCode + ((getMfaConfiguration() == null) ? 0 : getMfaConfiguration().hashCode()); hashCode = prime * hashCode + ((getDeviceConfiguration() == null) ? 0 : getDeviceConfiguration().hashCode()); hashCode = prime * hashCode + ((getEmailConfiguration() == null) ? 0 : getEmailConfiguration().hashCode()); hashCode = prime * hashCode + ((getSmsConfiguration() == null) ? 0 : getSmsConfiguration().hashCode()); hashCode = prime * hashCode + ((getUserPoolTags() == null) ? 0 : getUserPoolTags().hashCode()); hashCode = prime * hashCode + ((getAdminCreateUserConfig() == null) ? 0 : getAdminCreateUserConfig().hashCode()); hashCode = prime * hashCode + ((getUserPoolAddOns() == null) ? 0 : getUserPoolAddOns().hashCode()); hashCode = prime * hashCode + ((getAccountRecoverySetting() == null) ? 0 : getAccountRecoverySetting().hashCode()); return hashCode; } @Override public UpdateUserPoolRequest clone() { return (UpdateUserPoolRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy