/** * <p> * Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk * of an unexpected event by Amazon Cognito advanced security. * </p> * This is a convenience that creates an instance of the {@link ContextDataType.Builder} avoiding the need to * create one manually via {@link ContextDataType#builder()}. * * When the {@link Consumer} completes, {@link ContextDataType.Builder#build()} is called immediately and its * result is passed to {@link #contextData(ContextDataType)}. * * @param contextData * a consumer that will call methods on {@link ContextDataType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #contextData(ContextDataType) */ default Builder contextData(Consumer<ContextDataType.Builder> contextData) { return contextData(ContextDataType.builder().applyMutation(contextData).build()); }