{- ORMOLU_DISABLE -}
{- HLINT ignore -}
-- THIS IS A GENERATED FILE, DO NOT EDIT

{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.UnregistrationParams where

import Control.DeepSeq
import Data.Hashable
import GHC.Generics
import Language.LSP.Protocol.Utils.Misc
import Prettyprinter
import qualified Data.Aeson as Aeson
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.Unregistration
import qualified Language.LSP.Protocol.Types.Common

{-|

-}
data UnregistrationParams = UnregistrationParams 
  { {-|

  -}
  UnregistrationParams -> [Unregistration]
_unregisterations :: [Language.LSP.Protocol.Internal.Types.Unregistration.Unregistration]
  }
  deriving stock (Int -> UnregistrationParams -> ShowS
[UnregistrationParams] -> ShowS
UnregistrationParams -> String
(Int -> UnregistrationParams -> ShowS)
-> (UnregistrationParams -> String)
-> ([UnregistrationParams] -> ShowS)
-> Show UnregistrationParams
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UnregistrationParams -> ShowS
showsPrec :: Int -> UnregistrationParams -> ShowS
$cshow :: UnregistrationParams -> String
show :: UnregistrationParams -> String
$cshowList :: [UnregistrationParams] -> ShowS
showList :: [UnregistrationParams] -> ShowS
Show, UnregistrationParams -> UnregistrationParams -> Bool
(UnregistrationParams -> UnregistrationParams -> Bool)
-> (UnregistrationParams -> UnregistrationParams -> Bool)
-> Eq UnregistrationParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UnregistrationParams -> UnregistrationParams -> Bool
== :: UnregistrationParams -> UnregistrationParams -> Bool
$c/= :: UnregistrationParams -> UnregistrationParams -> Bool
/= :: UnregistrationParams -> UnregistrationParams -> Bool
Eq, Eq UnregistrationParams
Eq UnregistrationParams =>
(UnregistrationParams -> UnregistrationParams -> Ordering)
-> (UnregistrationParams -> UnregistrationParams -> Bool)
-> (UnregistrationParams -> UnregistrationParams -> Bool)
-> (UnregistrationParams -> UnregistrationParams -> Bool)
-> (UnregistrationParams -> UnregistrationParams -> Bool)
-> (UnregistrationParams
    -> UnregistrationParams -> UnregistrationParams)
-> (UnregistrationParams
    -> UnregistrationParams -> UnregistrationParams)
-> Ord UnregistrationParams
UnregistrationParams -> UnregistrationParams -> Bool
UnregistrationParams -> UnregistrationParams -> Ordering
UnregistrationParams
-> UnregistrationParams -> UnregistrationParams
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 :: UnregistrationParams -> UnregistrationParams -> Ordering
compare :: UnregistrationParams -> UnregistrationParams -> Ordering
$c< :: UnregistrationParams -> UnregistrationParams -> Bool
< :: UnregistrationParams -> UnregistrationParams -> Bool
$c<= :: UnregistrationParams -> UnregistrationParams -> Bool
<= :: UnregistrationParams -> UnregistrationParams -> Bool
$c> :: UnregistrationParams -> UnregistrationParams -> Bool
> :: UnregistrationParams -> UnregistrationParams -> Bool
$c>= :: UnregistrationParams -> UnregistrationParams -> Bool
>= :: UnregistrationParams -> UnregistrationParams -> Bool
$cmax :: UnregistrationParams
-> UnregistrationParams -> UnregistrationParams
max :: UnregistrationParams
-> UnregistrationParams -> UnregistrationParams
$cmin :: UnregistrationParams
-> UnregistrationParams -> UnregistrationParams
min :: UnregistrationParams
-> UnregistrationParams -> UnregistrationParams
Ord, (forall x. UnregistrationParams -> Rep UnregistrationParams x)
-> (forall x. Rep UnregistrationParams x -> UnregistrationParams)
-> Generic UnregistrationParams
forall x. Rep UnregistrationParams x -> UnregistrationParams
forall x. UnregistrationParams -> Rep UnregistrationParams x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. UnregistrationParams -> Rep UnregistrationParams x
from :: forall x. UnregistrationParams -> Rep UnregistrationParams x
$cto :: forall x. Rep UnregistrationParams x -> UnregistrationParams
to :: forall x. Rep UnregistrationParams x -> UnregistrationParams
Generic)
  deriving anyclass (UnregistrationParams -> ()
(UnregistrationParams -> ()) -> NFData UnregistrationParams
forall a. (a -> ()) -> NFData a
$crnf :: UnregistrationParams -> ()
rnf :: UnregistrationParams -> ()
NFData, Eq UnregistrationParams
Eq UnregistrationParams =>
(Int -> UnregistrationParams -> Int)
-> (UnregistrationParams -> Int) -> Hashable UnregistrationParams
Int -> UnregistrationParams -> Int
UnregistrationParams -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> UnregistrationParams -> Int
hashWithSalt :: Int -> UnregistrationParams -> Int
$chash :: UnregistrationParams -> Int
hash :: UnregistrationParams -> Int
Hashable)
  deriving (forall ann. UnregistrationParams -> Doc ann)
-> (forall ann. [UnregistrationParams] -> Doc ann)
-> Pretty UnregistrationParams
forall ann. [UnregistrationParams] -> Doc ann
forall ann. UnregistrationParams -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. UnregistrationParams -> Doc ann
pretty :: forall ann. UnregistrationParams -> Doc ann
$cprettyList :: forall ann. [UnregistrationParams] -> Doc ann
prettyList :: forall ann. [UnregistrationParams] -> Doc ann
Pretty via (ViaJSON UnregistrationParams)

instance Aeson.ToJSON UnregistrationParams where
  toJSON :: UnregistrationParams -> Value
toJSON (UnregistrationParams [Unregistration]
arg0) = [Pair] -> Value
Aeson.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [[Pair]] -> [Pair]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([[Pair]] -> [Pair]) -> [[Pair]] -> [Pair]
forall a b. (a -> b) -> a -> b
$  [[Key
"unregisterations" Key -> [Unregistration] -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Unregistration]
arg0]]

instance Aeson.FromJSON UnregistrationParams where
  parseJSON :: Value -> Parser UnregistrationParams
parseJSON = String
-> (Object -> Parser UnregistrationParams)
-> Value
-> Parser UnregistrationParams
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Aeson.withObject String
"UnregistrationParams" ((Object -> Parser UnregistrationParams)
 -> Value -> Parser UnregistrationParams)
-> (Object -> Parser UnregistrationParams)
-> Value
-> Parser UnregistrationParams
forall a b. (a -> b) -> a -> b
$ \Object
arg -> [Unregistration] -> UnregistrationParams
UnregistrationParams ([Unregistration] -> UnregistrationParams)
-> Parser [Unregistration] -> Parser UnregistrationParams
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
arg Object -> Key -> Parser [Unregistration]
forall a. FromJSON a => Object -> Key -> Parser a
Aeson..: Key
"unregisterations"