package com.airlock.iam.oauth2.domain.model.resource;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.HashMap;
import java.util.Map;

public final class OAuth2ResourceResult {
   private final Map<String, Object> map = new HashMap<>();

   private OAuth2ResourceResult() {
   }

   public static OAuth2ResourceResult resourceResult() {
      return new OAuth2ResourceResult();
   }

   public OAuth2ResourceResult add(OAuth2ResourceIdentifier key, Object value) {
      this.map.put(key.getId(), value);
      return this;
   }

   public OAuth2ResourceResult merge(OAuth2ResourceResult other) {
      this.map.putAll(other.map);
      return this;
   }

   public boolean isEmpty() {
      return this.map.isEmpty();
   }

   @SuppressFBWarnings(justification = "generated code")
   public Map<String, Object> getMap() {
      return this.map;
   }
}
