class RuleExecutionUtils {

    public static Map<String, String> getLocalRuleParam(Map<String, String> ruleParam, Map<String, String> resource) {
        Map<String, String> localRuleParam = new HashMap<>();
        localRuleParam.putAll(ruleParam);
        localRuleParam.put(PacmanSdkConstants.RESOURCE_ID, resource.get(PacmanSdkConstants.RESOURCE_ID));
        if (null != resource.get(PacmanSdkConstants.ACCOUNT_ID))
            localRuleParam.put(PacmanSdkConstants.ACCOUNT_ID, resource.get(PacmanSdkConstants.ACCOUNT_ID));
        if (null != resource.get(PacmanSdkConstants.ACCOUNT_NAME))
            localRuleParam.put(PacmanSdkConstants.ACCOUNT_NAME, resource.get(PacmanSdkConstants.ACCOUNT_NAME));
        if (null != resource.get(PacmanSdkConstants.REGION))
            localRuleParam.put(PacmanSdkConstants.REGION, resource.get(PacmanSdkConstants.REGION));
        return ImmutableMap.<String, String>builder().putAll(localRuleParam).build();
    }

}