{-# LANGUAGE DeriveAnyClass #-} module Hercules.API.Agent.Socket.ServicePayload where import Hercules.API.Agent.Build.BuildTask (BuildTask) import Hercules.API.Agent.Effect.EffectTask (EffectTask) import Hercules.API.Agent.Evaluate.EvaluateTask (EvaluateTask) import Hercules.API.Agent.LifeCycle.ServiceInfo (ServiceInfo) import Hercules.API.Prelude import Hercules.API.Task data Cancel = MkCancel {Cancel -> Id (Task Any) taskId :: Id (Task Any)} deriving ((forall x. Cancel -> Rep Cancel x) -> (forall x. Rep Cancel x -> Cancel) -> Generic Cancel forall x. Rep Cancel x -> Cancel forall x. Cancel -> Rep Cancel x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. Cancel -> Rep Cancel x from :: forall x. Cancel -> Rep Cancel x $cto :: forall x. Rep Cancel x -> Cancel to :: forall x. Rep Cancel x -> Cancel Generic, Int -> Cancel -> ShowS [Cancel] -> ShowS Cancel -> String (Int -> Cancel -> ShowS) -> (Cancel -> String) -> ([Cancel] -> ShowS) -> Show Cancel forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> Cancel -> ShowS showsPrec :: Int -> Cancel -> ShowS $cshow :: Cancel -> String show :: Cancel -> String $cshowList :: [Cancel] -> ShowS showList :: [Cancel] -> ShowS Show, Cancel -> Cancel -> Bool (Cancel -> Cancel -> Bool) -> (Cancel -> Cancel -> Bool) -> Eq Cancel forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: Cancel -> Cancel -> Bool == :: Cancel -> Cancel -> Bool $c/= :: Cancel -> Cancel -> Bool /= :: Cancel -> Cancel -> Bool Eq, Cancel -> () (Cancel -> ()) -> NFData Cancel forall a. (a -> ()) -> NFData a $crnf :: Cancel -> () rnf :: Cancel -> () NFData, [Cancel] -> Value [Cancel] -> Encoding Cancel -> Value Cancel -> Encoding (Cancel -> Value) -> (Cancel -> Encoding) -> ([Cancel] -> Value) -> ([Cancel] -> Encoding) -> ToJSON Cancel forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> ToJSON a $ctoJSON :: Cancel -> Value toJSON :: Cancel -> Value $ctoEncoding :: Cancel -> Encoding toEncoding :: Cancel -> Encoding $ctoJSONList :: [Cancel] -> Value toJSONList :: [Cancel] -> Value $ctoEncodingList :: [Cancel] -> Encoding toEncodingList :: [Cancel] -> Encoding ToJSON, Value -> Parser [Cancel] Value -> Parser Cancel (Value -> Parser Cancel) -> (Value -> Parser [Cancel]) -> FromJSON Cancel forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a $cparseJSON :: Value -> Parser Cancel parseJSON :: Value -> Parser Cancel $cparseJSONList :: Value -> Parser [Cancel] parseJSONList :: Value -> Parser [Cancel] FromJSON) data ServicePayload = ServiceInfo ServiceInfo | StartEvaluation EvaluateTask | StartBuild BuildTask | StartEffect EffectTask | Cancel Cancel deriving ((forall x. ServicePayload -> Rep ServicePayload x) -> (forall x. Rep ServicePayload x -> ServicePayload) -> Generic ServicePayload forall x. Rep ServicePayload x -> ServicePayload forall x. ServicePayload -> Rep ServicePayload x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cfrom :: forall x. ServicePayload -> Rep ServicePayload x from :: forall x. ServicePayload -> Rep ServicePayload x $cto :: forall x. Rep ServicePayload x -> ServicePayload to :: forall x. Rep ServicePayload x -> ServicePayload Generic, Int -> ServicePayload -> ShowS [ServicePayload] -> ShowS ServicePayload -> String (Int -> ServicePayload -> ShowS) -> (ServicePayload -> String) -> ([ServicePayload] -> ShowS) -> Show ServicePayload forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> ServicePayload -> ShowS showsPrec :: Int -> ServicePayload -> ShowS $cshow :: ServicePayload -> String show :: ServicePayload -> String $cshowList :: [ServicePayload] -> ShowS showList :: [ServicePayload] -> ShowS Show, ServicePayload -> ServicePayload -> Bool (ServicePayload -> ServicePayload -> Bool) -> (ServicePayload -> ServicePayload -> Bool) -> Eq ServicePayload forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: ServicePayload -> ServicePayload -> Bool == :: ServicePayload -> ServicePayload -> Bool $c/= :: ServicePayload -> ServicePayload -> Bool /= :: ServicePayload -> ServicePayload -> Bool Eq, ServicePayload -> () (ServicePayload -> ()) -> NFData ServicePayload forall a. (a -> ()) -> NFData a $crnf :: ServicePayload -> () rnf :: ServicePayload -> () NFData, [ServicePayload] -> Value [ServicePayload] -> Encoding ServicePayload -> Value ServicePayload -> Encoding (ServicePayload -> Value) -> (ServicePayload -> Encoding) -> ([ServicePayload] -> Value) -> ([ServicePayload] -> Encoding) -> ToJSON ServicePayload forall a. (a -> Value) -> (a -> Encoding) -> ([a] -> Value) -> ([a] -> Encoding) -> ToJSON a $ctoJSON :: ServicePayload -> Value toJSON :: ServicePayload -> Value $ctoEncoding :: ServicePayload -> Encoding toEncoding :: ServicePayload -> Encoding $ctoJSONList :: [ServicePayload] -> Value toJSONList :: [ServicePayload] -> Value $ctoEncodingList :: [ServicePayload] -> Encoding toEncodingList :: [ServicePayload] -> Encoding ToJSON, Value -> Parser [ServicePayload] Value -> Parser ServicePayload (Value -> Parser ServicePayload) -> (Value -> Parser [ServicePayload]) -> FromJSON ServicePayload forall a. (Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a $cparseJSON :: Value -> Parser ServicePayload parseJSON :: Value -> Parser ServicePayload $cparseJSONList :: Value -> Parser [ServicePayload] parseJSONList :: Value -> Parser [ServicePayload] FromJSON)