public Component addEventsEntry(String key, ComponentEvent value) {
        if (null == this.events) {
            this.events = new java.util.HashMap<String, ComponentEvent>();
        }
        if (this.events.containsKey(key))
            throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
        this.events.put(key, value);
        return this;
    }
Add a single Events entry

@see Component#withEvents
@returns a reference to this object so that method calls can be chained together.
aws-java-sdk-amplifyuibuilder/src/main/java/com/amazonaws/services/amplifyuibuilder/model/Component.java