   builder)
 
 (defn map->hive
-  [{:keys [result-key->enum
+  [{:keys [result-class
            result-metrics
            result-latency
            back-pressure
-           rejected-key->enum
+           rejected-class
            rejected-metrics]}]
   (let [builder (-> (GuardRailBuilder.)
                     (.name name)


;; Explore

(defn beehive
  ([name results-map] (beehive name results-map nil))
  ([name
    {:keys [result-key->enum result-metrics latency-metrics]}
    {:keys [rejected-key->enum rejected-metrics back-pressure]}]
   (let [rejected-metrics1 (or rejected-metrics (metrics/no-op-metrics))
         builder (-> (GuardRailBuilder.)
                     (.name name)
                     (.addResultMetrics (:precipice-metrics (meta result-metrics)))
                     (.addRejectedMetrics (:precipice-metrics (meta rejected-metrics1)))
                     (cond->
                       latency-metrics
                       (.addResultLatency (:precipice-metrics (meta latency-metrics)))
                       back-pressure
                       (add-bp back-pressure)))]
     (cond-> {:name name
              :result-metrics result-metrics
              :result-key->enum result-key->enum
              :guard-rail (.build ^GuardRailBuilder builder)}
             rejected-metrics1
             (assoc :rejected-metrics rejected-metrics1)
             rejected-key->enum
             (assoc :rejected-key->enum rejected-key->enum)
             latency-metrics
             (assoc :latency-metrics latency-metrics)
             back-pressure
             (assoc :back-pressure back-pressure)))))

;{:name ""
; :result-key->enum {}
; :result-metrics []

                    (add-rejected-metrics rejected-metrics)
                    (add-bp back-pressure))]
    {:name name
     :result-key->enum (enums/enum-class-to-keyword->enum result-class)
     :result-metrics (or result-metrics [])
     :result-latency (or result-latency [])
     :rejected-key->enum (enums/enum-class-to-keyword->enum rejected-class)
     :rejected-metrics (or rejected-metrics [])
     :back-pressure (or back-pressure [])
     :guard-rail (.build ^GuardRailBuilder builder)}))
