{-# LANGUAGE DataKinds         #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures    #-}

module GitHub.Data.Actions.Artifacts (
    Artifact(..),
    ArtifactWorkflowRun(..),
    ) where

import GitHub.Data.Id          (Id)
import GitHub.Data.URL         (URL)
import GitHub.Internal.Prelude
import Prelude ()

import GitHub.Data.Actions.Common       (WithTotalCount (WithTotalCount))
import GitHub.Data.Actions.WorkflowRuns (WorkflowRun)
import GitHub.Data.Repos                (Repo)

-------------------------------------------------------------------------------
-- Artifact
-------------------------------------------------------------------------------

data ArtifactWorkflowRun  = ArtifactWorkflowRun
    { ArtifactWorkflowRun -> Id WorkflowRun
artifactWorkflowRunWorkflowRunId    :: !(Id WorkflowRun)
    , ArtifactWorkflowRun -> Id Repo
artifactWorkflowRunRepositoryId     :: !(Id Repo)
    , ArtifactWorkflowRun -> Id Repo
artifactWorkflowRunHeadRepositoryId :: !(Id Repo)
    , ArtifactWorkflowRun -> Text
artifactWorkflowRunHeadBranch       :: !Text
    , ArtifactWorkflowRun -> Text
artifactWorkflowRunHeadSha          :: !Text
    }
  deriving (Int -> ArtifactWorkflowRun -> ShowS
[ArtifactWorkflowRun] -> ShowS
ArtifactWorkflowRun -> String
(Int -> ArtifactWorkflowRun -> ShowS)
-> (ArtifactWorkflowRun -> String)
-> ([ArtifactWorkflowRun] -> ShowS)
-> Show ArtifactWorkflowRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ArtifactWorkflowRun -> ShowS
showsPrec :: Int -> ArtifactWorkflowRun -> ShowS
$cshow :: ArtifactWorkflowRun -> String
show :: ArtifactWorkflowRun -> String
$cshowList :: [ArtifactWorkflowRun] -> ShowS
showList :: [ArtifactWorkflowRun] -> ShowS
Show, Typeable ArtifactWorkflowRun
Typeable ArtifactWorkflowRun =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g)
 -> ArtifactWorkflowRun
 -> c ArtifactWorkflowRun)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ArtifactWorkflowRun)
-> (ArtifactWorkflowRun -> Constr)
-> (ArtifactWorkflowRun -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ArtifactWorkflowRun))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ArtifactWorkflowRun))
-> ((forall b. Data b => b -> b)
    -> ArtifactWorkflowRun -> ArtifactWorkflowRun)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> ArtifactWorkflowRun -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ArtifactWorkflowRun -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> ArtifactWorkflowRun -> m ArtifactWorkflowRun)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ArtifactWorkflowRun -> m ArtifactWorkflowRun)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> ArtifactWorkflowRun -> m ArtifactWorkflowRun)
-> Data ArtifactWorkflowRun
ArtifactWorkflowRun -> Constr
ArtifactWorkflowRun -> DataType
(forall b. Data b => b -> b)
-> ArtifactWorkflowRun -> ArtifactWorkflowRun
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ArtifactWorkflowRun -> u
forall u.
(forall d. Data d => d -> u) -> ArtifactWorkflowRun -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArtifactWorkflowRun
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ArtifactWorkflowRun
-> c ArtifactWorkflowRun
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ArtifactWorkflowRun)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ArtifactWorkflowRun)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ArtifactWorkflowRun
-> c ArtifactWorkflowRun
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ArtifactWorkflowRun
-> c ArtifactWorkflowRun
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArtifactWorkflowRun
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ArtifactWorkflowRun
$ctoConstr :: ArtifactWorkflowRun -> Constr
toConstr :: ArtifactWorkflowRun -> Constr
$cdataTypeOf :: ArtifactWorkflowRun -> DataType
dataTypeOf :: ArtifactWorkflowRun -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ArtifactWorkflowRun)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ArtifactWorkflowRun)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ArtifactWorkflowRun)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ArtifactWorkflowRun)
$cgmapT :: (forall b. Data b => b -> b)
-> ArtifactWorkflowRun -> ArtifactWorkflowRun
gmapT :: (forall b. Data b => b -> b)
-> ArtifactWorkflowRun -> ArtifactWorkflowRun
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ArtifactWorkflowRun -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> ArtifactWorkflowRun -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ArtifactWorkflowRun -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ArtifactWorkflowRun -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ArtifactWorkflowRun -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ArtifactWorkflowRun -> m ArtifactWorkflowRun
Data, Typeable, ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
(ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> (ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> Eq ArtifactWorkflowRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
== :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
$c/= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
/= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
Eq, Eq ArtifactWorkflowRun
Eq ArtifactWorkflowRun =>
(ArtifactWorkflowRun -> ArtifactWorkflowRun -> Ordering)
-> (ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> (ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> (ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> (ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool)
-> (ArtifactWorkflowRun
    -> ArtifactWorkflowRun -> ArtifactWorkflowRun)
-> (ArtifactWorkflowRun
    -> ArtifactWorkflowRun -> ArtifactWorkflowRun)
-> Ord ArtifactWorkflowRun
ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
ArtifactWorkflowRun -> ArtifactWorkflowRun -> Ordering
ArtifactWorkflowRun -> ArtifactWorkflowRun -> ArtifactWorkflowRun
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Ordering
compare :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Ordering
$c< :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
< :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
$c<= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
<= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
$c> :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
> :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
$c>= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
>= :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> Bool
$cmax :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> ArtifactWorkflowRun
max :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> ArtifactWorkflowRun
$cmin :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> ArtifactWorkflowRun
min :: ArtifactWorkflowRun -> ArtifactWorkflowRun -> ArtifactWorkflowRun
Ord, (forall x. ArtifactWorkflowRun -> Rep ArtifactWorkflowRun x)
-> (forall x. Rep ArtifactWorkflowRun x -> ArtifactWorkflowRun)
-> Generic ArtifactWorkflowRun
forall x. Rep ArtifactWorkflowRun x -> ArtifactWorkflowRun
forall x. ArtifactWorkflowRun -> Rep ArtifactWorkflowRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ArtifactWorkflowRun -> Rep ArtifactWorkflowRun x
from :: forall x. ArtifactWorkflowRun -> Rep ArtifactWorkflowRun x
$cto :: forall x. Rep ArtifactWorkflowRun x -> ArtifactWorkflowRun
to :: forall x. Rep ArtifactWorkflowRun x -> ArtifactWorkflowRun
Generic)

data Artifact = Artifact
    { Artifact -> URL
artifactArchiveDownloadUrl :: !URL
    , Artifact -> UTCTime
artifactCreatedAt          :: !UTCTime
    , Artifact -> Bool
artifactExpired            :: !Bool
    , Artifact -> UTCTime
artifactExpiresAt          :: !UTCTime
    , Artifact -> Id Artifact
artifactId                 :: !(Id Artifact)
    , Artifact -> Text
artifactName               :: !Text
    , Artifact -> Text
artifactNodeId             :: !Text
    , Artifact -> Int
artifactSizeInBytes        :: !Int
    , Artifact -> UTCTime
artifactUpdatedAt          :: !UTCTime
    , Artifact -> URL
artifactUrl                :: !URL
    , Artifact -> ArtifactWorkflowRun
artifactWorkflowRun        :: !ArtifactWorkflowRun
    }
  deriving (Int -> Artifact -> ShowS
[Artifact] -> ShowS
Artifact -> String
(Int -> Artifact -> ShowS)
-> (Artifact -> String) -> ([Artifact] -> ShowS) -> Show Artifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Artifact -> ShowS
showsPrec :: Int -> Artifact -> ShowS
$cshow :: Artifact -> String
show :: Artifact -> String
$cshowList :: [Artifact] -> ShowS
showList :: [Artifact] -> ShowS
Show, Typeable Artifact
Typeable Artifact =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Artifact -> c Artifact)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Artifact)
-> (Artifact -> Constr)
-> (Artifact -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Artifact))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Artifact))
-> ((forall b. Data b => b -> b) -> Artifact -> Artifact)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Artifact -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Artifact -> r)
-> (forall u. (forall d. Data d => d -> u) -> Artifact -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Artifact -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Artifact -> m Artifact)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Artifact -> m Artifact)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Artifact -> m Artifact)
-> Data Artifact
Artifact -> Constr
Artifact -> DataType
(forall b. Data b => b -> b) -> Artifact -> Artifact
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Artifact -> u
forall u. (forall d. Data d => d -> u) -> Artifact -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Artifact
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Artifact -> c Artifact
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Artifact)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Artifact)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Artifact -> c Artifact
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Artifact -> c Artifact
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Artifact
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Artifact
$ctoConstr :: Artifact -> Constr
toConstr :: Artifact -> Constr
$cdataTypeOf :: Artifact -> DataType
dataTypeOf :: Artifact -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Artifact)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Artifact)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Artifact)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Artifact)
$cgmapT :: (forall b. Data b => b -> b) -> Artifact -> Artifact
gmapT :: (forall b. Data b => b -> b) -> Artifact -> Artifact
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Artifact -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Artifact -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> Artifact -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Artifact -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Artifact -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Artifact -> m Artifact
Data, Typeable, Artifact -> Artifact -> Bool
(Artifact -> Artifact -> Bool)
-> (Artifact -> Artifact -> Bool) -> Eq Artifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Artifact -> Artifact -> Bool
== :: Artifact -> Artifact -> Bool
$c/= :: Artifact -> Artifact -> Bool
/= :: Artifact -> Artifact -> Bool
Eq, Eq Artifact
Eq Artifact =>
(Artifact -> Artifact -> Ordering)
-> (Artifact -> Artifact -> Bool)
-> (Artifact -> Artifact -> Bool)
-> (Artifact -> Artifact -> Bool)
-> (Artifact -> Artifact -> Bool)
-> (Artifact -> Artifact -> Artifact)
-> (Artifact -> Artifact -> Artifact)
-> Ord Artifact
Artifact -> Artifact -> Bool
Artifact -> Artifact -> Ordering
Artifact -> Artifact -> Artifact
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Artifact -> Artifact -> Ordering
compare :: Artifact -> Artifact -> Ordering
$c< :: Artifact -> Artifact -> Bool
< :: Artifact -> Artifact -> Bool
$c<= :: Artifact -> Artifact -> Bool
<= :: Artifact -> Artifact -> Bool
$c> :: Artifact -> Artifact -> Bool
> :: Artifact -> Artifact -> Bool
$c>= :: Artifact -> Artifact -> Bool
>= :: Artifact -> Artifact -> Bool
$cmax :: Artifact -> Artifact -> Artifact
max :: Artifact -> Artifact -> Artifact
$cmin :: Artifact -> Artifact -> Artifact
min :: Artifact -> Artifact -> Artifact
Ord, (forall x. Artifact -> Rep Artifact x)
-> (forall x. Rep Artifact x -> Artifact) -> Generic Artifact
forall x. Rep Artifact x -> Artifact
forall x. Artifact -> Rep Artifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. Artifact -> Rep Artifact x
from :: forall x. Artifact -> Rep Artifact x
$cto :: forall x. Rep Artifact x -> Artifact
to :: forall x. Rep Artifact x -> Artifact
Generic)

-------------------------------------------------------------------------------
-- JSON instances
-------------------------------------------------------------------------------

instance FromJSON ArtifactWorkflowRun where
    parseJSON :: Value -> Parser ArtifactWorkflowRun
parseJSON = String
-> (Object -> Parser ArtifactWorkflowRun)
-> Value
-> Parser ArtifactWorkflowRun
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ArtifactWorkflowRun" ((Object -> Parser ArtifactWorkflowRun)
 -> Value -> Parser ArtifactWorkflowRun)
-> (Object -> Parser ArtifactWorkflowRun)
-> Value
-> Parser ArtifactWorkflowRun
forall a b. (a -> b) -> a -> b
$ \Object
o -> Id WorkflowRun
-> Id Repo -> Id Repo -> Text -> Text -> ArtifactWorkflowRun
ArtifactWorkflowRun
        (Id WorkflowRun
 -> Id Repo -> Id Repo -> Text -> Text -> ArtifactWorkflowRun)
-> Parser (Id WorkflowRun)
-> Parser
     (Id Repo -> Id Repo -> Text -> Text -> ArtifactWorkflowRun)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Id WorkflowRun)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser (Id Repo -> Id Repo -> Text -> Text -> ArtifactWorkflowRun)
-> Parser (Id Repo)
-> Parser (Id Repo -> Text -> Text -> ArtifactWorkflowRun)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id Repo)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository_id"
        Parser (Id Repo -> Text -> Text -> ArtifactWorkflowRun)
-> Parser (Id Repo) -> Parser (Text -> Text -> ArtifactWorkflowRun)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id Repo)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"head_repository_id"
        Parser (Text -> Text -> ArtifactWorkflowRun)
-> Parser Text -> Parser (Text -> ArtifactWorkflowRun)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"head_branch"
        Parser (Text -> ArtifactWorkflowRun)
-> Parser Text -> Parser ArtifactWorkflowRun
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"head_sha"

instance FromJSON Artifact where
    parseJSON :: Value -> Parser Artifact
parseJSON = String -> (Object -> Parser Artifact) -> Value -> Parser Artifact
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"Artifact" ((Object -> Parser Artifact) -> Value -> Parser Artifact)
-> (Object -> Parser Artifact) -> Value -> Parser Artifact
forall a b. (a -> b) -> a -> b
$ \Object
o -> URL
-> UTCTime
-> Bool
-> UTCTime
-> Id Artifact
-> Text
-> Text
-> Int
-> UTCTime
-> URL
-> ArtifactWorkflowRun
-> Artifact
Artifact
        (URL
 -> UTCTime
 -> Bool
 -> UTCTime
 -> Id Artifact
 -> Text
 -> Text
 -> Int
 -> UTCTime
 -> URL
 -> ArtifactWorkflowRun
 -> Artifact)
-> Parser URL
-> Parser
     (UTCTime
      -> Bool
      -> UTCTime
      -> Id Artifact
      -> Text
      -> Text
      -> Int
      -> UTCTime
      -> URL
      -> ArtifactWorkflowRun
      -> Artifact)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"archive_download_url"
        Parser
  (UTCTime
   -> Bool
   -> UTCTime
   -> Id Artifact
   -> Text
   -> Text
   -> Int
   -> UTCTime
   -> URL
   -> ArtifactWorkflowRun
   -> Artifact)
-> Parser UTCTime
-> Parser
     (Bool
      -> UTCTime
      -> Id Artifact
      -> Text
      -> Text
      -> Int
      -> UTCTime
      -> URL
      -> ArtifactWorkflowRun
      -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
        Parser
  (Bool
   -> UTCTime
   -> Id Artifact
   -> Text
   -> Text
   -> Int
   -> UTCTime
   -> URL
   -> ArtifactWorkflowRun
   -> Artifact)
-> Parser Bool
-> Parser
     (UTCTime
      -> Id Artifact
      -> Text
      -> Text
      -> Int
      -> UTCTime
      -> URL
      -> ArtifactWorkflowRun
      -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Bool
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"expired"
        Parser
  (UTCTime
   -> Id Artifact
   -> Text
   -> Text
   -> Int
   -> UTCTime
   -> URL
   -> ArtifactWorkflowRun
   -> Artifact)
-> Parser UTCTime
-> Parser
     (Id Artifact
      -> Text
      -> Text
      -> Int
      -> UTCTime
      -> URL
      -> ArtifactWorkflowRun
      -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"expires_at"
        Parser
  (Id Artifact
   -> Text
   -> Text
   -> Int
   -> UTCTime
   -> URL
   -> ArtifactWorkflowRun
   -> Artifact)
-> Parser (Id Artifact)
-> Parser
     (Text
      -> Text
      -> Int
      -> UTCTime
      -> URL
      -> ArtifactWorkflowRun
      -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id Artifact)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
        Parser
  (Text
   -> Text
   -> Int
   -> UTCTime
   -> URL
   -> ArtifactWorkflowRun
   -> Artifact)
-> Parser Text
-> Parser
     (Text -> Int -> UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"name"
        Parser
  (Text -> Int -> UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
-> Parser Text
-> Parser
     (Int -> UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"node_id"
        Parser (Int -> UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
-> Parser Int
-> Parser (UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"size_in_bytes"
        Parser (UTCTime -> URL -> ArtifactWorkflowRun -> Artifact)
-> Parser UTCTime
-> Parser (URL -> ArtifactWorkflowRun -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
        Parser (URL -> ArtifactWorkflowRun -> Artifact)
-> Parser URL -> Parser (ArtifactWorkflowRun -> Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
        Parser (ArtifactWorkflowRun -> Artifact)
-> Parser ArtifactWorkflowRun -> Parser Artifact
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser ArtifactWorkflowRun
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"workflow_run"

instance FromJSON (WithTotalCount Artifact) where
    parseJSON :: Value -> Parser (WithTotalCount Artifact)
parseJSON = String
-> (Object -> Parser (WithTotalCount Artifact))
-> Value
-> Parser (WithTotalCount Artifact)
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"ArtifactList" ((Object -> Parser (WithTotalCount Artifact))
 -> Value -> Parser (WithTotalCount Artifact))
-> (Object -> Parser (WithTotalCount Artifact))
-> Value
-> Parser (WithTotalCount Artifact)
forall a b. (a -> b) -> a -> b
$ \Object
o -> Vector Artifact -> Int -> WithTotalCount Artifact
forall a. Vector a -> Int -> WithTotalCount a
WithTotalCount
        (Vector Artifact -> Int -> WithTotalCount Artifact)
-> Parser (Vector Artifact)
-> Parser (Int -> WithTotalCount Artifact)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser (Vector Artifact)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"artifacts"
        Parser (Int -> WithTotalCount Artifact)
-> Parser Int -> Parser (WithTotalCount Artifact)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Int
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"total_count"