package software.amazon.rds.dbcluster; import java.util.HashMap; import java.util.Map; import org.json.JSONObject; import org.json.JSONTokener; import com.amazonaws.util.CollectionUtils; public class Configuration extends BaseConfiguration { public Configuration() { super("aws-rds-dbcluster.json"); } public JSONObject resourceSchemaJsonObject() { return new JSONObject( new JSONTokener(this.getClass().getClassLoader().getResourceAsStream(schemaFilename))); } public Map resourceDefinedTags(final ResourceModel model) { if (CollectionUtils.isNullOrEmpty(model.getTags())) { return null; } final Map tagMap = new HashMap<>(); for (final Tag tag : model.getTags()) { tagMap.put(tag.getKey(), tag.getValue()); } return tagMap; } }