{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}

module Hercules.API.Projects.PatchProject where

import Data.OpenApi qualified as O3
import Hercules.API.Prelude

-- | Changes to a Project. 'Nothing' represents no change in a field.
data PatchProject = PatchProject
  { PatchProject -> Maybe Bool
enabled :: Maybe Bool
  }
  deriving ((forall x. PatchProject -> Rep PatchProject x)
-> (forall x. Rep PatchProject x -> PatchProject)
-> Generic PatchProject
forall x. Rep PatchProject x -> PatchProject
forall x. PatchProject -> Rep PatchProject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. PatchProject -> Rep PatchProject x
from :: forall x. PatchProject -> Rep PatchProject x
$cto :: forall x. Rep PatchProject x -> PatchProject
to :: forall x. Rep PatchProject x -> PatchProject
Generic, Int -> PatchProject -> ShowS
[PatchProject] -> ShowS
PatchProject -> String
(Int -> PatchProject -> ShowS)
-> (PatchProject -> String)
-> ([PatchProject] -> ShowS)
-> Show PatchProject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PatchProject -> ShowS
showsPrec :: Int -> PatchProject -> ShowS
$cshow :: PatchProject -> String
show :: PatchProject -> String
$cshowList :: [PatchProject] -> ShowS
showList :: [PatchProject] -> ShowS
Show, PatchProject -> PatchProject -> Bool
(PatchProject -> PatchProject -> Bool)
-> (PatchProject -> PatchProject -> Bool) -> Eq PatchProject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PatchProject -> PatchProject -> Bool
== :: PatchProject -> PatchProject -> Bool
$c/= :: PatchProject -> PatchProject -> Bool
/= :: PatchProject -> PatchProject -> Bool
Eq)
  deriving anyclass (PatchProject -> ()
(PatchProject -> ()) -> NFData PatchProject
forall a. (a -> ()) -> NFData a
$crnf :: PatchProject -> ()
rnf :: PatchProject -> ()
NFData, [PatchProject] -> Value
[PatchProject] -> Encoding
PatchProject -> Value
PatchProject -> Encoding
(PatchProject -> Value)
-> (PatchProject -> Encoding)
-> ([PatchProject] -> Value)
-> ([PatchProject] -> Encoding)
-> ToJSON PatchProject
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: PatchProject -> Value
toJSON :: PatchProject -> Value
$ctoEncoding :: PatchProject -> Encoding
toEncoding :: PatchProject -> Encoding
$ctoJSONList :: [PatchProject] -> Value
toJSONList :: [PatchProject] -> Value
$ctoEncodingList :: [PatchProject] -> Encoding
toEncodingList :: [PatchProject] -> Encoding
ToJSON, Value -> Parser [PatchProject]
Value -> Parser PatchProject
(Value -> Parser PatchProject)
-> (Value -> Parser [PatchProject]) -> FromJSON PatchProject
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
$cparseJSON :: Value -> Parser PatchProject
parseJSON :: Value -> Parser PatchProject
$cparseJSONList :: Value -> Parser [PatchProject]
parseJSONList :: Value -> Parser [PatchProject]
FromJSON, Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
(Proxy PatchProject -> Declare (Definitions Schema) NamedSchema)
-> ToSchema PatchProject
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
ToSchema, Typeable PatchProject
Typeable PatchProject =>
(Proxy PatchProject -> Declare (Definitions Schema) NamedSchema)
-> ToSchema PatchProject
Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
forall a.
Typeable a =>
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
$cdeclareNamedSchema :: Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
declareNamedSchema :: Proxy PatchProject -> Declare (Definitions Schema) NamedSchema
O3.ToSchema)