   (status [this] "Returns the current state object.")
   (to-ready [this] "Returns a new ready state.")
   (to-loading [this] "Returns a new loading-state.")
-  (to-updating [this] "Returns a new updating-state.")
   (to-failed [this msg] "Returns a new failed state.")
   (to-shutdown [this] "Returns a new shutting-down state."))
 

(extend-type DomainStatus
  IStatus
  (loading? [status]
    (= (.getSetField status) DomainStatus$_Fields/LOADING))
  
  (ready? [status]
    (= (.getSetField status) DomainStatus$_Fields/READY))

  (updating? [status]
    (boolean
     (and (ready? status)
          (.get_update_status (.get_ready status)))))
 
  (failed? [status]
    (= (.getSetField status) DomainStatus$_Fields/FAILED))

  (status [state] state)
  (to-loading [state] (t/loading-status))
  (to-ready [state] (t/ready-status))
  (to-failed [state msg] (t/failed-status msg))
  (to-shutdown [state] (t/shutdown-status)))
