public TypedLinkAttributeDefinition addRulesEntry(String key, Rule value) {
        if (null == this.rules) {
            this.rules = new java.util.HashMap<String, Rule>();
        }
        if (this.rules.containsKey(key))
            throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
        this.rules.put(key, value);
        return this;
    }
Add a single Rules entry

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